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 - NMD

Pages: [1]
1
Support / SetDirty cannot be used during play mode.
« on: February 05, 2017, 11:33:13 pm »
Hello,

Recently updated 2dtk and am getting this error...

To updated 2dtk, like I usually do, I made a new scene, imported 2dtk, and rebuild index.

Code: [Select]
InvalidOperationException: This cannot be used during play mode.
UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty (Scene scene) (at C:/buildslave/unity/build/artifacts/generated/common/editor/EditorSceneManagerBindings.gen.cs:156)
tk2dUtil.SetDirty (UnityEngine.Object object) (at Assets/[Vendor]/TK2DROOT/tk2d/Code/tk2dUtil.cs:128)

It's coming after an assignment to tk2dbasesprtie.sortingOrder.

I found another post about that particular function(tk2dUtil.SetDirty), but it does not seem to apply here. Thanks!

2
Hi!

We are using 2D Toolkit and have A LOT of high res sprites.

Our current scene loading setup is sort of odd and buggy. I don't want to waste too much of your time detailing things but basically....

To get memory back at the end of each level we had to manually find and destroy everything, then load a "blank" scene that just loads the next.

I'm in the processes of changing things up and trying to figure out the best ways to do so. I'm posting here looking for some 2dtk specific info but any general advice on how to approach stuff would be great.

The new plan is still being worked out but....

All of our scene specific sprites are in their own collections. And all of our sprite objects are prefabs, which use PoolManager to pool instances. We have multiple spawn pools, one for persistent objects that are used though the whole game, then each scene also contains pools specific to that scene only.

At the end of each level we want to be able to destroy the previous spawn pool, along with all of it's sprite object prefab instances. And then LoadLevelAdditiveAsync the next scene which starts up the corresponding spawn pool.

I guess my question is, is there anything I need/can do to ensure that the atlases I no longer need are not taking up texture memory? And do you have any general experience/advice/input?

Thanks!!


3
Support / How To Use Tilemaps to Create Prefabs??
« on: March 14, 2014, 01:14:55 am »
Hello there,

The tile map editor makes a prefect solution to building platforms for my 2D game.

Ideally, I need to build them in a separate scene and use them as prefabs in my spawn-manger in the game.

I found a few posts where you mention stuff like this but it does not seem to apply to the existing system.

This post from a while ago from you would be absolutely prefect for me if you could tell me how to do this...

Quote
1. You create a separate scene, and create a tilemap in there, ticking the Export To Prefab option.
2. Save a prefab into a directory using the newly revealed buttons. This will save the file in there, and create a Meshes directory with the prefab name.
3. In your other scenes, you simply drag this prefab into the scene and use it in whatever way you'd like.
http://2dtoolkit.com/forum/index.php/topic,215.msg848.html#msg848

4
Support / Best way to dice sprites for iOS?
« on: February 02, 2013, 07:08:39 pm »
Hello, I'm working on optimizing a game and have some sprites that need to be diced for the sake of texture wastage.

I'm hoping someone could provide some info on how to determine the best way to dice things particularity as it relates to performance on iPad3/4.

Thanks so much!

5
Support / Upgrade from 1.8 to 1.9
« on: January 29, 2013, 06:00:19 pm »
Hello,

Two weeks ago a project was dumped on my desk and I was asked to optimize it. So naturally the first thing I did was start switching everything over to tk2d sprites. ;-).

At the time I installed 1.8. So far I've only created some collections and modified a bunch of prefabs to use them. Also implemented an object manager which copies the prefab sprite ID's(and some script info) into preallocated prefabs.

My question is, how do I upgrade this project to 1.9 and will it break anything?

Thanks!

Pages: [1]