Hello
Guest
Home
Help
Search
Login
Register
2D Toolkit Forum
»
2D Toolkit
»
Support
»
Likning to sprites in ScriptableObjects
« previous
next »
Print
Pages: [
1
]
Author
Topic: Likning to sprites in ScriptableObjects (Read 4144 times)
Serge
Newbie
Posts: 12
Likning to sprites in ScriptableObjects
«
on:
November 06, 2015, 08:54:12 pm »
Hey,
i have some data stored in ScriptableObjects and want to store Sprites from a sprite collection in there, so i can later display this data object by switching the displayed image of an Sprite Instance. How can i do that?
Logged
unikronsoftware
Administrator
Hero Member
Posts: 9709
Re: Likning to sprites in ScriptableObjects
«
Reply #1 on:
November 14, 2015, 10:08:51 pm »
Create a serializefield that is tk2dSpriteCollectionData, then drag and drop into your scriptable object. You can then use this using SetSprite(data, spriteId) or SetSprite(data, name) on the sprite.
Logged
Print
Pages: [
1
]
« previous
next »
2D Toolkit Forum
»
2D Toolkit
»
Support
»
Likning to sprites in ScriptableObjects