Exemplo n.º 1
0
        internal static bool BuildAvatarFromPhotos()
        {
            bool success = false;

            try
            {
                Animatable animatable = BuildAvatarFromFrontImage();

                if (animatable != null)
                {
                    try
                    {
                        string       texPath = ResourceDirectories.TempModelDirectory;
                        StrEventArgs strArgs = new StrEventArgs(texPath);
                        Controller.Instance.OnAnimatableCreated(strArgs);
                    }
                    catch (Exception oacExp)
                    {
                        Debug.LogError(oacExp.Message);
                    }

                    success = GenerateUnityModel(animatable);
                }
            }
            catch
            {
                throw;
            }


            return(success);
        }
Exemplo n.º 2
0
        internal void OnAnimatableCreated(StrEventArgs e)
        {
            EventHandler <StrEventArgs> temp = AnimatableCreated;

            if (temp != null)
            {
                temp(this, e);
            }
        }
Exemplo n.º 3
0
 private void ProcessTextureFiles(object sender, StrEventArgs e)
 {
     try
     {
         PluginManager.Instance.ProcessTexture(e);
     }
     catch (UnityException exp)
     {
         Debug.LogError(exp.Message);
     }
 }
Exemplo n.º 4
0
 public void ProcessTexture(StrEventArgs strArgs)
 {
     try
     {
         AvatarResourceManager.CopyTexture(strArgs.StrVar);
     }
     catch (Exception exp)
     {
         Debug.LogError(exp.Message);
         throw;
     }
 }
Exemplo n.º 5
0
        void UIController_AudioPathSet(object sender, StrEventArgs e)
        {
            try
            {
                if ((!_audioPathSet) && (e != null))
                {
                    string audioPath = e.StrVar;

                    if (File.Exists(audioPath))
                    {
                        LoadAudio(audioPath);
                        _audioPathSet = true;
                    }
                }
            }
            catch (UnityException exp)
            {
                Debug.LogError(exp.Message);
            }
        }
Exemplo n.º 6
0
 private static void ModuleInstalled(object sender, StrEventArgs e)
 {
     Console.WriteLine($"The nuget package {e.Value} is installed");
 }
Exemplo n.º 7
0
 private static void ModuleCannotBeInstalled(object sender, StrEventArgs e)
 {
     Console.ForegroundColor = ConsoleColor.Red;
     Console.WriteLine($"The nuget package {e.Value} cannot be installed");
     Console.ForegroundColor = ConsoleColor.White;
 }