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

Pages: [1]
1
Turns out this is a Unity viewport issue. By coincidence, the example I was using was showing the tk2dCamera incorrectly but not the normal cam next to it.

This is a better explanation of my problem:

http://answers.unity3d.com/questions/328262/how-to-slide-a-second-camera-on-off-screen.html

Thanks,

2
Support / Issue: tk2dCamera viewport Squishing at Edge of Screen
« on: May 24, 2014, 05:13:46 pm »
Problem:
tk2dCamera viewport is being squished at the edge of the screen instead of going offscreen.

I have multiple cameras being rendered on screen at one time. I manage where their viewport rects are output based on player input. I would like these to be able to go offscreen, but when they get to the edge of the screen, they will compress and not go beyond the screen boundaries, effectively ‘squishing’ that viewport rect. Oddly enough, I’m printing out the CameraSettings viewport rect and the numbers dont seem be skewed by the screen edge.

This does not happen when I try it with normal Unity Cameras, they will correctly move on and off screen partially. It's only a problem with tk2dCameras. Any ideas how I can get the viewports to not ‘squish’ at the edges of the screen?

Thanks

3
Thank you, that clears some things up. Getting/setting the sprite ID and changing the color channel makes sense.

I’m still a little fuzzy on how to get a specific tk2dSprite reference for a tile, as the ID is not unique per in game sprite object. Can I get a reference to a sprite object at a specific tile?

4
Support / Question: Programmatically change tile map sprites and colors?
« on: January 05, 2014, 11:03:36 pm »
I feel a bit dense here, but I can’t figure out how to get at specific sprites from a tile map and change their colors.

After loading in my tile map, I want to set a sprite randomly to one of multiple in a set. Then I wan’t to go through and tint the colors slightly just like you can do when editing in the tile map. Is this possible in code?

Thanks.

5
Support / Tilemap Cut Prefab Issue
« on: November 22, 2013, 05:18:52 pm »

Problem:

If you cut a chunk of the tile map, then move it and place it somewhere else, the prefab information doesn’t move with it, but any new prefab tiles painted there will have that info.

Setup:

* Set up a tile map with tiles set to prefabs.
* Have a script on the prefabs with per instance public properties set.
* Cut out a chunk of the tile map with the prefabs and place it somewhere else on the map.
* Draw the same tiles in place where you cut from.

Issue:

* The tiles you moved will be reset to default prefab values.
* The new tiles painted where the cut happened will have the old cut prefab values.

6
Support / Re: Issue: Sprite Collection Change on Prefab
« on: November 12, 2013, 11:51:46 pm »
Also sent to Support.

I'm using 2.3.0.

After some more testing, the issue is definitely there.

Here's my current situation that resulted in the issue.

