public void Unload() { _script.Release(); _script = null; _isReleased = true; _view = null; }
void InitMap() { if (battleEngine.Map != null) { GameMap map = battleEngine.Map; GameObject prefab = Resources.Load <GameObject>(map.Data["Prefab"].StringValue); GameObject go = Instantiate <GameObject>(prefab); go.name = "map"; go.transform.SetParent(Root); _mapView = go.EnsureComponent <GameMapView>(); _mapView.Bind(map); } }