コード例 #1
0
        public void AddFromComponent(GameObject obj, Component component)
        {
            if (Application.isPlaying)
            {
                return;
            }

            if (obj == null || component == null)
            {
                return;
            }

            var serializedObject        = new SerializedObject(component);
            SerializedProperty property = serializedObject.GetIterator();

            while (property.NextVisible(true))
            {
                if (property.hasVisibleChildren || !AnimatedParameterUtility.IsTypeAnimatable(property.propertyType))
                {
                    continue;
                }

                AddPropertyModification(component, property.propertyPath);
            }
        }
コード例 #2
0
        public static bool CanRecord(SerializedProperty property, WindowState state)
        {
            if (IsPlayableAssetProperty(property))
            {
                return(AnimatedParameterUtility.IsTypeAnimatable(property.propertyType));
            }

            if (GetRecordingTrack(property, state) == null)
            {
                return(false);
            }

            s_TempPropertyModifications.Clear();
            GatherModifications(property, s_TempPropertyModifications);
            return(s_TempPropertyModifications.Any());
        }