Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Source Code for UnityEngine.Events?

Discussion in 'Scripting' started by kenaochreous, Apr 1, 2015.

  1. kenaochreous

    kenaochreous

    Joined:
    Sep 7, 2012
    Posts:
    395
    I want to create my own type of UnityEvent. So I downloaded Unity's UI source code so I could read through and understand how it worked. I wasn't able to find it. I could find references to it like using UnityEngine.Events; but not the source code itself. I found the code for UnityEngine.EventSystems but no UnityEngine.Events. Did I download the wrong repository? Is the UnityEngine.Events source code in a different repository?
     
  2. Mr-Mud

    Mr-Mud

    Joined:
    Mar 8, 2015
    Posts:
    37
    When you say you want to create your own kind of UnityEvent, do you mean define an event with custom parameters that show up in the inspector? In that case I would suggest to look at the documentation. There is an example on how to use it.

    Otherwise take a look at the FAQ; it has tthe following to say about licencing of source code. So I don't think you can download the source code somewhere easily, or it will most likely be illegal.
     
  3. GroZZleR

    GroZZleR

    Joined:
    Feb 1, 2015
    Posts:
    3,201