- Home /
Force Render
I currently have a grid and would like to highlight a path then pause and if I unpause unhiglight and show the next path. offcourse I could add all paths to an array highlight a path wait a few seconds unhighlight and repeat till I have no paths to show. But I rather do something like this.
foreach(ci.Tile teamLocation in teamLocations) {
if(teamLocation == null) continue;
foreach(GameObject resource in resources) {
checkCount++;
GridNode startNode = teamLocation.tileObject.GetComponent<GridNode>();
GridNode endNode = resource.GetComponent<GridNode>();
if(astar.search(startNode.position, endNode.position, wg.tileGrid, defAsp)) {
highlightNodes(astar.getPath().ToArray());
GameObject.FindWithTag("MainCamera").camera.Render();
UnityEngine.Debug.Break();
if(validatePath(1,astar.getPath(),wg.tileGrid)) {
validCount++;
}
unhighlightNodes(astar.getPath().ToArray());
}
}
}
and on the UnityEngine.Debug.Break(); I have a breakpoint but the game isn't showing anything.
Someone knows how to force unity to render ?
Your answer
Follow this Question
Related Questions
When are you supposed to manually call Render on a camera? 0 Answers
Changing the Camera viewport rect results in resizing the objects rendered by the specific camera ? 1 Answer
How to build a line drawing method called in Update, similar to Debug.DrawLine () 3 Answers
What does "clear" mean under Camera.Render -> Drawing in the profiler 2 Answers
Using VideoPlayer with a Camera as the target ignore other camera's depth. 1 Answer