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

[HELP]Event System with design pattern?

Discussion in 'Scripting' started by Corvinuz1227, May 22, 2015.

  1. Corvinuz1227

    Corvinuz1227

    Joined:
    Mar 2, 2014
    Posts:
    29
    any advice using a design pattern for an event system? thanks guys..
     
  2. WheresMommy

    WheresMommy

    Joined:
    Oct 4, 2012
    Posts:
    890
    what do you exactly want?
     
  3. Corvinuz1227

    Corvinuz1227

    Joined:
    Mar 2, 2014
    Posts:
    29
    im trying to create an event system to call ui dynamically sir
     
  4. WheresMommy

    WheresMommy

    Joined:
    Oct 4, 2012
    Posts:
    890
    Maybe you can tell us a bit more, what you are trying to achieve, how should it be instantiated, where is it dynamically etc.
     
  5. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Unity did make an EventSystem. It's based around one of the design patterns.

    You'll have to be more specific. There are dozens of valid design patterns.
     
  6. Corvinuz1227

    Corvinuz1227

    Joined:
    Mar 2, 2014
    Posts:
    29
    sorry for late reply guys, hmmm this is what i want to make, i want to handle UI's with event system, regarding what UI i want to use or to be show, the event system i want to use is going to be dynamic for this. my buddy wants me to make it dynamically, so i tried to use delegate and events with it, i hope i explained it clear or still does not, ill try to make it more clear next time
     
  7. Madigan

    Madigan

    Joined:
    Jan 9, 2013
    Posts:
    2
    I'm still struggling to understand what you mean by "UI" and "dynamic." Do you mean "I want to have an event system where I can change the method of user interface at runtime (e.g. switch from keyboard/mouse to gamepad)"?
     
  8. Corvinuz1227

    Corvinuz1227

    Joined:
    Mar 2, 2014
    Posts:
    29
    ^ thanks mate for correcting me, the scenario will be this..

    im creating my own event system with a dynamic feature that it will handle it self what scene or UI state that im currently staying .. by using some examples from the internet, like type safe event manager, using delegates, i can dynamically use my methods whenever i want to on them or off, the game will continually working.. my friend and i trying to create saga so its very important to use things like this.. can you guys help me or advice or even give some tips regarding with what i want to create, not an expert coder here.. thanks for the time guys