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

Pages: [1]
1
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.

2
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

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

4
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?

5
Support / Changing ortho size breaks prefab?
« on: May 30, 2013, 03:17:27 pm »
I have a prefab consisting of several sprites closely placed together. Those sprites are from collections with same target height and ortho size, but didn't use 2dtk camera, I notice one thing, if the ortho size is changed then the prefab breaks: the distance between those sprites gets longer since the sprite themselves get smaller. I understand the reason for breaking prefab but what should I do to avoid the breaking under different resolution if not using 2dtk camera? BTW I'm don't know about the workfloat of setting up project to run at different resolution if not using 2dtk camera.

6
Support / Something about physics...
« on: May 29, 2013, 04:43:19 pm »
So I started to play around with physics and I noticed a problem: everything is so floaty. I know I could adjust the physics setting but I also ran into some weird physics simulation. Then I read about the unity rigidbody page (http://docs.unity3d.com/Documentation/Components/class-Rigidbody.html), it says using the right size for object or the simulation may become inaccurate.

quoted from the page:

Use the right size
The size of the your GameObject's mesh is much more important than the mass of the Rigidbody. If you find that your Rigidbody is not behaving exactly how you expect - it moves slowly, floats, or doesn't collide correctly - consider adjusting the scale of your mesh asset. Unity's default unit scale is 1 unit = 1 meter, so the scale of your imported mesh is maintained, and applied to physics calculations. For example, a crumbling skyscraper is going to fall apart very differently than a tower made of toy blocks, so objects of different sizes should be modeled to accurate scale.

If you are modeling a human make sure he is around 2 meters tall in Unity. To check if your object has the right size compare it to the default cube. You can create a cube using GameObject->Create Other->Cube. The cube's height will be exactly 1 meter, so your human should be twice as tall.


So then I looked at my collider for player and it's 250x400, which means it's 250 meters x 400 meters! That's huge for a player. So I wanted to adjust to something like 1x2 which is 1 meter x 2 meters, but I also wanted to keep the transform scale to 1 so the only thing I can adjust is ortho camera size.

Here the problem comes, I'm using a normal camera of ortho size of 100, if I adjust it to says 10, everything become very small and then I had to adjust the target ortho size in sprite collection so they became the right size, but the whole scene would be messed up -- there are huge gap apart from everything due to the scaling, and it's unpractical for me to rebuild all the scene. Also I was thinking if using 2dtk camera, in which you can't adjust the ortho size at all, what should you do about the size in regards of physics simulation?

Just want to know you guys' solution since everyone here are making 2D games. Does the size matters for 2D game? It surely matters for 3D but what about our situation? I do need to use some intense physics for possible ragdoll but nothing compares to realistic 3D physics. And to adjust all my objects for a hundred-time's-scale to fit the right size doesn't sound practical, especially if using a 2DTK camera such adjust became impossible if you want to keep the transform scale at 1. How you guys think?

Thanks

7
Support / URGENT: with spine with 2dtk in unity problem.
« on: May 27, 2013, 05:06:15 am »
This is gonna be a long story.

So basically I'm trying to use spine (the skeleton tool under progress, see: http://esotericsoftware.com/) with 2dtk in unity. You probably know spine since the developer said he has discussed things with you regarding the integration before. And I'm having a problem scaling with the skeletong by adjusting the orthosize and target height in sprite collection editor (I'm not using 2DTK camera by the way)

I have already seek support from spine forum but didn't get much luck, still a long story. Please read this link first to get an idea of the situation.

http://esotericsoftware.com/forum/viewtopic.php?f=3&t=713  (please read it carefully as it contains a lot of information, you might go back to look this link if you see things I mentioned before that you need to get a context with)

After reading this you now know I'm having a werid problem that others didn't encounter, and the rebuilding index problem which I have file a report to unity. I don't know if this maybe something 2dtk can help with. You can try downloading the 2dtk runtime on github page: https://github.com/EsotericSoftware/spine-runtimes and create a example to see if the scaling works. From the post you can tell they have committed a new example but that still didn't work for me and my example simple don't show skeleton for them, which confuses me. I have send 2 zip folders to your support email, one is the old project i have (created from scratch tho), another is their newly commited example. Does these two works for you about scaling? What unity version are you using? I'm using 4.1.2f and this is my last resort of seeking help. I'm been stuck on this for more than a week and I need to get a demo done in a month, very urgent.

Please investicate this issue and see if there is anything you might be able to help.

Thanks

8
Support / Way to adjust alphs of a texture in editor?
« on: April 27, 2013, 03:36:19 pm »
Is there a way to adjust alpha of a texture in editor mode? I don't see any related option in either sprite or sprite editor.

The texture itself has alpha channel.

9
Support / Few question regarding sprite rendering
« on: April 10, 2013, 03:31:28 pm »
How do I adjust the camera and sprites to make pixel perfect in different situation?

I was originally using the default camera provided and the sprite tk2dCamera unchecked, simply by clicking 1:1 button to make them pixel perfect. It worked fine for a while until I realize I should use ortho setting in my camera (I was using perspective before) so I swtiched. After few back and forth and tweeking I noticed the pixel perfect button doesn't work anymore, no matter on what mode by clicking that button the sprite will do absolutely nothing, I have to create a new scene and this time around the button worked again. What will be the possible reason to make the button stop functioning in the first senarios?

I then noticed there is a tk2dCamera but I saw the message:

Please keep in mind that while the tk2dCamera is compatible with sprites created with the old method, sprites created with the tk2dCamera tickbox enabled will not auto-size correctly with standard ortho cameras.

So it means I have to use tk2dCamera along with sprites with that option in order to make pixel perfect sprite, is this camera ortho only?

EDIT: I plan to have parallax scrolling for my game, but seems 2DTK doesn't have come with this feature suppored, so I plan to use ThinkScroller, seems they have they own custom camera for parallax effect, in that case is 1:1 button still supported?



Also I found that even after using the make pixel perfect button (I assume it worked since texture changed size to reflected changes), in the in-game rendering there is still a differentces in size and quality downgrade. The in game rendering is slighly smaller and has lower quality than that in the editor (see attachment). Is this supposed to be? Can I force highter quality render such that it produces that same effect as the view in the sprite editor? In my project setting the texture quality is set to Full Res

Another question: how is the sprite been lit? I noticed the differences between the sprite in game and in the editor, in game sprite matches the correct brightness and in editor sprite is slightly darker for some reason. As I know even in this 2D work we still need to see lighting in order for texture to work, and the default ambient light in unity is rather dark. How is the sprite in 2DTK been setup in regards of lighting? Can I change the light value? If I want to create a level with custom light (only lit the textures where a torch is at, and the brightness fades around it, for example), how do I adjust the light in the sprite? I also want to do some self shawding by putting a light source in front of the sprite (or maybe even use a normal map). How can I achieve these?

Thanks

10
Support / Unity crashes then 2D Toolkit disappear
« on: April 10, 2013, 08:19:42 am »
So this is the second time the problem happens

Somehow my unity become unresponsive and I have to restart it, then my layout changed to default and sprites disappear, when click on sprite there is only a box collider and the inspector says: The associated scripts cannot be loaded, please fix any compile errors and assign a valid script. I then try to rebuild it but get bunch of errors as mentioned in this post http://answers.unity3d.com/questions/434324/unity-crashed-then-alll-scripts-cant-be-loaded.html. Also my 2D Toolkit is gone: there is no 2D TK option under create or anywhere else except on the menu bar with the only option of "Setup for javascript left". By reimporting 2DTK from asset store will not solve the problem.

This happened once before and I reinstall unity to solve it where the previous scene file save is gone and I have to recreate it, but i can't just reinstall everytime and bare the risk of losing data. Since this problem happened twice and only with 2DTK so I guess there might be a problem here (or maybe unity's, idk for sure).

I will attach screenshots for the problem I'm describing.


(P.S. After finish posting I realize I forgot to attach one screenshot, but in the modify section there isn't an option for uploading attachment, so I have to remove the post and repost the attachments, possible fix?)

11
I'm new to Unity and just get my hands on 2D Toolkit trying to make a 2.5D game.

Generally, it is good, but I do have few questions that I can't figure out.

First, for the pixel-perfect rendering, I can't quite figure the ortho distance regarding different window size, what I did is by simply clicking 1:1 button at the sprite inspector. Problem is, as I said I'm going to make a 2.5D game (says, actually 3D but with 2D textures and different distance) and will have different resolution. And I want the game to handle this just like 3D games: bigger window size, more view area, and vice versa, but the texture size don't change itself.

As I know the placement by the pixel perfect function depends on the screen size: I need to specifically set it up in the setting target height, my screen resolution is 1920x1080 and 1080 works perfect, but if I want to test it says on 1080x720 window do I need to change the target high to 720 instead? I tried it but the texture become bigger and blurier and not suit my needs.

Second, I don't understand the padding size in setting, what does it mean? I understand padding in CSS context where it's the area "inside" the texture (from border to innerside with some size) but I don't see a point of having padding here. From the padding.

Third, the BIGGEST PROBLEM, I have problem snapping the sprite (holding control or control/shift same time while draging in translation mode), it leaves a HUGE gap between those two collidars. Yesterday, somehow, if I have a sprite then dupe it and snap it, the first one will work correctly, but the second one comes with the gap, and today for some reason even that will not work and the gap becomes bigger, I don't know what I did but I didn't mess with the collider. I will attach screenshots.

EDIT: I tried the default sprite that comes with example which doesn't have collidars, not working too (the quad didn't snap).

Lastly, I found that if I create a sprite with collider attached, and change the size of the collider, even remove it, and then dupe it, the collidar will re-appear and the size will change back.

The third and fourth problem don't happen with other objects such as cube and sphere.


Please provide workaround and fix for the problem, especially for snapping, it affect my entire level generation.

Thanks

Pages: [1]