- Home /
Question by
hellraiser9954 · Feb 07, 2019 at 10:51 AM ·
materialdestroy objectcheckindex
Checking Material and Destroying Another Object C#
Hi everyone, I'm making a game where I need two objects to collide and if the material and tag match the object is destroyed. (Side note I'm using an index to change materials).
For example if the objects material was 1 in the index (red) it would destroy objects with the tag red_block and the same would happen for the other three colours I am currently using.
I'm really unsure how I would go about coding this and the internet was no help so any advise would be really appreciated, thanks in advance.
Comment