Search:

  • Portfolio
  • Blog
  • About
  • Contact

Simple State Saving

Posted date:  March 21, 2012


March 21, 2012

Saving the state of a GameObject(read MonoBehavior) via traditional serialization is not possible so I whipped up a simple approach that allows easy saving and loading of data contained in a class for simple state storage and retrieval via PlayerPrefs. First, create a super-simple, serializable class that you can use as your data container in your GameObject:

[System.Serializable]
public class HeroStats{
	public float health;
	public float magic;
	public float money;
	public bool talkedToWizard;
	public bool defeatedRedDragon;
	public bool hasMagicKey;
}
Next add an instance...

Read More

The best darn throwable object spinner

Posted date:  March 9, 2012


March 9, 2012

Nothing more I can say about this release other than its a draggable object rotator that supports extremely responsive throw mechanics. Plop it on an object (don't forget a collider to allow touch interaction), touch and drag on the model on your mobile device to rotate the model around and flick your finger to send it spinning with extremely natural velocity. Don't forget to set your frame rate to 60 FPS with Application.targetFrameRate = 60 to ensure silky smooth response. This solution has an expectation barrier in that rotation is based on the object's x and y axis and not camera/screen...

Read More

Unity needed cmd-g and ctrl-g

Posted date:  March 4, 2012


March 4, 2012

I've found my left hand hitting the trusty "make group" key combination in Unity more and more whenever I'm deeply focused on organizing and structuring scene objects and I've had it with disappointment. Create an empty game object, put it where I need it, plop children under said new empty game object is so yesterday when it comes to organizing in Unity now. Drop my new group maker into your unity projects and organization is a simple press of command-g (control-g on PC) away! The object showing in your scene view with a transform gizmo attached when you hit command-g (control-g on PC) is where...

Read More

Next Page »


  • Recent Posts

    • Simple State Saving
      Saving the state of a GameObject(read MonoBehavior) via traditional serialization...
    • The best darn throwable object spinner
      Nothing more I can say about this release other than its a draggable object rotator...
    • Unity needed cmd-g and ctrl-g
      I've found my left hand hitting the trusty "make group" key combination in Unity...
  • Categories

    • Augmented Reality
    • General Babble
    • Unity





© 2012 Bob Berkebile (PixelPlacementâ„¢) and additional respective holders all content used with permission