- Home /
Terrain Toolkit API
Hello.
I've been recently trying to use the Terrain Toolkit at runtime and I stumbled upon this code in Java:
var go : GameObject = GameObject.Find("Terrain");
go.GetComponent("TerrainToolkit").TidalErosion(25, 50.0, 5.0, 60.0);
It's pretty much the same for all the functions.
When I tried something similar in c#:
go.GetComponent("TerrainToolkit").TidalErosion(25, 50.0, 5.0, 60.0);
There would be no "TidalErosion" or any other TT function.
Am I missing something here?
-Xentarok
There's no terrain toolkit built in to Unity, so are you talking about a third party asset or a script you wrote? Where do you define the TidalErosion function?
Answer by Kinosei · Dec 01, 2015 at 06:22 AM
In C# it's a bit different. You have to do like go.GetComponent<ComponentType>().ComponentFunction()
In this case you might want go.GetComponent<TerrainToolkit>().TidalErosion(25, 50.0f, 5.0f, 60.0f)
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Making changes to a terrian in game 1 Answer
Converting a mesh to terrain 2 Answers
Multiple Cars not working 1 Answer
Hello! I have a problem. How can I make a script to remove the grass when a cube is falling? 0 Answers