Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

eDriven framework for Unity released

Discussion in 'Assets and Asset Store' started by dkozar, Feb 6, 2011.

  1. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    I released an event-driven framework for Unity called eDriven. This is the introduction video.

    In a few days I'll release the tutorial on EventDispatcher. Other tutorials and framework updates are on it's way...

    http://edriven.dankokozar.com/

     
  2. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Here are some highlights from the first demo video...

    And here is the code repository where you should download demos (as unitypackage).
     

    Attached Files:

    Last edited: Feb 6, 2011
  3. Fourthings

    Fourthings

    Joined:
    Feb 15, 2010
    Posts:
    313
    I'm an artist who dabbles in code, so I must ask, what would this typically be used for? And how?

    And would it be possible for someone with a limited knowledge of programming, such as myself, to use it? or Would there be a very steep learning curve?

    Also, is it something that works only with C#?

    Sorry if these questions are answered elsewhere.
     
  4. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    This is more for developers, not the artists.

    The purpose is to have a project under control - it should be decoupled, maintainable and upgreadable. So basically, this is the anti-spaghetti pill. :)

    Yes, it works with Javascript to the certain measure, but C# is where it shines.
     
  5. appels

    appels

    Joined:
    Jun 25, 2010
    Posts:
    2,687
    this looks great, i will start playing with it. ETA for tutorials ?
     
  6. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    A few days.
     
  7. rhianu

    rhianu

    Joined:
    Feb 25, 2010
    Posts:
    93
    What does this do exactly? I watched the video and I'm still not sure what its purpose is.
     
  8. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Introduces design patterns from business applications to game industry.
     
  9. Kaya

    Kaya

    Joined:
    Dec 21, 2010
    Posts:
    50
    Introduction video is good. I wish it would also demonstrate the event system in action.
    I am looking forward to see more about this exciting, and very useful concept.
     
  10. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    You should see it soon. No more checking for 'IsFinished' stuff.. No more 'yield return' statements... ;)
     
  11. appels

    appels

    Joined:
    Jun 25, 2010
    Posts:
    2,687
    Hi Danko, i have the asset loader working but could you show an example or post a script on how to load multiple bundles with the queues ?
     
  12. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Since CallbackQueue works as N simultaneous operations (downloads etc.) I assume that you are talking about keeping the order (FIFO - first in first out). That's not implemented yet inside the class.

    If you want to implement it outside, my recomendation is to have the 1 member Dictionary<Response, RealHandler> and 1 member List<Response>. Each time you ase Send-ing something to CQ you should add it to dictionary, but:

    To Dictionary: Add(Response, RealHandler)
    To Queue: Add(Response, DummyHandler)

    It's a bit tricky, cause the handler you are actually sending to queue isn't the real one, but is only used to change the state of the second collection.

    When DummyHandler fires, add the response to the list:

    To List: Add(Response)

    Then make check if all previous responses have been processed (by looking the first collection for the order) and then find a 'real' handler in dictionary and execute it with the Response as parameter.

    Of course, you should do a cleanup in member collections when a response gets processed.
     
  13. Quietus2

    Quietus2

    Joined:
    Mar 28, 2008
    Posts:
    2,058
    *Worthy Bump*

    I imagine you're still busy working on your new videos, but you should certainly add this to the wiki when you're finished. This thread keeps getting buried being in scripting and not assets, had some difficulty finding it to see if you had an update.
     
  14. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    OK.

    Soon, still haven't found the time.. :)
     
  15. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410

    Attached Files:

  16. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    A new demo is out! It introduces 2 core classes:

    - HttpConnector [eDriven.Core]: makes a Flickr query and loads JSON data, which is then deserialized by JsonFx
    - TextureLoader [eDriven.Core]: loads images (both thumbnails and biggies) over HTTP and caches them locally

    http://edrivenunity.com/load-images

    Source is available, as always. Please comment!

    (GUI thread)
     
  17. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
  18. timsk

    timsk

    Joined:
    May 27, 2011
    Posts:
    177
    Hi Danko,

    I'm interested in this, but I'm wondering. Why would you use this over delegation and event systems? I'm a bit confused as to what this brings to development that is not already in place in C# libraries?
     
  19. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    I don't know how it stands today, but back then when I started the framework .NET event system wasn't working (predictably) well because of multithreading - I remember I had problems. My system fires event handlers inside Update(), or OnGUI() methods.

    Additionally, my GUI system needed another kind of event-dispatching system, more Flash/Actionscript-alike. Event bubbling is the main reason. I have a total control over event processing in my framework (control over collections containing references to event handlers), and that's very important.

    Btw event dispatcher really isn't something complicated: in .NET, when you use the "event" keyword, behind the scenes the compiler builds the event-dispatcher stuff (collection of event handlers), something like my EventDispatcher has.

    For more .NET event system similarities look at my Signals and Slots implementation.
     
    Last edited: Aug 21, 2012
  20. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Just updated the eDriven library on the Asset Store.



    Usage:

    - download and install the package into your project.
    - you could delete everything except eDriven/Libs folder containing three DLLs (see image below)



    Note: since the asset store submission lasts a day or two, my Google Code repository will generally have the most up-to-date version of DLLs: http://code.google.com/p/edriven/downloads/list.
     
    Last edited: Aug 21, 2012
  21. timsk

    timsk

    Joined:
    May 27, 2011
    Posts:
    177
    Hmm.. Definitly looks interesting. I'll take a look over the weekend if I have time. I'm surprised your offering it open-source, very nice of you!
     
  22. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    No problem. Core just had to be open and free.

    Although GUI isn't free, you can learn many of the core features from this demo: http://edrivenunity.com/load-images

    It contains features like: event handlers, http connector, async loaders, object pool, cache etc.

    You'd definitelly want to start with HttpConnector since the benefits of using this class are the most obvious. You give it a bunch of web requests and appropriate result handlers, tweeak its options and you get your handlers called the way you want, when finished, async and non-blocking.
     
  23. vendetta29

    vendetta29

    Joined:
    Apr 20, 2011
    Posts:
    16
    This is excellent work sir. Good thing i googled before starting to write my own event based system for unity.
     
  24. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Thank you!

    Yes, you can build your async logic upon this system.
     
  25. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410

    Attached Files:

  26. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410

    Attached Files:

  27. techmage

    techmage

    Joined:
    Oct 31, 2009
    Posts:
    2,133
    Curious to know, how does this render the actual GUI?

    Is this resting on OnGUI calls? Or is it creating actual meshes? Or does it plug into the GL class directly somehow? Or another way?

    Also hows this perform on iOS? Is this intended primarily for use on desktop?
     
  28. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Hi,

    eDriven.Gui is rendering using UnityGUI. This is the Core thread, you should check other threads for more info:

    http://forum.unity3d.com/threads/143093-eDriven.Gui-GUI-for-programmers
    http://forum.unity3d.com/threads/148424-eDriven-Q-amp-A
     
  29. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410

    Attached Files:

  30. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
  31. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
  32. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    250
    Hey dkozar,
    I am trying to compile the eDriven.Core libraries myself, but when I do this I get errors with the eDriven.Gui.Editor library. The error is the following:

    TypeLoadException: Could not load type 'A.c4c1d894776fb55ccd56dfb37866b7c66' from assembly 'eDriven.Gui.Editor, Version=1.11.0.0, Culture=neutral, PublicKeyToken=null'.

    Which disappears when I replace my compiled version of eDriven.Core.dll with the packaged version. Both DLL's say they are using version 1.11.0.0. I've tried compiling it in both release and debug. Any idea what's going on there? There is no visible loss of functionality that I can see at least. I would prefer to compile it myself if possible.
     
  33. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Hmmm... no idea, really. Guess the editor DLL looks for something that's being obfuscated. Which is totally weird!

    ps Obfuscating the core is just the convenience thing for me when copying the release version of the project to keep things in sync (the core obviously doesn't need to be obfuscated because it's open-source).

    Will medidate on it... It would really help if you could somehow pinpoint the exact class that fails.
     
  34. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    250
    Thanks for the quick reply. I will see if I can dig up more info on that. Our company is very interested in purchasing eDriven Gui, but one of our concerns is that the Gui part of eDriven is closed source. Does the source code come with the full version? If not, is it possible to purchase a source code license? We would hate to bet on eDriven only to hit a show-stopping bug that we can't even fix ourselves halfway through our project.
     
  35. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Unfortunately, only the core is open source.

    However, although the eDriven.Gui kernel is not open source, I tend to release many complex components as open-source (see the extension pack 1), and I'm encouraging other developers to do so, so I would be the kernel maintainer only (and I have a great passion for doing that).

    If you think about this concept - it would give us all the set of components beyond compare.
     
  36. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    Another thought: you are using Unity, which is not open-source. So how come? :)

    And why do you think that I'm not the authority on GUI frameworks at least as the UT guys are on 3D engines? ;)
     
  37. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
  38. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    eDriven.Gui 30% OFF - End of Quarter Sale!!! (until June 30)

    Get it for only $175 instead of $250! :)

    Due to a great succes of the last 24H Sale, I decided to start the End of Quarter sale a little bit earlier, so giving you guys the opportunity for getting eDriven at a more affordable price!!

    Note: the 50% OFFs are reserved for the Asset Store sales *exclusively* - I cannot guarantee when will they happen and will they happen at all (they are deciding on whom to call).

    While waiting for the upcoming v1.12 release, check out the things to come the news:

    Creating iOS and Android applications using C# and Unity: http://edrivengui.com/news/creating-ios-and-android-applications-using-c-and-unity/
    Script auto-generation: http://edrivengui.com/news/script-auto-generation/
    Rewriting a scrollview: http://edrivengui.com/news/rewriting-scrollview/
    More news: http://edrivengui.com/category/news/

    Of course, you can always try before you buy: Download the Free edition HERE! :cool:


    View attachment 56129
     
    Last edited: Jun 8, 2013
  39. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
  40. Cipheralex

    Cipheralex

    Joined:
    Aug 9, 2013
    Posts:
    3
    Hi, I am new to unity Editor scripting, and I see that you somehow added graphics to the Hierarchy window. I am trying to do that, but couldn't figure out how. I looked up your page where you mentioned you used

    EditorApplication.hierarchyWindowItemOnGUI += OnHierarchyWindowItemOnGUI;
    [...]
    private void OnHierarchyWindowItemOnGUI(int instanceid, Rect selectionrect)
    {
    // rendering stuff here
    }

    But I could not find out anymore info than those two lines. All I want to do is add a dot or a graphic or Rect behind the item listed in the hierarchy window. I am looking at your eDriven free version, but I can't seem to find the script where you made changes to the hierarchy. Can you please give me some pointers as to how to do this?

    Thank you very much,

    -ciph
     
  41. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    You just... render:

    Code (csharp):
    1. private void OnHierarchyWindowItemOnGUI(int instanceid, Rect selectionrect)
    2. {
    3.     GUI.Label(selectionrect, "Foo " + instanceid);
    4. }
    Of course, you can adapt coordinates for your need. For instance, with a bit of calculation you can align to the right:

    Code (csharp):
    1. private void OnHierarchyWindowItemOnGUI(int instanceid, Rect selectionrect)
    2. {
    3.     var x = selectionrect.x + selectionrect.width - 100;
    4.     var y = selectionrect.y;
    5.     GUI.Label(selectionrect, "Foo " + instanceid);
    6. }
    ... because the given selectionrect covers the area from the item lebel to the right edge of the hierarchy window.
     
  42. Cipheralex

    Cipheralex

    Joined:
    Aug 9, 2013
    Posts:
    3
    Thank you, that helps with the formatting part. But I am trying to figure out how to even trigger EditorApplication.hierarchyWindowItemOnGUI += OnHierarchyWindowItemOnGUI call.

    I am trying to put a mark on the items listed in Hierarchy window when the item is locked. I can make a button to set the item as locked, but where/how can I call that line of code to trigger EditorApplication.hierarchyWindowItemOnGUI += OnHierarchyWindowItemOnGUI?

    Should I use hierarchyWindowChanged to trigger it?
     
    Last edited: Aug 9, 2013
  43. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    You have nothing to trigger. You need to subscribe (once in the application lifetime).

    The event is being fired by the system each time the system draws another hierarchy window item.

    I subscribed to the event from within a class extending the EditorWindow:

    Code (csharp):
    1. public class MyEditorWindow : EditorWindow {
    2.     void OnEnable()
    3.     {
    4.         EditorApplication.hierarchyWindowItemOnGUI += OnHierarchyWindowItemOnGUI;
    5.     }  
    6.     private void OnHierarchyWindowItemOnGUI(int instanceid, Rect selectionrect)
    7.     {
    8.         GUI.Label(selectionrect, "Foo " + instanceid);
    9.     }
    10. }
     
  44. Cipheralex

    Cipheralex

    Joined:
    Aug 9, 2013
    Posts:
    3
    oh... duh... Thank you very much, :) That is the part I didn't understand. Thank you. Now back to breaking Unity for me LOL
     
  45. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    After more than a year on the Asset Store, I just thought this is the right time for fine-tuning the eDriven.Gui price. :)

    >>> Read more <<<
     
  46. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
  47. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    You can find the newly created eDriven forum at the address:

    forum.edrivengui.com

    Please use it for asking questions!

    This way each answer will in the separate thread and easily searchable. :)
     
  48. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
  49. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
  50. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410