Hello also I had another quistion I really need help on…
I understand the function OnTriggerEnter () {}
But what if I wanted it to be a sertain object to enter a location
Could it work like this
var Bullet : GameOject;
function OnBulletEnter () {}
Would a function like that work pleas let me know thanks!
You would have to implement a way of executing that function/method in your code. The OnTriggerEnter/Exit/OnCollision… have their execution maintained by the Unity back end engine.
One way of creating this type of behavior is using Events, but this can be a hard concept for people to wrap their head around when it comes to subscribing/un-subscribing from events, let alone the execution of them. Is there perhaps a better way of asking your question, what are you trying to do with the bullet other then have a function/method execute when something/one enters the collider? If it is something like that, just use colliders or triggers on the code that is attached to the bullet gameobject.