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

Pages: [1]
1
Support / Re: Tilemaps and passing Prefab Data
« on: July 18, 2014, 06:50:21 pm »
String int and float data are stored per tile TYPE, not per tile.
When you commit the tilemap, you can select individual prefabs and change properties on them. It should remember the changes.

I understand it's per type, sorry if I wasn't clear. For example, I have two separate tiles in the palette, a single coin and a coin worth 5. I'd rather just have them both spawn the same prefab, but pass the integer to be either 1 or 5.

I'm not sure how I pass or read this integer though. I'm assuming somewhere in the coincontroller script's constructor I should be able to read the integer from the tilemap, but am unable to figure it out.

2
Support / Tilemaps and passing Prefab Data
« on: July 17, 2014, 05:00:15 am »
Hi all, I'm having trouble figuring out how to use the Data section of a Tilemap.

I know I can have a tile spawn a prefab, but am not sure how to pass or read the 'String/Int/Float' data. For example, if I spawn a coin, I'm assuming I can somehow read the int variable to determine the coin's value.

I'm also a bit confused as to how 2D toolkit determines the scale that a prefab is spawned. Right now it seems to spawn it based on the scale of the tilemap, but I'm wondering if I can have more control over this? Thanks!

Pages: [1]