Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Obi-rope asset disappearing in build
#3
(16-10-2018, 08:00 AM)josemendez Wrote: Hi there,

When you talk about ObiRope as an "asset", what exactly are you referring to? ropes aren't assets but objects. See:
https://unity3d.com/es/learn/tutorials/t...ialization

As all objects, ropes are serialized by Unity along with the rest of the scene they live in. We're not performing custom serialization or anything like that, since ropes are basically a bunch of arrays. It's all up to Unity's built-in serialization system.

Make sure all assets that you need to include in the build are referenced in your scene though. Getting assets by name inside a script will not make Unity include them in the build unless they're directly referenced by an object  (i.e. attached to a slot in the object's inspector).

cheers,

Thanks Jose for the speedy reply. We have an unusual setup and I wanted to describe what is going on in better detail in case something stands out to you. 

We have a prefab in a sub-scene that includes an ObiRope object. It needs to start out disabled. At first we had the object just disabled from the start (unchecked in the inspector panel) but when we enabled it we kept getting an error that the last index of the rope particle system couldn't be found. Now we start the prefab enabled and have it disable itself after 5 seconds. This has stopped giving an index out of bound error. 

However now when we enable the object we are seeing differences in the editor and the build. The editor will show the rope and the build will not. Other objects in that sub scene work as intended and are treated the same way (disabled through the inspector check box and then at some point enabled). I am pretty sure the ObiRope object is included in the build since we have the sub scene added to our build configuration and the object is in the scene. All other scene sub components also behave as expected.

Thoughts?
Reply


Messages In This Thread
RE: Obi-rope asset disappearing in build - by rebeck14 - 16-10-2018, 09:02 PM