Пример #1
0
 private static bool CheckIsNeedCanvasRenderer(CanvasRenderer canvasRenderer)
 {
     Component[] components = canvasRenderer.GetComponents <Component>();
     for (int index = 0; index < components.Length; index++)
     {
         Component component = components[index];
         Type      type      = component.GetType();
         bool      isNeed    = component is Text || type.IsSubclassOf(EditorConfig.TextType) || component is Image ||
                               type.IsSubclassOf(EditorConfig.ImageType) || component is RawImage ||
                               type.IsSubclassOf(EditorConfig.RawImageType);
         if (isNeed)
         {
             return(true);
         }
     }
     return(false);
 }