예제 #1
0
 public static void ResetLastDrawerData()
 {
     LastPropertyUsedCustomDrawer     = false;
     LastPropertyDoesntAllowAnimation = false;
     LastPropertyDrawer     = null;
     LastPropertyDrawerType = DrawerType.None;
 }
        public T GetPropertyDrawer <T>(MaterialProperty matProp, Shader shader) where T : MaterialPropertyDrawer
        {
            MaterialPropertyDrawer result = null;
            Dictionary <System.Type, MaterialPropertyDrawer> cache;

            if (!_cachedPropDrawerByTypes.TryGetValue(matProp, out cache))
            {
                GetDecorators(matProp, shader);
                GetDrawer(matProp, shader);
                if (!_cachedPropDrawerByTypes.TryGetValue(matProp, out cache))
                {
                    return(result as T);
                }
            }
            cache.TryGetValue(typeof(T), out result);
            return(result as T);
        }
예제 #3
0
 public static void ResetLastDrawerData()
 {
     lastPropertyUsedCustomDrawer = false;
     lastPropertyDrawer           = null;
     lastPropertyDrawerType       = DrawerType.None;
 }