private void Start() { sourceRect.width = targetTexture.width; sourceRect.height = targetTexture.height; x = Mathf.FloorToInt(sourceRect.x); y = Mathf.FloorToInt(sourceRect.y); width = Mathf.FloorToInt(sourceRect.width); height = Mathf.FloorToInt(sourceRect.height); targetTexture2D = new Texture2D(width, height); startNodeMarkerLoc = Vector3Int.zero; endNodeMarkerLoc = Vector3Int.zero; pathDataManager = FindObjectOfType <PathDataManager>(); pathDataManager.WorldSize = new Vector2Int(width, height); // set all variables Render(); // render it after procgen has occured ProcGen(); //generate the pathdata nodes }
private void Start() { CharacterRB = GetComponent <Rigidbody>(); Pathfinding = FindObjectOfType <PathFinding>(); PDM = FindObjectOfType <PathDataManager>(); }
//variables // Start is called before the first frame update private void Start() { PDM = FindObjectOfType <PathDataManager>(); //assign pdm to pathdatamanger }
private void Start() { renderer = GetComponent <Renderer>(); PDM = FindObjectOfType <PathDataManager>(); //CoalatePerlinNoise(); }
private void Start() { PDM = FindObjectOfType <PathDataManager>(); }