Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

fernandomema

Newbie
  • Content Count

    2
  • Joined

  • Last visited

  • Days Won

    1

fernandomema last won the day on October 19 2018

fernandomema had the most liked content!

Community Reputation

2 Neutral

About fernandomema

  • Rank
    Newbie

Profile Information

  • Gender
    Male
  • Location:
    spain

Recent Profile Visitors

103 profile views
  1. It's true, I got confused writing the post . Thank you for your layer upgrade
  2. There is a little script that allow's you to create custom actions on trigger enter and exit without coding, like a button: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; public class Trigger : MonoBehaviour { public UnityEvent OnAnyObjectEnter; public UnityEvent OnPlayerEnter; public UnityEvent OnAnyObjectExit; public UnityEvent OnPlayerExit; public void OnTriggerEnter(Collider other) { if (other.tag == "Player") { OnPlayerEnter.Invoke(); } else { OnAnyObjectEnter.Invoke(); } } public void OnTriggerExit(Collider other) { if (other.tag == "Player") { OnPlayerExit.Invoke(); } else { OnAnyObjectExit.Invoke(); } } } Simply create a cube and check "Is Trigger", and add the previous script to the gameObject. you shuld see something like this:
×
×
  • Create New...