I’m trying to make a level editor for my 2D game, and I’m doing it with Unity to include it with the game. I’m using the Orthello Asset to develop the game.
I have a preview of the level but the level is bigger than the preview frame, so I need a scrollbar. But with the GUI scrollview, we can only use GUI element and my level is build with OTSprite.
So I’m searching for a solution. Should I try to make my own scrolling script (I think I’m not skilled enought to do this…) or is there a way to display an OTSprite in a GUI Button?
Or maybe there’s another trick?
I’m very new to Unity and C# programming, however I think I had a similar problem. I have a bunch of assets (simple sprites) which I wish to scroll.
My solution was pretty simple - I use the GUI scrollbar to retrieve a value and then use this to offset the location of each element as I draw it. I don’t have that many objects, and I position them all every frame anyway, so it’s not a big deal.
If you are scrolling all objects in your scene uniformly (ie. no parallax or fixed elements), it may be simpler to move the camera instead.
I hope this helps - sorry I couldn’t offer more, I don’t know Orthello unfortunately.