Just remember to tag any weapon the character equips. Proof that you can always find many ways to do stuff. The weird names generated by the system are to avoid creating twice the same tag.ītw, yours seem like a very clever solution. I need either to call the function using "Color_86CBE207" or change the reference name in the blackboard to something I'll remember easier. If I try to set the color using "t1Color" it'll fail. But if you see below, the system automatically assigns a reference name that can be something like "Color_86CBE207" in this case. I can call it "t1Color" (like in the image). say I have a Color and I want to show it in the inspector. Would you hit it Jump to Latest Follow Would you hit it Yes, all day long, all day strong Votes: 40 39.6 Hell no, that bitch is crazy Votes: 15 14.9 Absolutely, with a baseball bat Votes: 46 45.5. For example in shader graph, you can turn a node into a property. Not always the tag that the system uses matches the name of the property you see in the inspector. I think what palex-nx was saying, is that in order to change the property of the material you should know how the shader calls it inside.
WOULD YOU HIT IT YELLOW BULLET FORUMS CODE
This is pretty much what I've done in my code and why I posted it up for you.Ĭlick to expand.GetComponentsIInChildren uses depth first search, so it goes through all of the children and their childrens (and their children childrens too). The reason I'm bringing this up is because I went through this exact situation and found it way easier to just attach a script to the gameobjects that are being collided with and then add them to a list as opposed to fiddling around with all this overly complicated stuff within the list itself. If you're looking to maintain a list of these gameobjects and keep a count you could add the list at the start and then remove them from the list after they get destroyed. So for example if your script is attached to an enemy have the enemy search for a "Bullet" tag and then just do the code through there. I would have thought you could just have a script attached to the gameobject that is being collided to and then have it search for the gameobject that is going to collide with it than this way and then have it GetComponentInChildren or am I misunderstanding what you're trying to achieve here? One thing I don't understand, is there a specific reason you're using a list? Ahhh, sorry, my bad I should have taken a closer look at your code, I haven't experimented much with changing materials through lists and arrays but yes using a list sounds like a good idea.