Can I include a Mono DLL and a native iOS static library in a Unity Plugin? - unity3d

The Unity manual includes a section explaining how to export assets as a Unity package here
I have two files I would like to export together as a single Unity package. One is a Mono DLL that sits in the top level of the Assets folder in my Unity project. The other is a native iOS static library, i.e. a .a file, which sits in Assets/Plugins/iOS
Following the instructions in the Unity manual mentioned above I should
Choose Assets > Export Packageā€¦ from the menu to bring up the Exporting Package dialog box.
In the dialog box, select the assets you want to include in the package by clicking on the boxes so they are checked.
If I have the Mono DLL visible in the Unity editor here's what I see in the Exporting Package dialog box
But if I have the native iOS plugin visible in the Unity editor here's what I see in the Export Package dialog box
Can I include both of these items, the Mono DLL and the native iOS static library, in a single Unity package? How?

Make sure that neither of the files you want to add are visible in the Unity editor and then choose Assets > Export Packageā€¦ from the menu to bring up the Exporting Package dialog box. It should then show all the possible assets to include, like this

Related

How to Share new SteamVR ActionSets and Bindings between Unity Projects

I'm developing a VR module in Unity that I hope to be able to import into any of my unity projects as an asset package. This package requires defining input from a Vive controller button to turn it on during gameplay. I would like to somehow share this actionset and button binding between projects so I don't have to manually create the actions and bindings each time I would like to use it.
Is there any way to share SteamVR input settings between projects? Specifically one whole input actionset, and its associated controller bindings.
I've tried exporting the SteamVR_Input folder as a package, also tried with including SteamVR folder, neither worked. After reimport, I can see the imported actionset in the project folder in the SteamVR_Input folder, but it isn't showing up in the input window (Window Menu -> SteamVr Input). However, the live input view shows the actions in the list, but doesn't register any button presses.
Update Unity 2019.2:
This seems to be fixed now.
In the source project, go to SteamVR Input window, click advanced.
Create a partial bindings folder. Rename it to what you want. Note that it will automatically add a SteamVR_ prefix. So my default name had SteamVR_SteamVR_ at the start. I needed to delete the suggested name and just name it my project's name.
It creates it in the base folder for your project, NOT the assets folder for some reason.
In Windows Explorer, drag it into Assets folder of source project.
In Unity editor (source project) it should now prompt you to import settings, but it detects that these actions already exist. Click Merge.
Make sure your actionset is still there in SteamVR input window.
Now you can export a unitypackage from this folder.
Now you can import the unitypackage in the destination project, and it should prompt you after import to load the actions! Yay.
Note: I ran into an issue if I renamed the partial bindings folder after creation. It would not recognize it as actions anymore and not prompt to import. To rename the partial bindings folder, you need to recreate it and follow the above steps again.
OLD ANSWER (outdated) :
Note: this answer is working based on a Beta version of the SteamVR plugin 2.2b4. It may change in a future release
Ok I got this working. It's still not quite possible as far as I can tell to create a unitypackage with the bindings and actions inside, but it's much better than before.
To move an ActionSet and bindings from project 1 to project 2:
In the first project: Create a new action set with your desired actions and bindings.
Go to Window Menu > SteamVR input
click Advanced settings, then click Create. This will create a folder in your project somewhere.
This is where the problem is. This folder can't seem to be packaged. BUT:
Important: In your 2nd project delete the SteamVR_Input folder (you may want to back it up just in case)
Drag this created folder from the 1st project (from windows explorer) into the Assets folder in the project view of the 2nd project (open in Unity). If you do this outside of unity it will not work.
It will prompt you to import the "partial bindings" and will add your custom ActionSet to this other project. Open Window Menu > SteamVR_Input in the 2nd project and then you should see your imported ActionSet at the top. Click "Save and Generate" to recreate a new SteamVR_Input Folder for this project.
Voila! It should work.
I haven't got it to be able to be packaged in an asset package yet.
After spending a lot of frustrating hours I discovered the following simple procedure.
(In Unity 2019.1.14f1 and I suspect it will work in higher versions as well).
In project 1:
It is crucial after editing your bindings in the SteamVR graphical interface to choose
Replace Default Binding
The result of this is that your bindings are completely saved in
Assets/StreamingAssets/SteamVR
(by default, but this is a perfectly good location)
This by the way, is also required if you want to use your bindings in a standalone build.
In project 2:
Copy, via the file system or via export and import custom package, the StreamingAssets/SteamVR folder from project 1 to the corresponding location in project 2.
As of that moment your bindings are available in project2!

