Ejemplo n.º 1
0
 void Update()
 {
     currentId = 0;
     if(lines == null){
         lines = GameObject.Find("LineRenderManager").GetComponent<LineRenderManager>();
         strings = lines.GetComponent<DrawString>();
     }
     // reset the start position
     penPosition = new Vector2(padding, Camera.main.pixelHeight-padding);
 }
Ejemplo n.º 2
0
 void Awake()
 {
     DontDestroyOnLoad(gameObject);
     // setup the string art and the line art
     penPosition = new Vector2(0, Camera.main.pixelHeight);
     if(!GameObject.Find("LineRenderManager")){
         Debug.LogError("Add a line renderer to the scene");
     }
     penTransform = new GameObject().transform;
     DontDestroyOnLoad(penTransform);
     lines = GameObject.Find("LineRenderManager").GetComponent<LineRenderManager>();
     strings = lines.GetComponent<DrawString>();
 }