
Giraffe Copyright (c) 2014 Robin Southern Just call Begin/Add/End as many times or combinations as you need to. The Layer will then draw them on the screen each frame, until it's told not to, or draw them differently. When you want to show things on the screen, you tell the layer how many sprites you want drawn, what they are and where they go. You can attach your own custom MonoBehaviours to this Layer (or do things differently if you prefer) to access it's three main functions Begin, Add and End. The GiraffeLayer MonoBehaviour has only a few options, the atlas to use and the order in drawing on the screen. For each layer, the Giraffe GameObject will have a sub-GameObject with a GiraffeLayer MonoBehaviour attached to it.

In the Editor, there will be a root GameObject containing the Giraffe MonoBehaviour, this is the main Giraffe singleton MonoBehaviour responsible for drawing. A Texture Atlas is used to store the sprites into a single image, it's more efficient this way - A layer will use one Atlas. You can have as many sprites in a layer as you like (within reason of memory and Unity), a mesh is assigned per layer. What do I do?Įssentially, Giraffe is organised into layers, sprites are drawn in a layer. It's very efficient in the sense it's a single mesh per layer, single pass of a material and everything is carefully updated when and if it's necessary to do so. Giraffe uses a technique of building the 2D sprites into a single or multiple meshes, those meshes are rendered in a post Camera rendering process.Īnything rendered in Giraffe will be rendered after all 3D elements, including Unity sprites, or 2D-GUIs (NGUI, DF-GUI, etc.) but underneath the classic Unity GUI, you also won't also see any meshes in the Editor either. Giraffe prefers to draw sprites in code, it’s more flexible and there is much less overhead. Those two GameObjects can show 1 sprite, or a million sprites - it makes no difference to Giraffe. Giraffe does 2D differently, the very minimum it will use two GameObjects with a MonoBehaviour each. There is nothing wrong with it, but it is limiting in some aspects. These types of systems use the traditional Unity approach where 1 sprite, piece of text or button tends to be a complicated GameObject with multiple mono-behaviours approach where it's all created in the Editor. Yes it does, and there are plenty additional plugins for it as well, and they all do a great job. It's very simple to use, small in size and very efficient. Giraffe is a framework/addon/library/tool to allow you to draw 2D sprites directly onto the screen.

#Giraffe simple drawing how to
Want this video in your own language? Check out my video to see how to do it.Giraffe - Minimal 2D drawing framework for Unity What on Earth? This drawing tutorial is aimed at beginners, teenagers and anyone wanting to learn to draw animals.Ĭheck out another animal drawing tutorial – How to Draw a Frog MUSIC I also show how to create the pattern of the giraffe’s body so that it looks convincing. Drawing a Giraffe has never been such fun.

I show how to work out the length of the legs and neck and how to sketch this is some detail. I explain how to create oval shapes to represent the body and top part of the animal’s legs. In this art tutorial I explain how to draw a giraffe starting from basic shapes. Drawing a giraffe will be very easy if you follow this pencil drawing tutorial for beginners.
