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

Pages: [1] 2
1
Support / Re: SetDirty cannot be used during play mode.
« on: April 07, 2017, 02:59:38 am »
Well... lol

Just updated from 5.5 to 5.6 and getting this again.

I've rebuilt index twice, still getting this when I set a sprite sorting order...

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:165)
tk2dUtil.SetDirty (UnityEngine.Object object) (at Assets/[Vendor]/TK2DROOT/tk2d/Code/tk2dUtil.cs:128)
tk2dBaseSprite.set_SortingOrder (Int32 value) (at Assets/[Vendor]/TK2DROOT/tk2d/Code/Sprites/tk2dBaseSprite.cs:183)

2
Support / Re: SetDirty cannot be used during play mode.
« on: February 06, 2017, 10:20:19 pm »
So, we were on 5.4 and somehow the update to 5.5 fixed this.

3
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!

4
Hey, thanks for the info!

We are pushing memory limits but I've tried to keep it sane. Just so I know, when you say, need to delete stuff manually, what do you mean exactly?...

I started out in gamedev on c++ and in 3 years of using unity/c# I've never got too far into messing the the c# GC.  Or do you mean using UnloadAsset or Destroy to manually delete stuff?

5
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!!


6
Support / Re: tk2d:LitBlendVertexColor Vs Unity:Sprites/Diffuse
« on: March 26, 2015, 06:04:13 pm »
2d toolkit Version 2.5.1. The latest on the asset store.

Everything else works fine but we have 1 semi transparent sprite that was using LitBlendVertexColor and it was drawing very wrong after upgrading. http://i.imgur.com/2RUMIkX.png

I switched it to the standard shader and got it looking correct again btw.

7
Support / Re: tk2d:LitBlendVertexColor Vs Unity:Sprites/Diffuse
« on: March 25, 2015, 10:03:43 pm »
Not looked at the source to Sprites/Diffuse, but when LitBlendVertexColor was written there wasn't an equivalent in Unity. The closest equivalent was way more inefficient.

I was going to make my own post but saw this. We upgraded our project to Unity 5 and now the tk2d/LitBlendVertexColor is no longer working properly for me. Are you aware of this and how can we fix it? Thanks!

8
Support / Re: How To Use Tilemaps to Create Prefabs??
« on: March 15, 2014, 05:15:38 pm »
Hey thanks,

Gonna start tackling this today, got like 5 things on my plate right now for this game...  Recent vid if you are interested: https://www.youtube.com/watch?v=O0BJLhio7_A

I still don't understand what you mean by recursion... To me recursion is something like;
DoFoo(node)
{
    ...
    DoFoo(node.nextNode);
}

As for as platform specifics. I'm guessing the most straight forward way is to create separate prefabs sets and at start-up load the proper set based on the tk2d platform setting or device res. This is not a problem for the spawnmanager, albeit a lil sloppy, hehe.

9
Support / Re: How To Use Tilemaps to Create Prefabs??
« on: March 14, 2014, 08:30:23 pm »
Ok cool, thank you...

I've never really done any asset loading and saving outside of text/xml and bin read/write. I've never even created a prefab from code, hehe, I guess I'll have to look thru the docs some.

I'm not sure what you mean by saving the game objects recursively, you mean like recursing up a tree, where you call whatever function inside itself, moving to children and parents?

I think I mostly get it, just not totally clear. I think you are saying...

1. Created and edit the tilemap object, commit it into a chunk.
2. Instantiate a clone of the entire RenderData object(RenderData->Layer0->Chunk0)
     Don't need to do anything with the tilemap object or the asset data files?
3. Save this clone as a prefab"AssetDatabase.CreateAsset(clone, "path");" ???
    This creates a .prefab???
4. Find all meshes and mesh collider from the clone "GetComponentsinChildren<Mesh(Meshfilter??) / MeshCollider>", and add them to the new saved prefab with "AssetDatabase.AddObjectToAsset(mesh, "path");" ??

At that point how does the mesh know which sprite cords to pull from the collection atlas? Or is that part of the meshfilter or something that gets saved out?

Thank you so much btw!!!!

10
Support / Re: How To Use Tilemaps to Create Prefabs??
« on: March 14, 2014, 05:24:45 pm »
Wouldn't that be extremely expensive to have multiple entire Tilemap objects?

I need to build 100s of different 2d platforms out of the same set of tiles. If you can guide me where to start or give some pointers I can prob figure it out...

I know I'll need to somehow save out the "chunk" mesh and mesh collier, and somehow make sure the "chunk" references the right sprites from the atlas.

11
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

12
FAQs / Re: Register your copy and get download access.
« on: April 19, 2013, 01:26:52 am »
Hi, Is there an estimate on how long it typically takes to get activated on the private forum? I submitted the request earlier today.

I've been using 2dtk for a while now and I need some guidelines on parallax scrolling but I can't access the forum topic :-(

Thanks!

13
Support / Re: Best way to dice sprites for iOS?
« on: February 18, 2013, 01:03:15 am »
Hey, I actually already had most of my enemy animations diced already to save a bunch of space, and they worked pretty well as most of them are only a few frames, but I was starting to notice about a 10 fps drop when a lot of them came on screen and my memory was gradually increasing beyond acceptable limits. I may try to get away with dicing the character anims as I expect that will have less of an impact and I was able to save half an atlas by dicing the character anims.


PS> The memory hike is not from having more enemies at once, most of my objects are pooled. Although in all fairness, the enemy script they use is a mess and could be doing something crazy but I haven't had time to properly profile that code. Anyway, I'll do some testing with and without dicing different anims and see where I land. Thanks again.

14
Support / Re: Best way to dice sprites for iOS?
« on: February 17, 2013, 08:07:46 pm »
Hey thanks again, I never actually noticed any warnings. I read in the documentation that scaling a sprite or doing something that would cause the mesh to change is expensive so I assumed the same was true for diced sprites. Guess I was just hoping that there was some super cool optimization 2dtookkit did when animating diced sprites, bc these people are killin me when it comes to wasted texture space, hehe.

15
Support / Re: Best way to dice sprites for iOS?
« on: February 17, 2013, 10:22:20 am »
Forgive me if I should make a new thread but this is a related question.

How does dicing sprites affect performance on animations? Is the entire mesh being changed every frame? And how does that affect memory?

Thanks again!

Pages: [1] 2