How to import SVG to Unity 2018.2

Unity's roadmap stated that we should be able to import SVG in Unity 2018.2.
I have Unity 2018.2.3, but I couldn't use SVGs to Unity. Unity doesn't recognize they are sprites.
Please can anyone tell me how to import/use SVGs in unity.
There are 2 ways to add SVG support in Unity (other than building your own SVG rendering system or getting one from the Asset Store).
Which way you have to take depends on what version of Unity you are currently using.
In Unity 2019, click on the "Window" menu at the top left of the Editor. Then click on "Package Manager". In the menu that opens, click on the "Advanced" button around the upper right (left of the search bar). Click on "Show preview packages". This will allow you to see packages that aren't officially released (any versions less than 1.0) by Unity Technology. You should be able to find "Vector Graphics" in the list of package with a "Preview" next to its name. Click on it and click on the "Import" button in the lower right of the menu.
In Unity 2020 and later, Unity Tech. have removed the ability to see preview package in the Package Manager because of they had to waste in answering complex inquiries about those incomplete packages as many were adding them to their projects without either clearly understanding them or while thinking that they would have full support (which is not the case).
From Unity 2020 and forth, you got to manually type in a Git URL address to add any preview packages.
To type a Git URL address, open the Package Manage as I explained above, but instead of going with the "Advanced" and "Show preview packages", click on the "+" on the upper left of the menu, then "Add package from Git URL". This will open a small pop-up with a entry field and a grayed out "add" button.
For adding the Vector Graphics package, you got to type (or paste) in the following address:
com.unity.vectorgraphics
After this is typed in, you should be able to click on the "add" button and this will add the preview package to your project under the "In Project" category.
If you don't see Vecor Graphics in package manager click on advanced and enable preview packages.
In order to import SVG with Unity 2018.2, you need to import the package Vector Graphics with the new Package Manager (you can find it in the menu Window > Package Manager).
Then, you can import any SVG in the project by copying it in the project's folder.
Beware of the options in the inspector, the Generated Asset Type controls the render mode, there are 3 modes: Vector sprite (default), Textured sprite, Texture2D.
A picture tells thousand words thanks to 44 second demo
Go to Windows -> Package Manager in Unity 2019
Vector Graphic package is currently in the preview stage. You have to enable preview packages in advance settings in unity 2019.
Edit:
From Unity 2020, the Preview Package setting has changed. Watch this 40 second Demo
Go to edit -> Project Settings -> Package Manager -> Check Enable Preview Package
there is a button labeled "Advanced" on the top left of the window, click it, then tick the "Show preview packages" then you can see the svg package.

Export project gives empty assets

I have a problem when I try to export a projet to an another computer (both with Unity version 5.0.1f).
I use this path Export Package -> All -> Select Dependencies and when I import the project I select custom package. Everything is imported without any problem, except the assets which are visually empty in Unity even if the file has the same Ko as the model. So when I drag and drop them in the project to test them, nothing is visible, nor in the inspector or in the preview.
How can I import a project keeping the assets visible?

Unity3d change preview icon for files with assets extensions

I am using Unity3d.
How to change preview icon for files that has .assets extensions?
You can use: http://docs.unity3d.com/Documentation/ScriptReference/AssetPreview.GetAssetPreview.html
This plugin does it: http://u3d.as/content/wit-entertainment/asset-preview/2Lz

Custom tab is unclickable

I have some Unity .asset files which contains 3D models. I want to be able to convert / export these 3D models into a more common format which will be accepted by 3D Max.
I read that I need to use a custom script since Unity doesn't support this out of the box, so I tried to set up this plugin script:
http://wiki.unity3d.com/index.php?title=ObjExporter
I created a new project called Test, copied the two CS scripts into the "My Project Name/Editor" folder, and although the custom tab in Unity shows up, it is not click-able.
Also, I had to change line 79 to:
objMaterial.textureName = AssetDatabase.GetAssetPath(mats[material].mainTexture);
From:
objMaterial.textureName = EditorUtility.GetAssetPath(mats[material].mainTexture);
As it was giving me an error.
Which version of Unity? In 3.5.7 you should see the following:
The Custom menu item should be in the main tool bar. Also included for reference is the project hierarchy, to show that the scripts are in the correct folder. I copied the scripts verbatim from the OP's link.