Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - eduilnero

Pages: [1]
1
Support / Re: Issues with Unity 2018
« on: February 26, 2019, 08:45:58 am »
Hi guys, I contacted Unikron with some changes to fix the path issue some days ago but so far I have no official response. If you want to try something on your own here is what I did. Unity Experimental brings Prefab Stage which is some context when you access Prefab Edit Mode. I hope it helps.

Code: [Select]
public static string GetPathFromSpriteCollectionInPrefabEditMode(tk2dSpriteCollection gen)
    {
        if (gen == null) return null;

        string assetPath = AssetDatabase.GetAssetPath(gen);
        if (string.IsNullOrEmpty(assetPath))
        {
            PrefabStage prefabStage = PrefabStageUtility.GetPrefabStage(gen.gameObject);
            if (prefabStage != null)
            {
                assetPath = prefabStage.prefabAssetPath;
            }
        }
        return assetPath;
    }

Pages: [1]