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); }
internal void OnAnimatableCreated(StrEventArgs e) { EventHandler <StrEventArgs> temp = AnimatableCreated; if (temp != null) { temp(this, e); } }
private void ProcessTextureFiles(object sender, StrEventArgs e) { try { PluginManager.Instance.ProcessTexture(e); } catch (UnityException exp) { Debug.LogError(exp.Message); } }
public void ProcessTexture(StrEventArgs strArgs) { try { AvatarResourceManager.CopyTexture(strArgs.StrVar); } catch (Exception exp) { Debug.LogError(exp.Message); throw; } }
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); } }
private static void ModuleInstalled(object sender, StrEventArgs e) { Console.WriteLine($"The nuget package {e.Value} is installed"); }
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; }