public void Awake() { MeshFilter component = base.GetComponent <MeshFilter>(); if (component == null) { Debug.LogError("MeshFilter not found!"); return; } this.render = base.GetComponent <Renderer>(); component.sharedMesh = SheenBillboard.GetSharedQuad(); SheenBillboardManager.Register(this); }
private void OnDestroy() { try { if (this.wsToken >= 0) { WorkScheduler.Unregister(this, this.wsToken); this.wsToken = -1; } SheenBillboardManager.Unregister(this); } catch { } }
public void Awake() { MeshFilter component = base.GetComponent <MeshFilter>(); if (component == null) { Debug.LogError("MeshFilter not found!"); return; } this.render = base.GetComponent <Renderer>(); component.sharedMesh = SheenBillboard.GetSharedQuad(); SheenBillboardManager.Register(this); if (this.render != null) { this._vrIconCache = (this.render.sharedMaterial.mainTexture as Texture2D); } }