So I’m new to editor scripts, but this might be something pretty simple -
What I’m trying to do is make a ladder based out of several sprites stacked on top of each other, according to the height.
I currently do something like this on Start()
for (int i = 0; i < height; i++) {
GameObject piece = Instantiate(ladderUnitPiece, transform.position + new Vector3(0, i + 0.5f, 0), Quaternion.identity) as GameObject;
piece.transform.parent = transform;
}
But I’d like to be able to create this in the editor, and not at runtime. Preferably with a little + and - buttons next to the transform’s pivot in the scene view. Each time I click the + button, the height int increases and a new ladderUnitPiece is instantiated and moved into position.
That kind of thing. Where would be a good place to start on how to create buttons in scene view that do something like this?
Cheers!
Jesse