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

Pages: [1] 2 3
1
Support / Re: 2DTK won't load in Unity 5?
« on: April 29, 2015, 08:14:46 am »
I have deleted those bugged scripts and rebuilt it. This time it gives me error messages regarding to 2dtk itself. Mostly were namesspace already containing definition.


Assets/TK2DROOT/tk2dTileMap/Code/tk2dTileMap.cs(7,13): error CS0101: The namespace `global::' already contains a definition for `tk2dTileFlags'

Assets/TK2DROOT/tk2dTileMap/Code/tk2dTileMapBuilderUtil.cs(8,29): error CS0101: The namespace `tk2dRuntime.TileMap' already contains a definition for `BuilderUtil'

There were 14 of these namespace error for tk2d and one more for something else (also namespace). Seemed like an easy fix. But where do I start?

2
Support / Re: 2DTK won't load in Unity 5?
« on: April 28, 2015, 11:24:01 am »
But the thing is 2dtk doesn't even load in menus. I have my code working in previous Unity and haven't touch it ever since. It's after several month that I've update this to Unity 5 and it stopped loading. Plus, the code that has compile errors are not even mine -- it's in the standard assets. Please see screenshot.



tk2d not loading (no detailed menu)


The scripts that has problem is under MeshCombineUtility which is not even my code.

Please help.


3
Support / 2DTK won't load in Unity 5?
« on: April 11, 2015, 12:30:20 am »
Today I updated my Unity to version 5. And it requires me to update the current project. After updating and re-importing all the assets I found my project not working. It turns out none of my 2DTK script gets loaded, it says I need to fix compile errors, however these errors are from the 2DTK script itself.

When I go to the 2DTK menu there are only two options: Advanced and SetupForJs, there is an Integrity Checker under advanced and if I run it it will say succeed. However none of the scripts is working. What's wrong?


There is one of the errors displayed that doesn't seem to be related to 2DTK, however it only shows up after the project is being upgraded.

