CreateEffect() public method

public CreateEffect ( SpriteStudioEffect effect ) : void
effect SpriteStudioEffect
return void
コード例 #1
0
        bool CreateEffects(SpriteStudioBaker baker)
        {
            if (baker.effectList == null)
                return true;

            string message = null;
            try
            {
                for (int i = 0; i < baker.effectList.Count; i++)
                {
                    SpriteStudioEffect effect = baker.effectList [i];
                    message = effect.name;
                    EditorUtility.DisplayProgressBar("Sprite Studio For Unity", "Create Effect(" + (i + 1) + "/" + baker.effectList.Count + ") : " + effect.name, 0.8f);
                    baker.CreateEffect(effect);
                }
            } catch (Exception e)
            {
                EditorUtility.DisplayDialog("Error", "Create Effect : " + message, "OK");
                Debug.Log(e.StackTrace);
                return false;
            }
            return true;
        }