예제 #1
0
        protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container)
        {
            YAMLMappingNode node = base.ExportYAMLRoot(container);

            node.AddSerializedVersion(GetSerializedVersion(container.ExportVersion));
            node.Add(GravityName, Gravity.ExportYAML(container));
            node.Add(DefaultMaterialName, DefaultMaterial.ExportYAML(container));
            node.Add(BounceThresholdName, BounceThreshold);
            node.Add(SleepThresholdName, GetSleepThreshold(container.Version));
            node.Add(DefaultContactOffsetName, GetDefaultContactOffset(container.Version));
            node.Add(DefaultSolverIterationsName, DefaultSolverIterations);
            node.Add(DefaultSolverVelocityIterationsName, GetDefaultSolverVelocityIterations(container.Version));
            node.Add(QueriesHitBackfacesName, QueriesHitBackfaces);
            node.Add(QueriesHitTriggersName, GetQueriesHitTriggers(container.Version));
            node.Add(EnableAdaptiveForceName, EnableAdaptiveForce);
            node.Add(ClothInterCollisionDistanceName, ClothInterCollisionDistance);
            node.Add(ClothInterCollisionStiffnessName, ClothInterCollisionStiffness);
            node.Add(ContactsGenerationName, (int)GetContactsGeneration(container.Version));
            node.Add(LayerCollisionMatrixName, GetLayerCollisionMatrix(container.Version).ExportYAML(true));
            node.Add(AutoSimulationName, GetAutoSimulation(container.Version));
            node.Add(AutoSyncTransformsName, GetAutoSyncTransforms(container.Version));
            node.Add(ReuseCollisionCallbacksName, ReuseCollisionCallbacks);
            node.Add(ClothInterCollisionSettingsToggleName, ClothInterCollisionSettingsToggle);
            node.Add(ContactPairsModeName, (int)ContactPairsMode);
            node.Add(BroadphaseTypeName, (int)BroadphaseType);
            node.Add(WorldBoundsName, GetWorldBounds(container.Version).ExportYAML(container));
            node.Add(WorldSubdivisionsName, GetWorldSubdivisions(container.Version));
            if (IsReadFrictionType(container.ExportVersion))
            {
                node.Add(FrictionTypeName, (int)FrictionType);
                node.Add(EnableEnhancedDeterminismName, EnableEnhancedDeterminism);
                node.Add(EnableUnifiedHeightmapsName, GetEnableUnifiedHeightmaps(container.Version));
            }
            return(node);
        }
예제 #2
0
		protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container)
		{
			YAMLMappingNode node = base.ExportYAMLRoot(container);
			node.AddSerializedVersion(GetSerializedVersion(container.Version));
			node.Add("m_Gravity", Gravity.ExportYAML(container));
			node.Add("m_DefaultMaterial", DefaultMaterial.ExportYAML(container));
			node.Add("m_BounceThreshold", BounceThreshold);
			node.Add("m_SleepThreshold", GetSleepThreshold(container.Version));
			node.Add("m_DefaultContactOffset", GetDefaultContactOffset(container.Version));
			node.Add("m_DefaultSolverIterations", DefaultSolverIterations);
			node.Add("m_DefaultSolverVelocityIterations", GetDefaultSolverVelocityIterations(container.Version));
			node.Add("m_QueriesHitBackfaces", QueriesHitBackfaces);
			node.Add("m_QueriesHitTriggers", GetQueriesHitTriggers(container.Version));
			node.Add("m_EnableAdaptiveForce", EnableAdaptiveForce);
			node.Add("m_ClothInterCollisionDistance", ClothInterCollisionDistance);
			node.Add("m_ClothInterCollisionStiffness", ClothInterCollisionStiffness);
			node.Add("m_ContactsGeneration", (int)GetContactsGeneration(container.Version));
			node.Add("m_LayerCollisionMatrix", GetLayerCollisionMatrix(container.Version).ExportYAML(true));
			node.Add("m_AutoSimulation", GetAutoSimulation(container.Version));
			node.Add("m_AutoSyncTransforms", GetAutoSyncTransforms(container.Version));
			node.Add("m_ClothInterCollisionSettingsToggle", ClothInterCollisionSettingsToggle);
			node.Add("m_ContactPairsMode", (int)ContactPairsMode);
			node.Add("m_BroadphaseType", (int)BroadphaseType);
			node.Add("m_WorldBounds", GetWorldBounds(container.Version).ExportYAML(container));
			node.Add("m_WorldSubdivisions", GetWorldSubdivisions(container.Version));
			return node;
		}
