public void DrStartVFX() { GameObject parent = gameObject.transform.parent.gameObject; if (parent.name.Contains("platform")) { PreparePlatform script = gameObject.GetComponentInParent <PreparePlatform>(); script.StartVFX(); } else { Debug.Log("Parent Object Of" + gameObject.name + "is not approprate for it"); } }
public void Prepare() { // Debug.Log("Preparing ColorAnimHelper"); PreparePlatform prep_platf = GetComponent <PreparePlatform>(); from_mat_0 = prep_platf.from_mat_0; from_mat_1 = prep_platf.from_mat_1; from_mat_2 = prep_platf.from_mat_2; from_color_0 = prep_platf.from_mat_0.GetColor("_BaseColor"); from_color_1 = prep_platf.from_mat_1.GetColor("_BaseColor"); from_color_2 = prep_platf.from_mat_2.GetColor("_BaseColor"); to_color_0 = prep_platf.to_mat_0.GetColor("_BaseColor"); to_color_1 = prep_platf.to_mat_1.GetColor("_BaseColor"); to_color_2 = prep_platf.to_mat_2.GetColor("_BaseColor"); }