Hello
Guest
Home
Help
Search
Login
Register
2D Toolkit Forum
»
2D Toolkit
»
Support
»
Tilemap material
« previous
next »
Print
Pages: [
1
]
Author
Topic: Tilemap material (Read 4280 times)
DJVDJV
2D Toolkit
Newbie
Posts: 30
Tilemap material
«
on:
October 30, 2015, 08:20:21 pm »
Hi,
I try change tilemap material at runtime like:
backGroundTileMap.SpriteCollectionInst.material = backGroundTileMap.SpriteCollectionInst.materials[1];
backGroundTileMap.Build();
backGroundTileMap.SpriteCollectionInst.materials[0] is normal material.
backGroundTileMap.SpriteCollectionInst.materials[1] is custom material.
But it does not seems change.. what I do wrong?
Logged
unikronsoftware
Administrator
Hero Member
Posts: 9709
Re: Tilemap material
«
Reply #1 on:
November 03, 2015, 12:08:10 pm »
You'll have to forcebuild for it to update it like that. Shouldn't do that at runtime unless absolutely necessary as it is really really expensive though, you might be better off assigning a material, then changing the material itself at runtime
Logged
Print
Pages: [
1
]
« previous
next »
2D Toolkit Forum
»
2D Toolkit
»
Support
»
Tilemap material