// Use this for initialization void Start() { #if UNITY_STANDALONE_WIN meshRenderer = GetComponent <MeshRenderer>(); #endif designerManager = DesignerManager.GetInstance(); if (designerManager == null) { Debug.Log("CreateMapElementOnIt: designerManager is null!"); } mapElementFactory = MapElementFactory.GetInstance(); if (mapElementFactory == null) { Debug.Log("CreateMapElementOnIt: mapElementFactory is null!"); } }
void Start() { meshRenderer = GetComponent <MeshRenderer>(); Material[] mats = meshRenderer.materials; originalColor = new Color[mats.Length]; for (int i = 0; i < mats.Length; i++) { originalColor[i] = mats[i].color; } designerManager = DesignerManager.GetInstance(); if (designerManager == null) { Debug.Log("MapElement: DesignerManager is null!"); } mapElementFactory = MapElementFactory.GetInstance(); if (mapElementFactory == null) { Debug.Log("MapElement: mapElementFactory is null!"); } }