예제 #3
0
        protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container)
        {
            YAMLMappingNode node = base.ExportYAMLRoot(container);

            node.AddSerializedVersion(GetSerializedVersion(container.Version));
            node.Add("m_Gravity", Gravity.ExportYAML(container));
            node.Add("m_DefaultMaterial", DefaultMaterial.ExportYAML(container));
            node.Add("m_VelocityIterations", VelocityIterations);
            node.Add("m_PositionIterations", PositionIterations);
            node.Add("m_VelocityThreshold", GetVelocityThreshold(container.Version));
            node.Add("m_MaxLinearCorrection", GetMaxLinearCorrection(container.Version));
            node.Add("m_MaxAngularCorrection", GetMaxAngularCorrection(container.Version));
            node.Add("m_MaxTranslationSpeed", GetMaxTranslationSpeed(container.Version));
            node.Add("m_MaxRotationSpeed", GetMaxRotationSpeed(container.Version));
            node.Add("m_BaumgarteScale", GetBaumgarteScale(container.Version));
            node.Add("m_BaumgarteTimeOfImpactScale", GetBaumgarteTimeOfImpactScale(container.Version));
            node.Add("m_TimeToSleep", GetTimeToSleep(container.Version));
            node.Add("m_LinearSleepTolerance", GetLinearSleepTolerance(container.Version));
            node.Add("m_AngularSleepTolerance", GetAngularSleepTolerance(container.Version));
            node.Add("m_DefaultContactOffset", GetDefaultContactOffset(container.Version));
            // 2018
            //node.Add("m_JobOptions", GetJobOptions(container.Version));
            node.Add("m_AutoSimulation", GetAutoSimulation(container.Version));
            node.Add("m_QueriesHitTriggers", QueriesHitTriggers);
            node.Add("m_QueriesStartInColliders", GetQueriesStartInColliders(container.Version));
            node.Add("m_ChangeStopsCallbacks", ChangeStopsCallbacks);
            node.Add("m_CallbacksOnDisable", GetCallbacksOnDisable(container.Version));
            node.Add("m_AutoSyncTransforms", GetAutoSyncTransforms(container.Version));
            node.Add("m_AlwaysShowColliders", GetAlwaysShowColliders());
            node.Add("m_ShowColliderSleep", GetShowColliderSleep(container.Version, container.Flags));
            node.Add("m_ShowColliderContacts", GetShowColliderContacts());
            node.Add("m_ShowColliderAABB", GetShowColliderAABB());
            node.Add("m_ContactArrowScale", GetContactArrowScale(container.Version, container.Flags));
            node.Add("m_ColliderAwakeColor", GetColliderAwakeColor(container.Version, container.Flags).ExportYAML(container));
            node.Add("m_ColliderAsleepColor", GetColliderAsleepColor(container.Version, container.Flags).ExportYAML(container));
            node.Add("m_ColliderContactColor", GetColliderContactColor(container.Version, container.Flags).ExportYAML(container));
            node.Add("m_ColliderAABBColor", GetColliderAABBColor(container.Version, container.Flags).ExportYAML(container));
            node.Add("m_LayerCollisionMatrix", LayerCollisionMatrix.ExportYAML(true));
            return(node);
        }
예제 #4
0
        protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container)
        {
            YAMLMappingNode node = base.ExportYAMLRoot(container);

            node.AddSerializedVersion(GetSerializedVersion(container.ExportVersion));
            node.Add(GravityName, Gravity.ExportYAML(container));
            node.Add(DefaultMaterialName, DefaultMaterial.ExportYAML(container));
            node.Add(VelocityIterationsName, VelocityIterations);
            node.Add(PositionIterationsName, PositionIterations);
            node.Add(VelocityThresholdName, GetVelocityThreshold(container.Version));
            node.Add(MaxLinearCorrectionName, GetMaxLinearCorrection(container.Version));
            node.Add(MaxAngularCorrectionName, GetMaxAngularCorrection(container.Version));
            node.Add(MaxTranslationSpeedName, GetMaxTranslationSpeed(container.Version));
            node.Add(MaxRotationSpeedName, GetMaxRotationSpeed(container.Version));
            node.Add(BaumgarteScaleName, GetBaumgarteScale(container.Version));
            node.Add(BaumgarteTimeOfImpactScaleName, GetBaumgarteTimeOfImpactScale(container.Version));
            node.Add(TimeToSleepName, GetTimeToSleep(container.Version));
            node.Add(LinearSleepToleranceName, GetLinearSleepTolerance(container.Version));
            node.Add(AngularSleepToleranceName, GetAngularSleepTolerance(container.Version));
            node.Add(DefaultContactOffsetName, GetDefaultContactOffset(container.Version));
            // 2018
            //node.Add("m_JobOptions", GetJobOptions(container.Version));
            node.Add(AutoSimulationName, GetAutoSimulation(container.Version));
            node.Add(QueriesHitTriggersName, QueriesHitTriggers);
            node.Add(QueriesStartInCollidersName, GetQueriesStartInColliders(container.Version));
            node.Add(ChangeStopsCallbacksName, ChangeStopsCallbacks);
            node.Add(CallbacksOnDisableName, GetCallbacksOnDisable(container.Version));
            node.Add(AutoSyncTransformsName, GetAutoSyncTransforms(container.Version));
            node.Add(AlwaysShowCollidersName, GetAlwaysShowColliders());
            node.Add(ShowColliderSleepName, GetShowColliderSleep(container.Version, container.Flags));
            node.Add(ShowColliderContactsName, GetShowColliderContacts());
            node.Add(ShowColliderAABBName, GetShowColliderAABB());
            node.Add(ContactArrowScaleName, GetContactArrowScale(container.Version, container.Flags));
            node.Add(ColliderAwakeColorName, GetColliderAwakeColor(container.Version, container.Flags).ExportYAML(container));
            node.Add(ColliderAsleepColorName, GetColliderAsleepColor(container.Version, container.Flags).ExportYAML(container));
            node.Add(ColliderContactColorName, GetColliderContactColor(container.Version, container.Flags).ExportYAML(container));
            node.Add(ColliderAABBColorName, GetColliderAABBColor(container.Version, container.Flags).ExportYAML(container));
            node.Add(LayerCollisionMatrixName, LayerCollisionMatrix.ExportYAML(true));
            return(node);
        }