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.


Messages - oug

Pages: [1] 2 3
1
Support / Any optimization for 2018?
« on: October 15, 2018, 11:23:48 am »
I see some deprecated and obsolete-warnings in my Unity 2018.2.xxfx, are there any plans on optimising? See below:

Assets/TK2DROOT/tk2d/Code/Camera/tk2dCamera.cs(663,138): warning CS0618: `UnityEngine.Rendering.GraphicsDeviceType.Direct3D9' is obsolete: `Direct3D 9 is no longer supported in Unity 2017.2+'

Assets/TK2DROOT/tk2dUI/Code/Controls/tk2dUITextInput.cs(375,46): warning CS0618: `UnityEngine.TouchScreenKeyboard.done' is obsolete: `Property done is deprecated, use status instead'

Assets/TK2DROOT/tk2d/Editor/Camera/tk2dCameraEditor.cs(660,19): warning CS0618: `UnityEngine.GUILayer' is obsolete: `This component is part of the legacy UI system and will be removed in a future release.'

Assets/TK2DROOT/tk2d/Editor/tk2dAutoRebuild.cs(51,21): warning CS0618: `UnityEditor.EditorApplication.playmodeStateChanged' is obsolete: `Use EditorApplication.playModeStateChanged and/or EditorApplication.pauseStateChanged'

2
Hi all,

Sorry for the late reply, I just received a notification on a new post and I didn't see the post of madfatcat, sorry. Anyway, I've been in contact with unikron and we've come up with the following solution:

Quote
Got to the bottom of it. Basically tk2d has a watcher to help unload unused textures when a scene has changed (Unity didn't do a great job with that and basically ended up running out of memory...) when platform collections are used.

So, whats happening here is -
1. Sprite starts up
2. You grab material that gets spawned
3. Listener destroys material
4. Turns pink

If you don't have any issues with memory you could try turning it off tk2dEditorSpriteDataUnloader, comment out the first line. If you do there might be other not so pleasant ways around this.

You can try this, it seemed to work for me. For those concerned about memory load unikron mentioned:

Quote
Disabling the tk2dEditorSpriteDataUnloader shouldn't cause any major issues in 64 bit versions of Unity (i.e. 5.x), it is there to reduce memory consumption in 32 bit versions.

It looks like the when SpriteDataUnloader runs has changed in 5.3. Nothing to worry about - I'd just leave it off until (if ever) it becomes an issue. Basically its supposed to unload all materials when a scene is unloaded, but Unity 5.3 introduced multiple scene loading and this is now moot because of that.

Hope to have helped some! Good luck and happy devving!

3
Releases / Re: 2D Toolkit 2.5.7
« on: December 04, 2016, 08:29:16 pm »
Yes! Amazing! I was just wondering when the big update would come! Thanks!!!

4
Cool. Thanks for the reply!

5
Support / Is there a(n easy) way to justify text in the tk2dTextMesh?
« on: March 24, 2016, 04:42:53 pm »
/topic

:)

6
Thanks! I've replied again with some more questions. Awesome to get a bit more insight in the inner workings of tk2d and Unity. :) Let's hope we can get to the bottom of this as well.

7
Not to be pushy, but were you able to have a look at the stuff I sent? Keep up the good work!

8
Support / Re: Is 2D Toolkit still alive?
« on: March 02, 2016, 12:02:59 pm »
In case the swift response of unikronsoftware hasn't answered your question sufficiently: I can surely testify that tk2d is a great toolkit for any 2D developer within Unity. The support is swift and great, and the toolkit is still leagues better than the default 2D stuff within Unity (5.3). I'd say definitely invest the 70-or-so bucks. It'll be worth it!

9
Hi,aug,it's so kind of you.
I'll have a try on your suggestion!Thanks so much.
My pleasure :)

Good luck!

10
Thanks for your reply,oug!
But if I have many platforms like this in a tiled map,do you mean to disable all colliders above the main character in update()?However what if an enemy is on a platform through which the character should be walking?In this case,we should disable the platform collider for the character as well as enable it for the enemy, which gets conflict.

These things have put me crazy.I even think I'd rather write my game with opengl or directx rather than in unity........
Yeah this trick is a bit annoying with a lot of platforms and enemies. What I did was the following:

- Create 2 colliders per platform, one for the enemies and one for the player
- The platform checks (put like a player-check-script on the platform itself) if the player is either above or below the platform
- The script checks (indeed in an update or lateupdate (http://docs.unity3d.com/Manual/ExecutionOrder.html) the position of the player('s feet)
- The platform disables its playercollider when the player is below the platform and
- The platform enabled its playercollider when the player is above the platform
- The enemy-collider is always enabled and doesn't do any checks on the player


This is a simple solution if you have few platforms. If you have A LOT of platforms on screen or in your scene you can do:
a. Either remove all non-visible platforms or disable the player-check-script on platforms not visible by the player
b. Do an area-check from the player that disables any colliders above the player, and enables any colliders below the player (maybe try a simple version with a triggerbox above the player and a triggerbox below the player for instance) within a certain vicinity.

I had a lot of use from the tutorials by Sebastian Lague. He wrote an amazing series on platform controllers using 2d Unity5: https://www.youtube.com/playlist?list=PLFt_AvWsXl0f0hqURlhyIoAabKPgRsqjz Definitely check it out.

And yeah, I agree: Unity isn't the optimal solution for 2d games. But with the use of tk2d, I've been able to create multiple 2d apps and games in a jiffy :) Keep at it, it'll be worth it in the end :)

(I've made these as a small one day / one week project to test out the approach by Sebastian Lague and I think it's valid: https://www.youtube.com/watch?v=3eYa0aYzQWc & https://www.youtube.com/watch?v=TA5WNqIOGEE)

11
Support / Re: tk2dSprites render pink when changing scene / using LoadScene
« on: February 24, 2016, 08:44:12 am »
Sorry for the late reply - why are you using GetComponent<Renderer>().materials instead of sharedMaterials?
ps. happy to look at the repro if you send it to support at unikronsoftware dot com.
No worries, we are all busy men :). Thank you for your reply.

Well, I'm actually not REALLY using GetComponent<Renderer>().materials. I'm using an addition to LeanTween that allows me to alpha-tween tk2dSprites really easy (and this breaks the material as well, comparable to the GetComponent<Renderer>().materials).

But I'll send you a clean repo via mail. Hopefully you can shed some light on this.

12
A simple solution would be to create a script that disables the collider of the platform when the player is below the collider and re-enables the collider when the player is above the collider.

It might not be the most pretty solution, but it works like a charm (I've used this a lot in platformers).

13
Support / Re: Two Font Sizes not Working
« on: February 22, 2016, 08:49:14 am »
Does it work with a different font (let's say Arial)?
What program do you use to create the font-atlasses?

14
Support / Re: Two Font Sizes not Working
« on: February 19, 2016, 09:05:54 am »
Are you using platform support (4x 2x 1x)?

15
Support / Re: tk2dSprites render pink when changing scene / using LoadScene
« on: February 09, 2016, 04:35:17 pm »
Okay I did some more research regarding this issue. If I use LoadSceneMode.Additive when loading the "Game" scene (this way the "Init" scene doesn't get destroyed), everything works peachy ( SceneManager.LoadScene("Game", LoadSceneMode.Additive) )

However as soon as I Unload the "Init" scene in the "Game" scene (  SceneManager.UnloadScene("Init") ), the renderer looses it's material and the texture turns pink again.

So yeah, still not sure where exactly the problem lies. I'll keep on it, I guess.

Pages: [1] 2 3