How automatically load prefabs in asset?

   2620   4   1
User Avatar
Member
17 posts
Joined: Jan. 2013
Offline
Hi,

I use point instancing and I have instance attributes on points. In Unity I manualy load all prefabs to asset inputs, it take a lot time to do it every time.

Do we have any solution to automatically load prefabs in asset? I tried unity_instance attribute, where I point relative path to my prefab, but it not working. Maybe this attribute is not intended for this.

Thanks!
Edited by v_chernobay - June 6, 2018 03:27:45

Attachments:
unity_input.jpg (41.7 KB)

User Avatar
Member
571 posts
Joined: May 2017
Offline
The unity_instance attribute would be the way to do it. Make sure the path is starting with Assets/ (e.g. Assets/Prefabs/Car.prefab)

If that doesn't work, post your asset on here and I can take a look. Also make sure the plugin is update to date.
User Avatar
Member
17 posts
Joined: Jan. 2013
Offline
I put attribute unity_instance to points with path, starting from Assets/, but not working. I tested in build 496. I attach test hda and unitypackage.
Edited by v_chernobay - June 8, 2018 01:23:55

Attachments:
autoload_prefab_test.hda (39.7 KB)
autoload_prefab_test.unitypackage (84.8 KB)

User Avatar
Member
571 posts
Joined: May 2017
Offline
Get rid of the “instance” attribute but keep the “unity_instance” attribute, then it should work. What is happening is that the point has both the instance and unity_instance attributes, so the instance attribute is the only one being applied (as it gets priority).
User Avatar
Member
17 posts
Joined: Jan. 2013
Offline
Thanks, it works.
  • Quick Links