public static Transform addFlag(Vector3 point) { RecastGraph newGraph = LevelNavigation.addGraph(); FlagData flagData = new FlagData(string.Empty, 64, true); LevelNavigation.flags.Add(new Flag(point, newGraph, flagData)); LevelNavigation.flagData.Add(flagData); return(LevelNavigation.flags[LevelNavigation.flags.Count - 1].model); }
// Token: 0x060023BB RID: 9147 RVA: 0x000C63D4 File Offset: 0x000C47D4 public Flag(Vector3 newPoint, RecastGraph newGraph, FlagData newData) { this._point = newPoint; this._model = ((GameObject)UnityEngine.Object.Instantiate(Resources.Load("Edit/Flag"))).transform; this.model.name = "Flag"; this.model.position = this.point; this.model.parent = LevelNavigation.models; this._area = this.model.FindChild("Area").GetComponent <LineRenderer>(); this._bounds = this.model.FindChild("Bounds").GetComponent <LineRenderer>(); this.navmesh = this.model.FindChild("Navmesh").GetComponent <MeshFilter>(); this.width = 0f; this.height = 0f; this._graph = newGraph; this.data = newData; this.setupGraph(); this.buildMesh(); }