In the final 2 hours last night before I headed to slumberland, I managed to rework all the assets for Pitch, and build the Splash Scene over from scratch, and I think that it turned out pretty well. I am going to give a quick rundown/tutorial on things here both to add more non-rant content to my blog, and to have it as a reference for myself for future projects. :D
First things first, I auto-cropped all of my texture pieces individually with GIMP, leaving me with a folder of images which I then tossed into CodeAndWeb's TexturePacker Pro (Which is worth every penny for the Pro license!) and exported a Unity - Texture2D sprite sheet and packed PNG texture file.
Then I grabbed the TexturePackerImporter C# script from the Unity Asset Store. It's available for Free, and simplifies the process of getting your sprites into Unity greatly. Once I had the TexturePackerImporter.cs file in my Unity Project under the Editor folder, I was then able to drag in my sprite sheet and packed texture files (textures.tpsheet and textures.png) right into my Assets and the TexturePackerImporter script went to work and sliced up the packed textures into nice little sprites for me to use in Unity. Excellent. HUGE time-saver.
The last iteration of this project I had sliced my textures manually, and it took me a couple hours to do. This iteration took me all of 3 minutes, and that time was mostly for my LAN folder browsing! Thank you to CodeAndWeb GmbH!
Now, with the sprites in my Unity project, I now started with a fresh scene, and added a UI Image to my project which adds in the Canvas and EventSystem objects which are necessary to drive things with the new Unity UI.
Next, I dragged my splash sprite from my imported assets into the Image Component's Source Image field and clicked on the Set Native Size button to quickly set the Rect Transform's dimensions to my source image's dimensions.
Then I opened the Animation window with Ctrl+6 and clicked on Add Property button and added a key frame to the Image.Color property, and then tweened the Color.a property from 0.0 to 1.0 to fade in, then a few seconds later in the animation, a tween from 1.0 to 0.0 to create a fade out.
At this point, all I need to do (and have not done yet) is toss a new Script on my Main Camera and use a Coroutine to wait the duration of my animation and then call Application.LoadLevel to load in my next scene. And Boom, my Splash Scene is complete.
(The Splash Scene in Pitch is actually more complicated than this, but the same techniques shown here were used for all the elements. I'm just using several animations and Images in the Pitch Splash Scene)
Showing posts with label ui. Show all posts
Showing posts with label ui. Show all posts
Wednesday, March 18, 2015
Splashing Around
Labels:
creating splash scene unity,
devlog,
experiment,
game development,
indie,
indie game,
pitch,
splash scene,
texturepacker,
texturepackerimporter,
tutorial,
ui,
unity,
unity tutorial,
unity5
Friday, March 6, 2015
Unity wtf Unity?!
Unity 5 has had me pulling out my hair trying to solve a very simple task. (Animating a sliding menu panel on a button click event) It turns out that somehow the button I created for the task somehow was screwed up. I had recreated the animation stuff at least 7 times and each time I got the wrong results. (Animation played backwards, when it was not being told to do so)
My wife jumped in and just created a new button and linked it up to the animations and everything worked fine. So, re-styled her button like mine, and removed my button, and that completes the scene.
I have spent more time trying to solve this one stupid thing than I've spent on the rest of the game (which is very near to completion now) and it was nothing I did wrong, nothing I could have done to change it, just a stupid fluke in Unity 5's wonderful new UI system. Go figure!
My wife jumped in and just created a new button and linked it up to the animations and everything worked fine. So, re-styled her button like mine, and removed my button, and that completes the scene.
I have spent more time trying to solve this one stupid thing than I've spent on the rest of the game (which is very near to completion now) and it was nothing I did wrong, nothing I could have done to change it, just a stupid fluke in Unity 5's wonderful new UI system. Go figure!
Labels:
black,
devlog,
experiment,
game development,
indie,
indie game,
pitch,
ui,
unity,
unity5
Tuesday, March 3, 2015
Missed a day! Well, sort of...
My crazy sleep schedule has once again become so crazy, that I completely missed being able to post on the 2nd. So a short recap of progress of Flip16.
I managed to figure out what was needed to finish up the main menu scene. Now it's on to designing the level select scene.
I will create a micro-tutorial on how to create a menu scene in Unity using the new UI soonish, and post it up here.
I managed to figure out what was needed to finish up the main menu scene. Now it's on to designing the level select scene.
I will create a micro-tutorial on how to create a menu scene in Unity using the new UI soonish, and post it up here.
Labels:
devlog,
flip16,
game development,
indie,
indie game,
ui,
unity
Sunday, March 1, 2015
Why is the new Unity UI so insane?
Hello, March 2015. My aren't you a crazy cold one aren't you? (About a foot of snow covers everything as far as I can see out my window...)
Well my first encounter with Unity's new UI has left me searching for answers to something that really shouldn't have been a question. What? The retarded over-sized Canvas that gets drawn in the Scene view. What the hell were the Unity devs thinking?
The image above I found in a thread on the Unity forums. Credit to the owner. It is not mine. And I think that it sums up the problem with Unity UI rather perfectly. I'm using the Unity 2D Sprite system to create my game, and then I was going to add the menu using the shiny new UI system, and a hair-pulling, mind-numbing truly baffling situation occurs when one tries to add in a menu. I added in a Button control to my scene, which tosses in the Canvas and EventSystem objects as well. But the Text on the Button never showed up. Why? Because the stupid text was sitting about 4000 pixels off screen!
After a few google searches, I learned that this is the proper behavior of Unity UI. Why? I don't know why. It's stupid. But once you know about this really stupid design, then you can get down to using the seriously powerful and useful Unity UI.
Well my first encounter with Unity's new UI has left me searching for answers to something that really shouldn't have been a question. What? The retarded over-sized Canvas that gets drawn in the Scene view. What the hell were the Unity devs thinking?
| This sums up the problem with Unity UI Canvas pretty well. |
The image above I found in a thread on the Unity forums. Credit to the owner. It is not mine. And I think that it sums up the problem with Unity UI rather perfectly. I'm using the Unity 2D Sprite system to create my game, and then I was going to add the menu using the shiny new UI system, and a hair-pulling, mind-numbing truly baffling situation occurs when one tries to add in a menu. I added in a Button control to my scene, which tosses in the Canvas and EventSystem objects as well. But the Text on the Button never showed up. Why? Because the stupid text was sitting about 4000 pixels off screen!
After a few google searches, I learned that this is the proper behavior of Unity UI. Why? I don't know why. It's stupid. But once you know about this really stupid design, then you can get down to using the seriously powerful and useful Unity UI.
Labels:
devlog,
game development,
indie,
indie game,
rant,
ui,
unity
Subscribe to:
Posts (Atom)