* Have 2 separate sprite collections. I have both made up of multiple 64x64 sprites.
* Have a few of the same sprites in both collections, but the collections should be significantly different other than that. Different sizes as well.
* Create sprite in scene. Set to collection 1 (this is the bigger collection for me) with one of the common sprites.
* Parent it under an empty game object (I don't think this matters) and create a master prefab out of the empty game object.
* Delete the in scene prefab instance and create a new in-scene instance of the prefab from the master.
* Change the master prefab to sprite collection 2, this should retain the same sprite name.

Issue:
* The in-scene sprite will be incorrect. It still appears to be using sprite collection 1 and the texture coordinates are all wrong. They are not even the size of any sprite from collection 1.

Note: This only seems to happen the first time. Once i delete the in-scene prefab and replace it with a new instance of the master, it is correct and doesn’t seem to be a problem even if i change the master after that.

7
Support / Re: Issue: Sprite Collection Change on Prefab
« on: November 12, 2013, 11:22:23 pm »

I mean the sprite collection on my in-scene sprite prefab. I don't have a sprite collection by itself in scene.

8
Support / Re: Issue: Sprite Collection Change on Prefab
« on: November 12, 2013, 11:09:33 pm »
Well, i was using a version from a week or so ago, but i just updated right after my first post, and am seeing the same issues.

Also, is there a way to check what tk2d Version im currently using from within Unity? Some doc or code within the 2d Toolkit root?

Related Issue:

* I changed the in-scene prefab sprite collection and got an Index out of bounds exception, presumably on the master prefab.

* The collection did seem to update correctly on the master.

* I assume the sprite index in the collection is saved on the sprite and when the sprite collection changes, it keeps all indices in tact. Maybe that index doesn't get changed on the master when applying a change to a new collection from in-scene?


9
Support / Issue: Sprite Collection Change on Prefab
« on: November 12, 2013, 10:06:06 pm »
Seeing an issue with changing a sprite collection within a prefab. It's inconsistent, I can't get it to repro 100%.

Setup:

* Have a prefab with a tk2dSprite component.
* Place prefab in scene.
* Change the sprite collection on the master prefab.

Issue:
* Notice the sprite is now incorrect in the scene. (Not 100%) Seems to be using the old Collection atlas with tex coords from the new collection.
* Seems to be fixed when you delete the prefab out of the scene and drop the master prefab back into the scene. From then on it seems okay...
* It might also have to do with overriding the scene prefab then changing the master. Again, can't quite get a solid repro.

Issue 2:
* If you change the prefab instance in the scene and hit apply, the master prefab's sprite collection label seems to change correctly, but the sprite shows in the inspector as if it still is using the previous sprite collection.
* It can be fixed by manually changing the sprite collection on the master prefab after the problem has occurred.

10
Support / Re: Tilemap Painting Replace Issue
« on: October 28, 2013, 06:43:27 pm »
I have sent this to support, but I'm also placing it here for completeness.

I just updated to 2.22. This problem still persists.

100% repro for me:

* have a tile map with multiple layers, though i don’t think the number of layers matters, its just what i have.
* have 2 different painting tiles, both set to replace with a different prefab.
* Paint 1 tile, commit.
* Go back to edit mode. Select the other tile for painting, paint over the first tile in the same layer, commit.
* The tile will revert back to the first painted prefab.

* Note: when in edit mode, the painted tile will be correct. It is only after committing that it replaces it with the first prefab.
* Note: this works properly if I erase the first tile, commit. Then paint the second tile and commit.


Possibly related question:

I have set up a basic ‘blank’ scene with a tile map and one floor layer filled in. When creating new scenes/levels, I just duplicate this base scene and edit the tile map per scene. This all seems to work fine as the overridden tilemaps work properly per scene.

Would there be any issues here since I don’t create new tile map data per scene?

11
Support / Re: Tilemap layer Z Offset Issue
« on: October 28, 2013, 05:28:59 pm »
Ugh, this one is on me. Apologies.

I have some z bumping in my code through a base class. The layer object offsets are indeed correct. I was bumping certain objects another 0.1 in the z direction to get them slightly on top of other objects in the same layer.

Thanks for your time.

12
Sounds like either multiple tilemaps, or maybe breaking up my sprite collection into 2 separate for editor painting vs. game prefabs.

Thanks for the info.

13
Support / Tilemap layer Z Offset Issue
« on: October 28, 2013, 01:10:03 am »
Seems the z offsets of the layers in my tile map are inconsistent.

I have 5 layers, all of their offsets are set to 0.1, except layer 0, which defaults to 0 as the base. I assume this means the offsets are supposed to stack. Meaning layer 5 will end up at 0.4 z offset.

This doesn’t seem to work properly as some of my tiles in higher layers end up with a lower z than the lower layers. Lots of times their z is just plain 0 while a lower layer may correctly be, say, 0.2.

It seems inconsistent within the layers as well, as some of the prefabs end up at a different z than other prefabs in the same layer.

Details:
* All of my tiles are being replaced with prefabs, whose local z positions are all set to 0.

* My camera is in the negative z looking down the positive z axis, and the tile offsets are actually supposed to increase in the negative z direction to become closer to the camera and be on top. Not sure how this is handled as I can’t set negative values for offsets. But most of my layers seem to handle this fine, as they are properly set to negative values.

I'm Using 2.2.

14
Support / Tilemap Painting Replace Issue
« on: October 28, 2013, 12:48:12 am »
I’m having an issue with changing painted tile maps. If I have a painted, committed tile, then try to paint over it on the same layer with another tile, the editor will not save the changes upon commit. I have to erase the tile, commit, then edit again and paint the new tile.


I’m Using 2.2.

15
These questions are popping up in my project as well. It also seems the bigger collection atlases are causing a performance hit on older devices. Though, I'm not entirely sure that is the main source of slowdown.

for my project i mostly replace tiles with prefabs, so i could potentially use multiple tilemaps and piece them together at runtime, but would be nicer not to have to.

Any feedback would be appreciated. Thanks.

Pages: [1]