// Start is called before the first frame update void Start() { rigid = GetComponent <Rigidbody2D>(); scaler = GetComponent <DepthScaler>(); sprite1 = spriteRenderer.sprite; InvokeRepeating("toggleSprite", animateSpeed, animateSpeed); }
public void OnSceneGUI() { DepthScaler scaler = target as DepthScaler; if (!scaler) { return; } scaler.updateDepthRatio(); }
public override void OnInspectorGUI() { base.DrawDefaultInspector(); DepthScaler scaler = target as DepthScaler; if (!scaler) { return; } scaler.updateDepthRatio(); }