Inheritance: MonoBehaviour
Ejemplo n.º 1
0
 void Awake()
 {
     go = this.gameObject;
     spawnPos = transform.position;
     eggLogic = GameObject.Find("Egg").GetComponent<EggLogic>();
     MeshFilter[] meshes = GameObject.FindObjectsOfType(typeof(MeshFilter))as MeshFilter[];
     Debug.Log("Meshes found: " + meshes.Length);
     foreach (MeshFilter mesh in meshes)
     {
         Vector2[] uvs = new Vector2[mesh.mesh.vertices.Length];
         for (int i = 0; i < uvs.Length; i++)
         {
             uvs[i] = new Vector2(0.5f,0.5f);
         }
        // mesh.mesh.uv = uvs;
     }
 }
Ejemplo n.º 2
0
 void Awake()
 {
     main = this;
     spawnPos = transform.position;
     //shadowBigObject = (GameObject)Instantiate (shadowBigPrefab, Vector3.zero, Quaternion.identity);
     //Destroy (shadowBigObject.GetComponent<BoxCollider> ());
 }