private void Awake()
        {
            Canvas = FindObjectOfType <SPCanvas>();
            Assert.IsNotNull(Canvas);

            // To avoid rendering errors, hide until the first update
            ApplyToAllParts(part => part.gameObject.GetComponent <Renderer>().enabled = false);
        }
        protected virtual void Awake()
        {
            // Sanity checks, make sure prefabs are linked
            Assert.raiseExceptions = true;
            Assert.IsNotNull(SPInConnectorPrefab);
            Assert.IsNotNull(SPOutConnectorPrefab);
            Assert.raiseExceptions = false;

            Assert.IsNotNull(SelectedSprite);
            Assert.IsNotNull(UnselectedSprite);

            InConnectors  = new List <SPConnector>();
            OutConnectors = new List <SPConnector>();

            // We can probably assume canvas is ready by this point
            Canvas = FindObjectOfType <SPCanvas>();
            Assert.IsNotNull(Canvas);

            InfoPanel = FindObjectOfType <UIOverlayInfoPanel>();
            Assert.IsNotNull(InfoPanel);
        }
 private void Start()
 {
     Canvas = FindObjectOfType <SPCanvas>();
     Assert.IsNotNull(Canvas);
 }