c# - Toggle Between Displaying the wireframe of an object in Unity 3D -


i'm new unity , c# have searched enough deem there no solution available other using shader. (shaders aren't available on free version)

so far, i've been able change whether model displayed in wireframe or not using following:

    // http://docs.unity3d.com/scriptreference/gl-wireframe.html using unityengine; using system.collections;  public class exampleclass : monobehaviour {     void onprerender() {         gl.wireframe = true;     }     void onpostrender() {         gl.wireframe = false;     } } 

however doesn't let me toggle between 2 in-game required. i'm assuming solution re-render not sure if right approach. advice please?

the reasonable solution use shaders are available in free version. since unity 5, pro , free versions different based on license; if game makes on $100,000 usd, need pay pro license. however, features available in both.

update: apply shader need make sure model has been uv mapped (aka: unwrapping). process explains how convert 2d texture coordinates 3d surface of model. think of how cut , fold wrapping paper around surface of gift.

explaining uv mapping , unwrapping vastly out of scope question. here's link explaining basics in blender

https://en.wikibooks.org/wiki/blender_3d:_noob_to_pro/uv_map_basics


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -