Skip to content

Commit

Permalink
Merge pull request #82 from soupday/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
soupday authored Apr 25, 2023
2 parents 8b69655 + 6b69fdb commit 552ff59
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 21 deletions.
5 changes: 2 additions & 3 deletions Editor/AnimPlayerGUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ public static void ClosePlayer()
{
EditorApplication.update -= UpdateDelegate;

if (AnimationMode.InAnimationMode())
AnimationMode.StopAnimationMode();
WindowManager.StopAnimationMode();

if (CharacterAnimator)
{
Expand Down Expand Up @@ -133,7 +132,7 @@ static public void UpdateAnimatorClip(Animator animator, AnimationClip clip)
if (doneInitFace) ResetFace(true, true);

// stop animation mode
if (AnimationMode.InAnimationMode()) AnimationMode.StopAnimationMode();
WindowManager.StopAnimationMode();

if (!animator || CharacterAnimator != animator) doneInitFace = false;

Expand Down
2 changes: 1 addition & 1 deletion Editor/ColliderManagerEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ public void UpdatePrefab(Object component)
{
WindowManager.HideAnimationPlayer(true);
WindowManager.HideAnimationRetargeter(true);
if (AnimationMode.InAnimationMode()) AnimationMode.StopAnimationMode();
WindowManager.StopAnimationMode();

GameObject prefabRoot = PrefabUtility.GetOutermostPrefabInstanceRoot(component);
if (prefabRoot)
Expand Down
6 changes: 3 additions & 3 deletions Editor/ImporterWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ private void OnGUI()
if (GUILayout.Button(new GUIContent(iconActionRefresh, "Reload the character list, for after adding or removing characters."),
GUILayout.Width(ACTION_BUTTON_SIZE), GUILayout.Height(ACTION_BUTTON_SIZE)))
{
refreshAfterGUI = true;
EditorApplication.delayCall += RefreshCharacterList;
}
GUILayout.FlexibleSpace();
GUILayout.EndHorizontal();
Expand Down Expand Up @@ -1290,8 +1290,8 @@ bool ShowBakedCharacter(GameObject bakedAsset)
void RebuildCharacterPhysics()
{
WindowManager.HideAnimationPlayer(true);
WindowManager.HideAnimationRetargeter(true);
if (AnimationMode.InAnimationMode()) AnimationMode.StopAnimationMode();
WindowManager.HideAnimationRetargeter(true);
WindowManager.StopAnimationMode();

GameObject prefabAsset = Physics.RebuildPhysics(contextCharacter);

Expand Down
5 changes: 2 additions & 3 deletions Editor/Physics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,16 +279,15 @@ private void ReadPhysicsJson(QuickJSON physicsJson, QuickJSON characterJson)

public GameObject AddPhysics()
{
bool animationMode = AnimationMode.InAnimationMode();
if (animationMode) AnimationMode.StopAnimationMode();
bool animationMode = WindowManager.StopAnimationMode();

AddColliders();
AddCloth();
AddSpringBones();

prefabAsset = PrefabUtility.SaveAsPrefabAsset(prefabInstance, AssetDatabase.GetAssetPath(prefabAsset));

if (animationMode) AnimationMode.StartAnimationMode();
WindowManager.RestartAnimationMode(animationMode);

return prefabAsset;
}
Expand Down
2 changes: 1 addition & 1 deletion Editor/Pipeline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public enum MaterialQuality { None, Default, High, Baked }

public static class Pipeline
{
public const string VERSION = "1.4.8";
public const string VERSION = "1.4.9";

#if HDRP_10_5_0_OR_NEWER
// version
Expand Down
7 changes: 3 additions & 4 deletions Editor/WeightMapperEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,11 @@ public void OnClothInspectorGUI()
GUI.backgroundColor = Color.Lerp(background, Color.white, 0.25f);
if (GUILayout.Button("Rebuild Constraints", GUILayout.Width(BUTTON_WIDTH)))
{
bool animationMode = AnimationMode.InAnimationMode();
if (animationMode) AnimationMode.StopAnimationMode();
bool animationMode = WindowManager.StopAnimationMode();

weightMapper.ApplyWeightMap();

if (animationMode) AnimationMode.StartAnimationMode();
WindowManager.RestartAnimationMode(animationMode);
}
GUI.backgroundColor = background;
GUILayout.FlexibleSpace();
Expand Down Expand Up @@ -124,7 +123,7 @@ public void UpdatePrefab(Object component)
{
WindowManager.HideAnimationPlayer(true);
WindowManager.HideAnimationRetargeter(true);
if (AnimationMode.InAnimationMode()) AnimationMode.StopAnimationMode();
WindowManager.StopAnimationMode();

GameObject prefabRoot = PrefabUtility.GetOutermostPrefabInstanceRoot(component);
if (prefabRoot)
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ Links
[HDRP Version](https://github.com/soupday/cc_unity_tools_HDRP)

Note: There are two verions of the HDRP package
- [**CC Unity Tools HDRP10**](https://github.com/soupday/cc_unity_tools_HDRP/releases/tag/1.4.8.HDRP10) for Unity 2020.3 to 2021.1
- [**CC Unity Tools HDRP12**](https://github.com/soupday/cc_unity_tools_HDRP/releases/tag/1.4.8.HDRP12) for Unity 2021.2 and upwards
- [**CC Unity Tools HDRP10**](https://github.com/soupday/cc_unity_tools_HDRP/releases/tag/1.4.9.HDRP10) for Unity 2020.3 to 2021.1
- [**CC Unity Tools HDRP12**](https://github.com/soupday/cc_unity_tools_HDRP/releases/tag/1.4.9.HDRP12) for Unity 2021.2 and upwards

The main repository contains the HDRP10 version. See the releases page for the HDRP12 version.

[URP Version](https://github.com/soupday/cc_unity_tools_URP)

Note: There are two verions of the URP package
- [**CC Unity Tools URP10**](https://github.com/soupday/cc_unity_tools_URP/releases/tag/1.4.8.URP10) for Unity 2020.3 to 2021.1
- [**CC Unity Tools URP12**](https://github.com/soupday/cc_unity_tools_URP/releases/tag/1.4.8.URP12) for Unity 2021.2 and upwards
- [**CC Unity Tools URP10**](https://github.com/soupday/cc_unity_tools_URP/releases/tag/1.4.9.URP10) for Unity 2020.3 to 2021.1
- [**CC Unity Tools URP12**](https://github.com/soupday/cc_unity_tools_URP/releases/tag/1.4.9.URP12) for Unity 2021.2 and upwards

The main repository contains the URP10 version. See the releases page for the URP12 version.

[3D/Built-in Version](https://github.com/soupday/cc_unity_tools_3D)

The built-in pipeline version is for Unity 2019.4 and upwards.
- [**CC Unity Tools 3D**](https://github.com/soupday/cc_unity_tools_3D/releases/tag/1.4.8) for Unity 2019.4 and upwards
- [**CC Unity Tools 3D**](https://github.com/soupday/cc_unity_tools_3D/releases/tag/1.4.9) for Unity 2019.4 and upwards

How it works
============
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.soupday.cc3_unity_tools",
"version": "1.4.8",
"version": "1.4.9",
"displayName": "CC/iC Unity Tools HDRP",
"description": "Unity importer for Character Creator 3 & 4 and iClone 7 and 8.",
"unity": "2020.3",
Expand Down

0 comments on commit 552ff59

Please sign in to comment.