void Awake() { tileGridBuilder = GetComponent <TileGridBuilder>(); tileGroupManager = GetComponent <TileGroupManager>(); tileAnimationManager = GetComponent <TileAnimationManager>(); tileGridUpdateManager = GetComponent <TileGridUpdateManager>(); }
private static void MakeTileGridBuilder(SpaceMapGraph map, Shape2Graph shape) { var path = Selection.activeObject == null ? null : AssetDatabase.GetAssetPath(Selection.activeObject); if (string.IsNullOrEmpty(path)) { return; } if (File.Exists(path)) { path = Path.GetDirectoryName(path); } path += "/Grid.prefab"; //Debug.Log(path); //Debug.Log(Application.dataPath); var builder = TileGridBuilder.Create(map, shape, RoundType.Rect); var prefab = PrefabUtility.CreateEmptyPrefab(path); PrefabUtility.ReplacePrefab(builder.gameObject, prefab); Object.DestroyImmediate(builder.gameObject); }
void Awake() { tileGridManager = GetComponent<TileGridManager>(); tileAnimationManager = GetComponent<TileAnimationManager>(); tileGridBuilder = GetComponent<TileGridBuilder>(); }