private void Start() { mapElementFactory = MapElementFactory.GetInstance(); if (mapElementFactory == null) { Debug.LogError("DesignerManager: mapElementFactory is null!"); } }
// 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() { #if UNITY_ANDROID saveBtn = androidSaveBtn; savePanel = androidSavePanel; saveName = androidSaveName; scarab3part = androidScarab3part; scarab2part = androidScarab2part; panel = androidPanel; clear = androidClear; delete = androidDelete; #else saveBtn = windowsSaveBtn; savePanel = windowsSavePanel; saveName = windowsSaveName; scarab3part = windowsScarab3part; scarab2part = windowsScarab2part; panel = windowsPanel; clear = windowsClear; delete = windowsDelete; #endif deviceCreatedMapFileLocation = Application.persistentDataPath + SharedData.deviceCreatedMapFileLocation; mapElementFactory = MapElementFactory.GetInstance(); if (mapElementFactory == null) { Debug.LogError("DesignerManager: mapElementFactory is null!"); } startPosition = webCreator.StartPosition; objectMap = new GameObject[webCreator.RowCount, webCreator.ColumnCount]; actMap = new MapElement[webCreator.RowCount, webCreator.ColumnCount]; for (int i = 0; i < actMap.GetLength(0); i++) { for (int j = 0; j < actMap.GetLength(1); j++) { actMap[i, j] = MapElement.Edge; Vector3 placePosition = new Vector3(startPosition.x + j * SharedData.widhtUnit + SharedData.widhtUnit / 2, 0, startPosition.z - i * SharedData.widhtUnit - SharedData.widhtUnit / 2); GameObject edge = Instantiate(edgeModel.gameObject, placePosition + new Vector3(0, edgeModel.ModelGround, 0), edgeModel.GetQuat(), transform); objectMap[i, j] = edge; } } }
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!"); } }