Obi Official Forum
Rope not showing in Build - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html)
+--- Thread: Rope not showing in Build (/thread-3304.html)



Rope not showing in Build - Torsson - 03-02-2022

Hello i have 4 dynamic ropes setup when my "Mobile crane" lift's objects. All shows in play in unity editor but none are rendered in the build. Does anyone know what i have missed?.


RE: Rope not showing in Build - josemendez - 03-02-2022

(03-02-2022, 07:51 PM)Torsson Wrote: Hello i have 4 dynamic ropes setup when my "Mobile crane" lift's objects. All shows in play in unity editor but none are rendered in the build. Does anyone know what i have missed?.

Hi!

Hard to say with so little info (target platform, solver backend being used, ropes made in-editor or at runtime, etc) but I'm going to guess:

Make sure all assets you use are referenced by some object in your scene. Any assets that are not referenced by the scene and not explicitly added to the build will be ignored by Unity when building.

Specifically, if you're using ObiRopeExtrudedRenderer components with the default rope section asset and grabbing it by code, Unity won't add it to your build (which will result in no ropes being rendered). Making it a public variable in your script and dragging it will count as a reference and Unity will include it in the build.

this might not be the cause at all, though. If you give more details I will be able to help you further! Sonrisa


RE: Rope not showing in Build - Torsson - 03-02-2022

(03-02-2022, 07:51 PM)Torsson Wrote: Hello i have 4 dynamic ropes setup when my "Mobile crane" lift's objects. All shows in play in unity editor but none are rendered in the build. Does anyone know what i have missed?.
 
Code:
rope.transform.GetComponent<MeshRenderer>().materials[0] = ropemat;

Should be
Code:
rope.transform.GetComponent<MeshRenderer>().material = ropemat;



That is why it did not work.

(03-02-2022, 08:02 PM)josemendez Wrote: Hi!

Hard to say with so little info (target platform, solver backend being used, ropes made in-editor or at runtime, etc) but I'm going to guess:

Make sure all assets you use are referenced by some object in your scene. Any assets that are not referenced by the scene and not explicitly added to the build will be ignored by Unity when building.

Specifically, if you're using ObiRopeExtrudedRenderer components with the default rope section asset and grabbing it by code, Unity won't add it to your build (which will result in no ropes being rendered). Making it a public variable in your script and dragging it will count as a reference and Unity will include it in the build.

this might not be the cause at all, though. If you give more details I will be able to help you further! Sonrisa

That was a fast answer Gran sonrisa. I thank you for the fast response but i found the problem and it was an easy one. i posted the solution if someone does the same beginner mistake as i made Sonrisa