Search Unity

Daikon Forge GUI Library

Discussion in 'Assets and Asset Store' started by TakuanDaikon, Aug 6, 2013.

  1. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    found bug. When dftextbox has no chacracters, clicking on it repeating will have IndexOutOfRange error. Happens on samples too
     
  2. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    Which version are you seeing this in? I'm not able to reproduce that in the latest version.
     
  3. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    Anyone else find that the Occlusion Culling in 4.3.1 culls the GUI?
     
  4. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    I'm not terribly experienced with occlusion culling, but Masaaki is. I'll ask him to look into it when I see him.
     
  5. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    1.0.10. Use Panel sample. Delete the text in the textbox, double click, crash.
     
  6. Mistale

    Mistale

    Joined:
    Apr 18, 2012
    Posts:
    173
    @TakuanDaikon: I love DF-GUI, and I'm considering using it for a large project in the near future. There are only two things that keeps me from committing to DF-GUI in that project:

    The first thing is that the performance of scrollable rich-text isn't enough for use with mobile devices (yet). I get 5 times higher frame-time with DF-GUI compared to a home-brew solution using GUILayout and Scrollview with the same content.

    The other thing is the inability to reliably dock objects to the edges of the screen when not using the pixel-perfect option. Docking to the top or bottom works, but left and right doesn't work with different aspect ratios.

    I just want to know if these two issues will be resolved in a new release soon? I can work around issue #2, but it would be great with better built-in support. #1 is harder to get around since there's a lot going on per frame on different levels of the DF-GUI codebase.
     
  7. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    The code causing that exception has been fixed in more recent versions. An update has already been submitted to the Asset Store and is currently awaiting approval.
     
    Last edited: Nov 30, 2013
  8. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    The second item has already been resolved in the developer codebase, and you can expect an update soon. There is a workaround posted on our support forums that appears to be working for several people who have tried it.

    As for the first, I have been testing some things that will allow me to improve performance somewhat. The parsing and layout of HTML markup is a pretty complex task, and there are surely ways to optimize it that I have not yet explored, so we'll be continuing to work on that.
     
  9. sandboxgod

    sandboxgod

    Joined:
    Sep 27, 2013
    Posts:
    366
    Yeah very good updates! :)
     
  10. Aurecon_Unity

    Aurecon_Unity

    Joined:
    Jul 6, 2011
    Posts:
    241
    Hi TakuanDaikon

    My apologies if this question has been answered already in this thread, but can you tell me if DF-GUI can make dropdown menus? Kind of like a standard windows program with a 'file' button at the top that then expands into a dropdown menu, with each item being clickable and opening a new floating window.

    I got it up and running in NGUI but it's a bit cumbersome so I'd love to know if you can do it in DF-GUI too.

    Thanks
     
  11. zalogic

    zalogic

    Joined:
    Oct 6, 2010
    Posts:
    273
    Daikon seems to be a very promising GUI framework. Does it make extensive use of System.Linq under the hood? I noticed in some of your sources that you use System.Linq and for me that screams memory garbage collection.

    I would purchase this solution in a second if you get rid of any System.Linq usage and you keep runtime memory allocation to a minimum.

    So far, awesome solution!
     
  12. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    There is no built-in support for those kinds of menus, and it would require some custom code. I don't think it would need to be terribly complex, but I haven't tried it personally. I'll have to add that to the growing list of samples when I can find the time.

    Speaking of new examples, I put together a few new examples over the holiday weekend:

     
  13. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    Don't be so quick to judge the examples you've seen :D

    It does use Linq in some places, but for operations that are likely to suffer performance and memory penalties there are custom overrides for common Linq methods which make extensive use of object pooling and take advantage of the fact that the collection type is known. For instance, most collections are managed with a dfList<T> collection, which is optimized to minimize or even eliminate memory allocations in most situations. As an example, the dfList<T> class defines its own Select() and Where() methods as replacements for the Linq-based versions, which utilize object pooling internally as well as not needing to treat the collection an an unknown IEnumerable<T> (and therefore not even need to allocate an iterator) -

    Code (csharp):
    1. /// <summary>
    2. /// Returns a <see cref="dfList"/> list containing all elements
    3. /// of the collection matching the condition specified by <paramref name="predicate"/>
    4. /// </summary>
    5. public dfList<T> Where( Func<T, bool> predicate )
    6. {
    7.  
    8.  
    9.     var result = dfList<T>.Obtain( this.count );
    10.  
    11.  
    12.     for( int i = 0; i < this.count; i++ )
    13.     {
    14.         if( predicate( items[ i ] ) )
    15.         {
    16.             result.Add( items[ i ] );
    17.         }
    18.     }
    19.  
    20.  
    21.     return result;
    22.  
    23.  
    24. }
    25.  
    26.  
    27.  
    Every attempt has been made to minimize memory allocations, with particular emphasis on anything that occurs on a per-frame basis.

    Some of the code you've seen that looks like Linq, might not be :D
     
    Last edited: Dec 2, 2013
  14. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Just bought...truly awesome.
    I did some test before with the free trial version 1.0.9 and now, in this 1.010 full version, i did not found some useful features already present in the trial version:
    - the display of ruler works only in orthographic mode (or 2d mode in 4.3.1).
    - UnityScript codes can not access anymore at DF classes.

    Max
     
  15. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    There's a thread on our support forums that discusses the issue with UnityScript and Boo not mixing well with DFGUI. Essentially, both of those language impose some bizarre visibility rules that result in the need to move the DFGUI folders into the following hierarchy:



    I'll look into adding the rulers back in Perspective mode.
     
  16. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Thanks for your instant reply Takuan!
    Yes, I did already read this post in your forum... infact the bizarre thing is that the 1.09 free trial version works without move anything in the folder structure.
    I hope that you could find a simple way to make DF easily accessible from JS. Thanks.
    Max
     
  17. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    The reason the free version works that way is because it is already compiled into a .dll, which conflicts with the idea of having the full source code available in the full version. We'll definitely work on this issue to see how we can best provide the broadest support.
     
  18. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    I notice there is 1.0.10g, is there change log somewhere?
     
  19. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,664
  20. msbranin

    msbranin

    Joined:
    Jan 19, 2009
    Posts:
    104
    Maybe I misread a while back but didnt someone say there was an example of a joystick or dpad for this?
     
  21. msbranin

    msbranin

    Joined:
    Jan 19, 2009
    Posts:
    104
    Here is the post i am referencing to.
     
  22. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    We still haven't finished it, it got delayed for other higher-priority items. We should be able to finish that this week.
     
  23. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
  24. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    Most likely we'll take the demo we used in the following video and clean it up and finish it as an example of touch-screen joystick -

     
  25. Justei

    Justei

    Joined:
    Aug 31, 2012
    Posts:
    133
    Hi there, I've got this problem where if a texture is updated. I get the following error directly:

    Code (csharp):
    1.  
    2. System.NullReferenceException: Object reference not set to an instance of an object
    3.   at dfTextureAtlasInspector.<rebuildAtlas>m__91 (.<>__AnonType0`2 i) [0x00000] in C:\Users\Public\Documents\Unity Projects\LifelessClient\Assets\Resources\External Resources\Packages\Daikon Forge\DFGUI\Editor\dfTextureAtlasInspector.cs:166
    4.   at System.Linq.SortSequenceContext`2[<>__AnonType0`2[dfAtlas+ItemInfo,UnityEngine.Texture2D],System.Int32].Initialize (.<>__AnonType0`2[] elements) [0x00000] in <filename unknown>:0
    5.   at System.Linq.QuickSort`1[<>__AnonType0`2[dfAtlas+ItemInfo,UnityEngine.Texture2D]].PerformSort () [0x00000] in <filename unknown>:0
    6.   at System.Linq.QuickSort`1+<Sort>c__Iterator21[<>__AnonType0`2[dfAtlas+ItemInfo,UnityEngine.Texture2D]].MoveNext () [0x00000] in <filename unknown>:0
    7.   at System.Collections.Generic.List`1[<>__AnonType0`2[dfAtlas+ItemInfo,UnityEngine.Texture2D]].AddEnumerable (IEnumerable`1 enumerable) [0x0001a] in /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:128
    8.   at System.Collections.Generic.List`1[<>__AnonType0`2[dfAtlas+ItemInfo,UnityEngine.Texture2D]]..ctor (IEnumerable`1 collection) [0x00025] in /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:65
    9.   at System.Linq.Enumerable.ToList[<>__AnonType0`2] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
    10.   at dfTextureAtlasInspector.rebuildAtlas (.dfAtlas atlas) [0x00014] in C:\Users\Public\Documents\Unity Projects\LifelessClient\Assets\Resources\External Resources\Packages\Daikon Forge\DFGUI\Editor\dfTextureAtlasInspector.cs:163
    11. UnityEngine.Debug:LogError(Object, Object)
    12. dfTextureAtlasInspector:rebuildAtlas(dfAtlas) (at Assets/Resources/External Resources/Packages/Daikon Forge/DFGUI/Editor/dfTextureAtlasInspector.cs:212)
    13. dfTextureAtlasInspector:AddTexture(dfAtlas, Texture2D[]) (at Assets/Resources/External Resources/Packages/Daikon Forge/DFGUI/Editor/dfTextureAtlasInspector.cs:277)
    14. dfTextureAtlasInspector:addSelectedTextures(dfAtlas) (at Assets/Resources/External Resources/Packages/Daikon Forge/DFGUI/Editor/dfTextureAtlasInspector.cs:784)
    15. dfTextureAtlasInspector:ShowAddTextureOption(dfAtlas) (at Assets/Resources/External Resources/Packages/Daikon Forge/DFGUI/Editor/dfTextureAtlasInspector.cs:764)
    16. dfTextureAtlasInspector:OnInspectorGUI() (at Assets/Resources/External Resources/Packages/Daikon Forge/DFGUI/Editor/dfTextureAtlasInspector.cs:382)
    17. UnityEditor.DockArea:OnGUI()
    18.  
    I get this problem all the time, and it's quite annoying as I have to remake the atlas every single time that we update some textures. Adding textures don't cause this problem.

    It might be worth mentioning that we are using version control, which causes there to be .meta files next to all files.

    Thanks.
     
  26. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    I also use version control and have to deal with .meta files, I don't think that's the issue. Or if it is, then there's something that I'm doing differently, which may be possible.

    In any case, if you replace dfTextureAtlasInspector.rebuildAtlas() with the following I believe that it should eliminate the Null Reference Exception. I can't duplicate the issue, but this seems the most likely solution based on the stack trace you showed.

    Code (csharp):
    1. internal static bool rebuildAtlas( dfAtlas atlas )
    2. {
    3.  
    4.  
    5.     try
    6.     {
    7.  
    8.  
    9.         EditorUtility.DisplayProgressBar( "Rebuilding Texture Atlas", "Processing changes to the texture atlas...", 0 );
    10.  
    11.  
    12.         var sprites = atlas.Items
    13.             .Where( i => i != null  !i.deleted )
    14.             .Select( i => new { source = i, texture = getTexture( i.textureGUID ) } )
    15.             .OrderByDescending( i => i.texture.width * i.texture.height )
    16.             .ToList();
    17.  
    18.  
    19.         var textures = sprites.Select( i => i.texture ).ToList();
    20.  
    21.  
    22.         var oldAtlasTexture = atlas.Material.mainTexture;
    23.         var texturePath = AssetDatabase.GetAssetPath( oldAtlasTexture );
    24.  
    25.  
    26.         var padding = EditorPrefs.GetInt( "DaikonForge.AtlasDefaultPadding", 2 );
    27.  
    28.  
    29.         var newAtlasTexture = new Texture2D( 0, 0, TextureFormat.RGBA32, false );
    30.         var newRects = newAtlasTexture.PackTextures2( textures.ToArray(), padding, 4096 );
    31.  
    32.  
    33.         byte[] bytes = newAtlasTexture.EncodeToPNG();
    34.         System.IO.File.WriteAllBytes( texturePath, bytes );
    35.         bytes = null;
    36.         DestroyImmediate( newAtlasTexture );
    37.  
    38.  
    39.         setAtlasTextureSettings( texturePath, oldAtlasTexture.filterMode, false );
    40.  
    41.  
    42.         // Fix up the new sprite locations
    43.         for( int i = 0; i < sprites.Count; i++ )
    44.         {
    45.             sprites[ i ].source.region = newRects[ i ];
    46.             sprites[ i ].source.sizeInPixels = new Vector2( textures[ i ].width, textures[ i ].height );
    47.             sprites[ i ].source.texture = null;
    48.         }
    49.  
    50.  
    51.         // Remove any deleted sprites
    52.         atlas.Items.RemoveAll( i => i.deleted );
    53.  
    54.  
    55.         // Re-sort the Items collection
    56.         atlas.Items.Sort();
    57.         atlas.RebuildIndexes();
    58.  
    59.  
    60.         EditorUtility.SetDirty( atlas );
    61.         EditorUtility.SetDirty( atlas.Material );
    62.  
    63.  
    64.         dfGUIManager.RefreshAll( true );
    65.  
    66.  
    67.         return true;
    68.  
    69.  
    70.     }
    71.     catch( Exception err )
    72.     {
    73.  
    74.  
    75.         Debug.LogError( err.ToString(), atlas );
    76.         EditorUtility.DisplayDialog( "Error Rebuilding Texture Atlas", err.Message, "OK" );
    77.  
    78.  
    79.         return false;
    80.  
    81.  
    82.     }
    83.     finally
    84.     {
    85.         EditorUtility.ClearProgressBar();
    86.     }
    87.  
    88.  
    89. }
     
  27. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    I've got what seems to be a pretty dumb question. I want to create a simple menu where the selected item text changes color and displays a highlight sprite behind it.

    My first try was using dfListBox, which is super close to what I want. I made a simple change to the code to allow a separate "highlighted item color" to be defined in the inspector. It tints the color of the highlight sprite. In my case, my source sprite is a white filled square that I want to be able to set it to a different color than the main listbox color. (might be a nice and super easy enhancement to include someday, HINT HINT HINT)

    But since the text color is for the entire items string, other than embedding formatting codes into the items text on the fly (ugly!), I don't see a clear way to change the selected item's text color. Is there a different control type that would make this easier? I've started playing around with labels inside regular panels, but I feel like I'm recreating the dfListBox functionality.

    Thanks!
     
  28. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    This is actually a common request. Common enough, at any rate, that I will be working on a sample to include with the next update. I'll try to make it as easy to understand and use/extend as possible.
     
  29. Justei

    Justei

    Joined:
    Aug 31, 2012
    Posts:
    133

    Hi there, I did that and now I got:
    Code (csharp):
    1.  
    2. System.NullReferenceException: Object reference not set to an instance of an object
    3.   at dfTextureAtlasInspector.<rebuildAtlas>m__91 (.<>__AnonType0`2 i) [0x00000] in C:\Users\Public\Documents\Unity Projects\LifelessClient\Assets\Resources\External Resources\Packages\Daikon Forge\DFGUI\Editor\dfTextureAtlasInspector.cs:166
    4.   at System.Linq.SortSequenceContext`2[<>__AnonType0`2[dfAtlas+ItemInfo,UnityEngine.Texture2D],System.Int32].Initialize (.<>__AnonType0`2[] elements) [0x00000] in <filename unknown>:0
    5.   at System.Linq.QuickSort`1[<>__AnonType0`2[dfAtlas+ItemInfo,UnityEngine.Texture2D]].PerformSort () [0x00000] in <filename unknown>:0
    6.   at System.Linq.QuickSort`1+<Sort>c__Iterator21[<>__AnonType0`2[dfAtlas+ItemInfo,UnityEngine.Texture2D]].MoveNext () [0x00000] in <filename unknown>:0
    7.   at System.Collections.Generic.List`1[<>__AnonType0`2[dfAtlas+ItemInfo,UnityEngine.Texture2D]].AddEnumerable (IEnumerable`1 enumerable) [0x0001a] in /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:128
    8.   at System.Collections.Generic.List`1[<>__AnonType0`2[dfAtlas+ItemInfo,UnityEngine.Texture2D]]..ctor (IEnumerable`1 collection) [0x00025] in /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:65
    9.   at System.Linq.Enumerable.ToList[<>__AnonType0`2] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
    10.   at dfTextureAtlasInspector.rebuildAtlas (.dfAtlas atlas) [0x00014] in C:\Users\Public\Documents\Unity Projects\LifelessClient\Assets\Resources\External Resources\Packages\Daikon Forge\DFGUI\Editor\dfTextureAtlasInspector.cs:163
    11.  


    EDIT:

    So I noticed now actually, that I also get this after putting in the new function:

    Code (csharp):
    1.  
    2. Assets/Resources/External Resources/Packages/Daikon Forge/DFGUI/Editor/dfTextureAtlasInspector.cs(193,13): error CS1501: No overload for method `setAtlasTextureSettings' takes `3' arguments
    3.  
     
    Last edited: Dec 6, 2013
  30. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    Is this happening on an atlas that was created in an earlier version (such as before v1.0.10)? If so, you may need to upgrade the texture atlas. This replacement for the dfTextureAtlasInspector.cs file should resolve that issue either way, I believe.

     
  31. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
    Hey everyone, I was wondering how many of you guys would like my assets to support DF-GUI so I just created a poll:

    NJG Minimap

    UI Damage <- DF-GUI is nearly done on this one but I would like to know :)
     
  32. bustedkrutch

    bustedkrutch

    Joined:
    Jun 24, 2013
    Posts:
    20
    Hi TakuanDaikon,

    Used the trial - WINNER!

    Have purchased the full monty and I'm trying to access the Daikon Forge examples within Unity and they are greyed, not sure if I'm doing that right. I know you have instructions but my mind (for today) has turned to jello and I don't know where they are or if I'm attempting something that isn't doable.

    Any hints would be great. Thanks for an awesome product!
     
  33. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    Did you delete the Daikon Forge folder before importing the full version? If not, that could cause some issues, although I have to admit I haven't seen what I think you are describing. Are you getting any compiler errors or warnings?

    Can you please describe what your experiencing in more detail? It might help in figuring out how to get you going, as the examples should be very easy to access.
     
  34. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Just note that using something like this also allocates garbage, simply passing a lambda into a method taking a delegate allocates memory for each call. Something like this is usually not acceptable when building mobile games.
     
  35. Justei

    Justei

    Joined:
    Aug 31, 2012
    Posts:
    133
    Well, I just recently got DF-GUI so I only had the latest version.
    This happens when trying to adding new textures to an existing atlas, but only when those textures are being updated (upgrading etc).

    After replacing the file I got the following errors (and still can't upgrade).

    Code (csharp):
    1.  
    2. Assets/Resources/External Resources/Packages/Daikon Forge/DFGUI/Editor/dfTextureAtlasInspector.cs(399,29): error CS0117: `dfEditorUtil' does not contain a definition for `BeginGroup'
    3.  
    4.  
    5. Assets/Resources/External Resources/Packages/Daikon Forge/DFGUI/Editor/dfTextureAtlasInspector.cs(571,29): error CS0117: `dfEditorUtil' does not contain a definition for `BeginGroup'
    6.  
    7.  
    8. Assets/Resources/External Resources/Packages/Daikon Forge/DFGUI/Editor/dfTextureAtlasInspector.cs(739,29): error CS0117: `dfEditorUtil' does not contain a definition for `BeginGroup'
    9.  
    10.  
    11. Assets/Resources/External Resources/Packages/Daikon Forge/DFGUI/Editor/dfTextureAtlasInspector.cs(764,29): error CS0117: `dfEditorUtil' does not contain a definition for `BeginGroup'
    12.  
    13.  
    14. And when trying to upgrade/update a texture:
    15.  
    16. System.NullReferenceException: Object reference not set to an instance of an object
    17.   at dfTextureAtlasInspector.<rebuildAtlas>m__91 (.<>__AnonType0`2 i) [0x00000] in C:\Users\Public\Documents\Unity Projects\LifelessClient\Assets\Resources\External Resources\Packages\Daikon Forge\DFGUI\Editor\dfTextureAtlasInspector.cs:166
    18.   at System.Linq.SortSequenceContext`2[<>__AnonType0`2[dfAtlas+ItemInfo,UnityEngine.Texture2D],System.Int32].Initialize (.<>__AnonType0`2[] elements) [0x00000] in <filename unknown>:0
    19.   at System.Linq.QuickSort`1[<>__AnonType0`2[dfAtlas+ItemInfo,UnityEngine.Texture2D]].PerformSort () [0x00000] in <filename unknown>:0
    20.   at System.Linq.QuickSort`1+<Sort>c__Iterator21[<>__AnonType0`2[dfAtlas+ItemInfo,UnityEngine.Texture2D]].MoveNext () [0x00000] in <filename unknown>:0
    21.   at System.Collections.Generic.List`1[<>__AnonType0`2[dfAtlas+ItemInfo,UnityEngine.Texture2D]].AddEnumerable (IEnumerable`1 enumerable) [0x0001a] in /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:128
    22.   at System.Collections.Generic.List`1[<>__AnonType0`2[dfAtlas+ItemInfo,UnityEngine.Texture2D]]..ctor (IEnumerable`1 collection) [0x00025] in /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:65
    23.   at System.Linq.Enumerable.ToList[<>__AnonType0`2] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
    24.   at dfTextureAtlasInspector.rebuildAtlas (.dfAtlas atlas) [0x00014] in C:\Users\Public\Documents\Unity Projects\LifelessClient\Assets\Resources\External Resources\Packages\Daikon Forge\DFGUI\Editor\dfTextureAtlasInspector.cs:163
    25. UnityEngine.Debug:LogError(Object, Object)
    26. dfTextureAtlasInspector:rebuildAtlas(dfAtlas) (at Assets/Resources/External Resources/Packages/Daikon Forge/DFGUI/Editor/dfTextureAtlasInspector.cs:212)
    27. dfTextureAtlasInspector:AddTexture(dfAtlas, Texture2D[]) (at Assets/Resources/External Resources/Packages/Daikon Forge/DFGUI/Editor/dfTextureAtlasInspector.cs:277)
    28. dfTextureAtlasInspector:addSelectedTextures(dfAtlas) (at Assets/Resources/External Resources/Packages/Daikon Forge/DFGUI/Editor/dfTextureAtlasInspector.cs:784)
    29. dfTextureAtlasInspector:ShowAddTextureOption(dfAtlas) (at Assets/Resources/External Resources/Packages/Daikon Forge/DFGUI/Editor/dfTextureAtlasInspector.cs:764)
    30. dfTextureAtlasInspector:OnInspectorGUI() (at Assets/Resources/External Resources/Packages/Daikon Forge/DFGUI/Editor/dfTextureAtlasInspector.cs:382)
    31. UnityEditor.DockArea:OnGUI()
    32.  
    33.  
     
  36. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    Oh... I forgot that the file I uploaded had references to recent changes that have not been released yet. I'll see about putting together a hotfix later today.
     
  37. Justei

    Justei

    Joined:
    Aug 31, 2012
    Posts:
    133
    Thanks :) I appreciate it, because the only other way I can actually update textures in my atlas is to remake the atlas completely from scratch, and then I have to re-assign every single item in my whole GUI system. Which is quite a process :p.
     
  38. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    You also forgot to answer this. As a customer, your response interested me.
     
  39. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    I didn't forget, I just didn't want to engage in a theoretical discussion. My point wasn't to say "See? I use this, so no memory allocations!", it was to illustrate that someone who had already decided that the library "screams memory allocations" without actually seeing the entire codebase in person may not fully appreciate just how much effort I've put into the library, and that a casual glance at some isolated portions of the code may not give the full picture.

    It is undeniably true that if you pass that function a lambda, it will allocate a small amount of memory for that lambda. The method signature I showed above doesn't require passing a lambda, however. It also allows you to pass the address of a function which returns a boolean and takes as a parameter a single instance of the type for which the list was type-bound. I cannot find anywhere in the current developer codebase where any of those functions are being passed a lambda on a per-frame basis (in fact, they are rarely used in any form in perf-critical sections), although there are some lambdas used in non-performance-critical areas that occur only on infrequent occasions (usually direct interaction between the user and the control).

    I'm very well aware of what does and does not allocate memory, and have taken great pains to keep memory allocations to a minimum, and take care to verify my results with the profiler.

    If there are specific instances of unnecessary memory allocations that you'd like to see me address, please let me know. I'm absolutely dedicated to making DFGUI as performant as possible, for all platforms including mobile.
     
    Last edited: Dec 7, 2013
  40. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    Great! Thanks!
     
  41. DigiLusionist

    DigiLusionist

    Joined:
    Apr 30, 2007
    Posts:
    213
    Takuan, sent you a PM regarding requested functionality for DF-GUI.
     
  42. Silly_Rollo

    Silly_Rollo

    Joined:
    Dec 21, 2012
    Posts:
    501
    Any idea why my text fields are sometimes fairly slow to update? By that I mean my game is humming along 100+fps and I change the .Text of a label or button and rather than an instant update (as I'd expect) there is a perceptible few seconds lag for the text field to update visually (the .text field is instantly changed in debug).

    This can be most obvious when you have a text block with some info, you Hide it, and then when you call it again you change the text and Show it. Not 100% of the time but more often the not the block will show up with the old text and then it'll update to the new text shortly after appearing.

    I know this is a pain in the ass to debug because it is isn't consistent but I didn't know if there are any options that change the performance of the text rendering to try.
     
  43. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462


    +1 NJG Minimap and Daikon ! Great combination. I own Both.
     
  44. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Thank.
     
  45. DigiLusionist

    DigiLusionist

    Joined:
    Apr 30, 2007
    Posts:
    213
    Just purchased this tool.

    Now giggling like a school girl...
     
  46. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    Which version are you using? There was a bug several versions back were that might have happened in some situations, but it has been resolved for a bit. If that's not it, then I'm not sure. More info would help. You say it's not consistent, but if you do notice a pattern then I'd certainly like to know.
     
  47. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    I hope that's a good thing :D

    Got your PM, sounds like something that would make a great demo/sample. Not sure when I'll have time to do something like that, but will definitely at least do something similar when I can.
     
  48. DigiLusionist

    DigiLusionist

    Joined:
    Apr 30, 2007
    Posts:
    213
    Now that I am learning this tool, I will try to create the Card Play Functionality I mentioned. If I am successful, I will post it for you to see.
     
  49. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Reporting,

    It seems drag and drop requires pixel perfect. If not, there is an offset to the dragged sprite. I'm scaling in mobile so can't use pixel perfect.
     
  50. TakuanDaikon

    TakuanDaikon

    Joined:
    Jun 6, 2010
    Posts:
    268
    The issue causing this has been reported on our support forums, and has already been fixed in the dev branch. An update with the fix will be released soon.