Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Obi-rope asset disappearing in build
#1
Hey guys -- Thanks for your help with an earlier post about obi-fluid. I'm now having issues with Obi-rope. We initially created an Obi-rope asset that worked both in the editor as well as in a build (Windows 10 64-bit). At some point in our development, this Obi-rope asset would only appear in the editor, but, when when we would make a build, it would no longer appear. My thought was that the obi-rope asset was getting corrupted somehow, so I rebuilt my Obi-rope asset from scratch and it seemed to have fixed the issue...

Unfortunately, after a couple days of running this build (that has not changed, to our knowledge, at all) we're seeing the same disappearing behavior. Any thoughts what would cause this?

My team has been using git for version control and we were curious about learning how the Obi-rope asset is stored in memory. If you have any ideas, please let us know. THANKS!


++j
Reply
#2
(15-10-2018, 09:19 PM)rebeck14 Wrote: Hey guys -- Thanks for your help with an earlier post about obi-fluid. I'm now having issues with Obi-rope. We initially created an Obi-rope asset that worked both in the editor as well as in a build (Windows 10 64-bit). At some point in our development, this Obi-rope asset would only appear in the editor, but, when when we would make a build, it would no longer appear. My thought was that the obi-rope asset was getting corrupted somehow, so I rebuilt my Obi-rope asset from scratch and it seemed to have fixed the issue...

Unfortunately, after a couple days of running this build (that has not changed, to our knowledge, at all) we're seeing the same disappearing behavior. Any thoughts what would cause this?

My team has been using git for version control and we were curious about learning how the Obi-rope asset is stored in memory. If you have any ideas, please let us know. THANKS!


++j

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,
Reply
#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
#4
(16-10-2018, 09:02 PM)rebeck14 Wrote: 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?

Hi,

Objects are always included in the build, but assets only are if referenced by objects.

The only thing that comes to mind is that the ObiRopeSection asset used by your rope is not being included in the build, and so it is not rendered there. How to test: add a ObiParticleRenderer to the rope, and see if the particles are visible in the build. If so, then the section asset is not being included.

Regarding the out of bounds exception when starting out the scene with a disabled rope, we are unable to reproduce it in any of our test scenes. Moreover, ropes start out with the same amount of particles regardless of their activation state, so it does not make much sense...

If it would be possible for us to look at your project/scene, we might be able to diagnose the problem more accurately.
Reply
#5
So, it looks like what our problem was is that our obi-rope object and its associated elements were in another Resources folder that wasn't the root directory Resources folder. We don't understand why that would make a difference, but our obi-rope is showing up every time now. Thanks for the continued support!


++j

josemendez
Hi,

Objects are always included in the build, but assets only are if referenced by objects.

The only thing that comes to mind is that the ObiRopeSection asset used by your rope is not being included in the build, and so it is not rendered there. How to test: add a ObiParticleRenderer to the rope, and see if the particles are visible in the build. If so, then the section asset is not being included.

Regarding the out of bounds exception when starting out the scene with a disabled rope, we are unable to reproduce it in any of our test scenes. Moreover, ropes start out with the same amount of particles regardless of their activation state, so it does not make much sense...

If it would be possible for us to look at your project/scene, we might be able to diagnose the problem more accurately.
Reply