_root.Awake C# (CSharp) Méthode

Awake() public méthode

public Awake ( ) : void
Résultat void
    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;
        }
    }