// Use this for initialization void Awake() { One = this; casterIdx = -1; staticCaster = new StaticCasters(gameObject, mat); dynamicCaster = new DynamicCasters(gameObject, mat); (dynamicCaster as DynamicCasters).SetVault(frequence, sqrDist); }
private void OnDestroy() { staticCaster.OnDestroy(); dynamicCaster.OnDestroy(); One = null; }
private void OnBecameVisible() { BatchCasters.AddCaster(this); //Debug.Log("Visible"); }
private void OnBecameInvisible() { BatchCasters.RemoveCaster(this); //Debug.Log("Invisible"); }