FREE! Scene draw script

Hi, I wrote a JavaScript where if the player gets a certain distance from an object, that object changes into something else (a lowpoly version or even an empty object). I use use triggers, and If the player enters the trigger it changes to a high poly version, and vice versa.

You need both the highpoly.js

Code (csharp):

//To use: attach this code to your an empty object, and make your high poly prefab a child of your game object. Next, add a box collider to your game object and make the collider a trigger(make sure that it is consideribly larger than your high-poly prefab). Do the same with your low-poly object, use lowpoly.js instread. Give both empty game objects names, and assign eachother as "object" in the editor (make sure both are prefabs). To use, add your lowpoly containing prefab to the scene and enjoy (lowpoly will be changed to high poly if you are within the specified range). If you use, be sure to give credit to Given Borthwick

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.