Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rope not showing in Build
#1
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?.
Reply
#2
(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
Reply
#3
(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
Reply