protected override void OnStartRunning() { base.OnCreate(); // Cache all the needed data to draw the mesh propertyBlock = new MaterialPropertyBlock(); //uv = new Vector4[1]; mesh = VisualElementsCache.GetInstance().mesh; material = VisualElementsCache.GetInstance().walkingSpriteSheetMaterial; shaderPropertyID = Shader.PropertyToID("_MainTex_UV"); }
private void Awake() { instance = this; }