Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
How to reference 2D tile that does not yet exist in-game?
Post Body

Still new to Unity, so I'm sure this is a problem of my lack of knowing something obvious, but I can't find any concrete example of referencing a Tile that doesn't yet exist in game. I am trying to have my player lay different items depending on which key is pressed. I could paint all of the tiles I want into known locations in game. I could (I think) start with a_tile on coordinate (-2000, -2000) (or some place out of the way) and just build a palette of my tiles out there, then when I want one I could do

Vector3D aTileLoc = new Vector3D(-2000, 2000);
Tile aTile = tm.GetTile(aTileLoc);

And now I have a reference to the tile I want. But what I would like to do is conjure up a tile knowing that I want it to have sprite a_tile - is this possible? Or am I going about this in the wrong way?

Author
Account Strength
80%
Account Age
6 years
Verified Email
Yes
Verified Flair
No
Total Karma
389
Link Karma
54
Comment Karma
288
Profile updated: 3 days ago
Posts updated: 9 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
5 years ago