// Use this for initialization private void Start() { cone = transform.GetChild(0); coneColor = cone.GetComponent <MeshRenderer>().material.color; cursorColors = new Color[2]; drawing_pencil = GetComponentInChildren <Drawing_Pencil>(); object_scaler = FindObjectOfType <ObjectScaler>(); drawing_pencil.draw = false; pivotPoint = FindObjectOfType <Pivot>().transform; rotationOffset = new GameObject("rotationOffset"); cursor = transform.GetChild(2); cursorMesh = cursor.GetComponent <MeshRenderer>(); axis = FindObjectOfType <Axis_Object>().GetComponent <MeshRenderer>(); axis.enabled = false; eraser = transform.GetChild(3).GetComponent <MeshRenderer>(); clone_tool = transform.GetChild(4).GetComponent <MeshRenderer>(); cursorColors[0] = cursorMesh.material.GetColor("_TintColor"); float r = 208 / 255f; float g = 12 / 255f; float b = 12 / 255f; float a = 18 / 255f; cursorColors[1] = new Color(r, g, b, a); }
// Start is called before the first frame update void Start() { scaler = GetComponent <ObjectScaler>(); rb = GetComponent <Rigidbody>(); baseMass = rb.mass; }