Assets/Standard Assets/Scripts/MeshCombineUtility.cs(27,74): error CS1061: Type `UnityEngine.Mesh' does not contain a definition for `GetTriangleStrip' and no extension method `GetTriangleStrip' of type `UnityEngine.Mesh' could be found (are you missing a using directive or an assembly reference?)


Can someone help? Thanks.

4
Support / Particle system rendered behind sprites?
« on: June 21, 2013, 09:56:01 am »
I have a particle system that I want to render in front of a sprite, but the particle system always appears to be behind the sprite no matter what Z axis value I set, even I put the particle system obviously in front of the sprite.

Strangely, this problem happens in the scene view and the built executable, but not in the editor game view. So the funny fact is that it looks all good in my game view with particle rendered in front of the mesh in the unity editor but once I use build and run the render order have all gone wrong again. I try to figure out the problem but in the scene view it's still wrong, I don't know what to do.

Any advise? Thanks

5
Support / Re: Game resolution problem problem when building and run
« on: June 10, 2013, 02:57:40 pm »
Thanks it worked. I just have to change the parameter initialCameraOrthoSize and initialCameraHeight to my default so it scales correctly.

6
Support / Re: Game resolution problem problem when building and run
« on: June 10, 2013, 02:07:26 pm »
No, but you can change the ortho size of the camera to make things pixel perfect again. Use something like this to rescale it to be always pixel perfect.

Code: [Select]
float pixelHeight = camera.pixelHeight;
float newOrthoSize = pixelHeight / (float)initialCameraHeight * initialCameraOrthoSize;
if (camera)
{
camera.orthographicSize = newOrthoSize;
}


Where should I put this code?
The resolution window only appears after I use build and run:



7
Support / Game resolution problem problem when building and run
« on: June 10, 2013, 11:38:03 am »
So I have establish a scene using collection of value 2.5 target ortho size and 900 target height. So the game runs pixel perfectly at ortho camera size of 2.5 and resolution of 1600x900.

When building and running the game there is a window asking you to choose resolution, defaulted at 1600x900, however you could choice other resolutions. The problem is, now matter what resolution I choose, it display rougly the same area of game but those textures are either up sampled or down sampled, the aspect ratio is kept for textures.

This simply chagnes the window size but didn't actually change the resolution. I want the window to display more content at higher resolution and less at lower resolution but those sprites should be pixel perfect in all senarios. What should I do to achieve this? Clearly I cannot change the target height in the collection just to fit one resolution and it breaks the scene anyways.

Please advice.

8
Support / Re: URGENT: with spine with 2dtk in unity problem.
« on: June 03, 2013, 02:43:35 pm »
Well if you can't change the camera size, and you know that the spine skinned mesh creates 1 pixel = 1 world unit, surely you can simply scale the spine object to fit whatever camera you're using.
The scale on the spine object to match an ortho camera should be (on x, y & z) :
2.0 * ortho size / native resolution height.

I finally had some talk with the spine developer, seemed he had some problem figuring out the 2dtk atlas documentation,


Here are his post:
The code that converts a TK2D sprite collection into a Spine atlas is here:
https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-tk2d/Code/tk2dSpineAttachmentLoader.cs
I am guessing the tk2dSpriteCollectionData field "halfTargetHeight" has something to do with the target ortho size. Do you know? The docs are not very helpful:
http://www.unikronsoftware.com/2dtoolkit/doc/2.00/html/classtk2d_sprite_collection_data.html#a8c9ee0897498269327432bb5e16c2f69

Not sure why you need to scale it down so much, but instead of using the Unity transform to scale, you can scale the skeleton data asset. You can set this in the Unity inspector. If we figure out how to determine a scale from the TK2D sprite collection based on the target ortho size, then maybe we can get rid of the scale in the skeleton data inspector and set the scale appropriately:
https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-tk2d/Code/tk2dSpineSkeletonDataAsset.cs#L47


Any insight on this? I'm no developer on either so it's hard to say that I understand those code :(

9
Support / Re: Something about physics...
« on: June 02, 2013, 03:16:22 pm »
I think one (possibly the most logical) way to completely avoid it is to use your own custom character controller. Checking my bug logs, I don't think I ever submitted a bug report to Unity - I know I built a test case, but I can't for the life of me remember what I did with it.

I just read something about the character controller. So for my 2D game, do I need a rigidbody at all if I use character controller? Also the character controll that goes with unity is in javascript, I do know javascript but I feel unconfortable having javascript code in my C# code. Can I even mix using these two? Or do I really need to write my own character controller for better sake?

10
Support / Re: Something about physics...
« on: June 02, 2013, 04:47:10 am »
You could use the static sprite batcher, but you couldn't possibly merge EVERYTHING in your level could you?

No, since my level is huge and I have slipt the batcher in to subsections to avoid unnecessary rendering. But it should at least avoid the problem for the most part.

Just wondering, if there is no current work around for this unity issue, how do 2D games solve it in general if there is a lot flat ground like in mine? Did unity say anything about it?

11
By that you mean the outline? All generic techniques to display outline require custom data, and are pretty specific, or require a custom shader + distance field, and only works with certain kinds of things. I don't think there is any general technique which will work well in all cases, AND run well on bad hardware, eg. mobile phones.

Just found another post http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,503.0.html
It's kind of like this effect demonstrated.

I'm desining game on PC so performence shouldn't be a concern. I think of this because there was a editor that just made an update and in that update when I mouse over a sprite it will show its outline, and I thought that is pretty cool.

12
Releases / Re: 2D Toolkit 2.0 final
« on: June 01, 2013, 06:45:02 pm »

You should update every asset via "Assets > Import Package...", otherwise it tends to crash.

No use. Crush as always...

13
Releases / Re: 2D Toolkit 2.0 final
« on: June 01, 2013, 06:08:11 pm »
Unity crushed immediately after double clicking .unitypackage, it shows decompressing package for a second and then crushed.

In fact, that's not the only time it happened, unity seems to like to randomly crush with pakcage import, I have suffer this for quite a bit. Truly annoying for this aspect of unity

14
Support / Re: Something about physics...
« on: June 01, 2013, 06:04:47 pm »
The "jump" issue straddling collider boundaries is a known Unity issue. You can reproduce it with 2 Unity boxes at default scales side by side, and a box jumping on it. I don't know of any workaround to this except just mitigating it somehow, or using your own raycast physics.

I have a feeling the thinkscroller plugin is moving objects to achieve parallax - that might not be the best way to do it when you have physics objects in there, it could cause serious issues, as you've probably already found.

You can rebuild it with more native resolution settings. It might be better if you're using doppler ,etc.

Btw, I have another question, for the physics issue in unity, can I use the static sprite batcher to merge all the colliders into a single one? Is there such a feature?

15
Support / Just had an awesome feature in mind, can 2dtk support it?
« on: June 01, 2013, 06:00:26 pm »
Just thought of that if a sprite can show its contour would be totally awesome, can be conbined with many situations to make cool effect, for example, is an object is selected we can have highlight contour arond it (I mean the actual shape, not the rectangular texture).

Makes sense to you? Can you consider supporting this feature?

Pages: [1] 2 3