Ejemplo n.º 1
0
		public void ApplyPreset(RagdollPresetMetadata preset, bool bake = true)
		{
			if (customization == null)
			{
				customization = human.ragdoll.gameObject.AddComponent<RagdollCustomization>();
			}
			customization.ApplyPreset(preset, forceRebuild: true);
			customization.RebindColors(bake, compress: true);
			customization.ClearOutCachedClipVolumes();
		}
Ejemplo n.º 2
0
 private void ApplyPreset(RagdollPresetMetadata preset, bool bake = true)
 {
     if (customization == null)
     {
         customization = ragdoll.gameObject.AddComponent <RagdollCustomization>();
     }
     customization.ApplyPreset(preset, forceRebuild: true);
     customization.RebindColors(bake, compress: true);
     RigClipVolume[] componentsInChildren = GetComponentsInChildren <RigClipVolume>();
     if (customization.main != null)
     {
         RagdollModelSkinnedMesh[] componentsInChildren2 = customization.main.GetComponentsInChildren <RagdollModelSkinnedMesh>();
         for (int i = 0; i < componentsInChildren2.Length; i++)
         {
             componentsInChildren2[i].Clip(componentsInChildren);
         }
     }
 }
 public void SetColor(WorkshopItemType part, int channel, Color color)
 {
     activeCustomization.preset.SetColor(part, channel, color);
     activeCustomization.ApplyPreset(activeCustomization.preset);
     activeCustomization.RebindColors(bake: false);
 }