Esempio n. 1
0
 private void OnAddComponentClicked(string input)
 {
     if (ReflectionUtility.GetTypeByName(input) is Type type)
     {
         try
         {
             RuntimeHelper.AddComponent <Component>(GOTarget, type);
             UpdateComponents();
         }
         catch (Exception ex)
         {
             ExplorerCore.LogWarning($"Exception adding component: {ex.ReflectionExToString()}");
         }
     }
     else
     {
         ExplorerCore.LogWarning($"Could not find any Type by the name '{input}'!");
     }
 }