public void paintAllShapesToPaintSurfaceEditor() { // Retrieve all Shapes from Level GameObject[] allPlayerShapes = GameObject.FindGameObjectsWithTag("Player"); Debug.Log("allPlayerShapes " + allPlayerShapes); Debug.Log("allPlayerShapes length " + allPlayerShapes.Length); foreach (GameObject child in allPlayerShapes) { Debug.Log("foreach"); PaintTrail childPaintTrailScript = child.GetComponent <PaintTrail>(); if (child.activeSelf && childPaintTrailScript) { Debug.Log("activeSelf"); childPaintTrailScript.instantiatePaintSurfaceElement(paintSurfaceContainer); } } }
public void instantiatePaintSurface(GameObject container) { paintTrailScript.instantiatePaintSurfaceElement(container); }