2D Toolkit Forum

2D Toolkit => Support => Topic started by: x0b on August 02, 2013, 08:05:51 pm

Title: Default settings
Post by: x0b on August 02, 2013, 08:05:51 pm
Hi,

Is there a way I can set the default anchor mode for a Sprite for when I create one using the Unity editor as opposed to in script?

Currently it defaults to centre but I like to work from the convetional bottom left coordinate system.

Also, would setting up some default camera settings be possible? Origin for example.

Thanks!
Title: Re: Default settings
Post by: unikronsoftware on August 02, 2013, 08:19:47 pm
tk2dCameraUtil.cs -
Change
public OrthographicOrigin orthographicOrigin = OrthographicOrigin.Center;
to
public OrthographicOrigin orthographicOrigin = OrthographicOrigin.BottomLeft;

and tk2dSpriteCollection.cs -
   public Anchor anchor = Anchor.MiddleCenter;
to
   public Anchor anchor = Anchor.BottomLeft;

That should cover it - just remmeber you'll need to apply the changes again after updating.
Title: Re: Default settings
Post by: x0b on August 04, 2013, 07:02:28 pm
Excellent, thanks  :)