Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Ultroman

Pages: [1]
1
Support / tk2dCamera is null in Start()
« on: March 20, 2016, 05:32:53 pm »
EDIT: I noobed out on this one. The solution was tragicomical. If you want to know what was wrong, it's in the next post.

Hello.

Any idea why it would say that my MainCamera-variable (a tk2dCamera) is null, when I try to access it in the Start() method of my MainGameScript? (see my attachment)

It works fine inside Unity, but when I build for PC, and run it, it throws nullpointer exceptions at me, for trying to read the position of the camera in Start().

Code: [Select]
NullReferenceException: (null)
UnityEditor.SerializedObject..ctor (UnityEngine.Object[] objs) (at C:/buildslave/unity/build/artifacts/generated/common/editor/SerializedPropertyBindings.gen.cs:74)
UnityEditor.Editor.GetSerializedObjectInternal () (at C:/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:154)
UnityEditor.Editor.get_serializedObject () (at C:/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:147)
UnityEditor.MaterialEditor.OnEnable () (at C:/buildslave/unity/build/Editor/Mono/Inspector/MaterialEditor.cs:1544)

It worked fine before, when using a normal Unity camera.

Thanks in advance!

2
Support / Animated tiled sprites?
« on: March 05, 2016, 05:47:10 pm »
I just bought tk2d, and while the API seems great, I was sad to see that the Tiled Sprite implementation couldn't be animated. Reading up on it on the forums reveals, that trying to enforce animations on it, creates a lot of garbage, and isn't recommended.

I'm making an open elevator/lift, and wanted to use the Tiled Sprite to make long, animated cables running up and down behind the elevator. If I can't use the Tiled Sprite, then I'll have to spawn many of the same Sprite Animators, and do animations on all of them, or use a lot of textures with animated UV-mapping on them, while trying desperately to make them line up and be in sync.

Is there no chance to see an animated Tiled Sprite implementation in the near future? It would be very valuable for things like running water, sandstorms and long moving things like cables :D

Sincerely, Ultroman the Tacoman

EDIT:
Now I just read the documentation on animation, and at the very bottom, a small notes states that you CAN animate a Tiled Sprite. I tried, and as far as my profiler says, it doesn't incur extra allocations. Was this fixed some time ago?

Pages: [1]