foriero

  • 26 nov. 2022
  • Inscrit 8 févr. 2014
  • Curves View - thanks God it is back!!! ;-);-);-) if you remember it was an immediate complain from our animator for 4.0 release. Graph View is nice to have but majority of animations that don't take ages to produce using Curves View.


    4k icons. :-) Thank you.

  • Thank you.


    Harald, tested the new functionality and regretfully have to say that it is messing with the other things drag and drop in Hierarchy. Now we can not a drag thing, not related to spine, just ordinary objects!!! I'm latest 2021.3.2f1 We also can not reorder skeletons in hierarchy, parent things etc. A bit mess :-)


    Any update on this?

  • Harald we need to do our import processing things and it would help us a lot if we have import finished callback so that we hook right after it and do our things. Is there a way to get to know when spine has finished with the import procedures?

  • Harald, we have set Default Shader but for some reason our material gets deleted and Atlas material reference is wiped out. The null exception is gone but when reimporting the spine folder, material gets deleted and Atlas material references are gone.

  • Harald, when I drag SkeletonData in the project view on a specific object, the new object is not instantiated under the object I dragged it onto. In other words I expect the new object get nested under the object I dropped it on. This is especially handy when you drag that object on a Canvas. At this moment you instantiate the object outside the canvas which causing issues with scaling when we manually drag it afterward under the Canvas object.

    Thanks, Marek.

  • Yes we stick to 4.0 this time. Yes latest from git.

  • ArgumentNullException: Value cannot be null.
    Parameter name: shader
    UnityEngine.Material..ctor (UnityEngine.Shader shader) (at /Users/bokken/buildslave/unity/build/Runtime/Export/Shaders/Material.bindings.cs:18)
    Spine.Unity.Editor.AssetUtility.IngestSpineAtlas (UnityEngine.TextAsset atlasText, System.Collections.Generic.List1[T] texturesWithoutMetaFile) (at Assets/Git/Spine/Editor/spine-unity/Editor/Utility/AssetUtility.cs:581)
    Spine.Unity.Editor.AssetUtility.ImportSpineContent (System.String[] imported, System.Collections.Generic.List
    1[T] texturesWithoutMetaFile, System.Boolean reimport) (at Assets/Git/Spine/Editor/spine-unity/Editor/Utility/AssetUtility.cs:329)
    Spine.Unity.Editor.AssetUtility.HandleOnPostprocessAllAssets (System.String[] imported, System.Collections.Generic.List`1[T] texturesWithoutMetaFile) (at Assets/Git/Spine/Editor/spine-unity/Editor/Utility/AssetUtility.cs:113)
    Spine.Unity.Editor.SpineEditorUtilities.OnPostprocessAllAssets (System.String[] imported, System.String[] deleted, System.String[] moved, System.String[] movedFromAssetPaths) (at Assets/Git/Spine/Editor/spine-unity/Editor/Utility/SpineEditorUtilities.cs:98)
    System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <e38a6d3ee47c43eb9b2e49c63fc0aa48>:0)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <e38a6d3ee47c43eb9b2e49c63fc0aa48>:0)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <e38a6d3ee47c43eb9b2e49c63fc0aa48>:0)
    UnityEditor.AssetPostprocessingInternal.InvokeMethod (System.Reflection.MethodInfo method, System.Object[] args) (at /Users/bokken/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:1145)
    UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets, System.Boolean didDomainReload) (at /Users/bokken/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:385)

  • Harald, is there a component that translates PolygonCollider2D ( BoundingBoxGraphicsFollower ) into UnityEvents ( OnEnter, OnExit, OnHover, OnClick, OnDown, OnUp ) Thanks, Marek.

  • Thank you, Harald.

  • Hey Harald, may I nicely ask for URP 2D shaders update? Thank you, Marek.

  • The issue is that Harald introduced csharp as an assembly definition. Simple solution is to delete all spine related parts. Import. Add reference to csharp assembly definition in your own assembly definitions.

  • Hey, do you have Spine NodeCanvas actions that you can share? Thanks, Marek.

  • Ok founding pixel bounds of the image was easy, but how do I scale those bounds into image aspect ratio keeping the bounds relatively on the same place as it was in the original image? Do you have that code?

    private static Rectangle ImageBounds(Image<Rgba32> image)
            {
                bool RowIsTransparent(Image<Rgba32> img, int y)
                {
                    for (int x = 0; x < image.Width; x++)  { if(img[x,y].A != 0) return false; }
                    return true;
                }
    
            // Return true if this column is all white.
            bool ColumnIsTransparent(Image<Rgba32> img, int x)
            {
                for (int y = 0; y < image.Height; y++) { if(img[x,y].A != 0) return false; }
                return true;
            }
            // ymin.
            int ymin = image.Height - 1;
            for (int y = 0; y < image.Height; y++) { if (!RowIsTransparent(image, y)) { ymin = y; break; } }
            // ymax.
            int ymax = 0;
            for (int y = image.Height - 1; y >= ymin; y
    
    ---
    
    ) { if (!RowIsTransparent(image, y)) { ymax = y; break; } }
                // xmin.
                int xmin = image.Width - 1;
                for (int x = 0; x < image.Width; x++) { if (!ColumnIsTransparent(image, x)) { xmin = x; break; } }
                // xmax.
                int xmax = 0;
                for (int x = image.Width - 1; x >= xmin; x
    
    ---
    
    ) { if (!ColumnIsTransparent(image, x)) { xmax = x; break; } }
                // Build the rectangle.
                return new Rectangle(xmin, ymin, xmax - xmin + 1, ymax - ymin + 1);
            }
    
  • Hi Nate,

    Have a off topic question. How to trim PNGs from transparent pixels keeping the aspect ratio of the image?

    convert input.png -trim output.png

    Above command line will trim all transparent pixels but we need to keep aspect ration so that our exports don't mess the image centers.

    Thanks, Marek.