Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Randomizer New Features and minor bug fix #365

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

MeishinTale
Copy link

Adds new features and editor UX to the DCS Randomizer.
See example scene in Examples > DynamicCharacterSystem Examples > UMA DCS Demo - Random Characters v2.

---------- Details changes -----------
UMARandomizer.cs : Added features
Refactored original UMARandomizer into UMARandomizerItems.cs and UMARandomizer.cs (Scriptable Object)
Additional Features ; Randomizer Definition, Global Shared Colors, Utilities (Copy Race Randomizer, Update DNA List)

UMARandomizerEditor.cs : Added features
Additional Features ; Randomizer Definition, Global Shared Colors, Utilities (Copy Race Randomizer, Update DNA List)

UMARandomizerItems.cs : UMARandomizer refactorisation
Refactored with all classes from UMARandomizer.cs except UMARandomizer (SO) class
RandomDNA : Added Constructor public RandomDNA(RandomDNA randomDNA)
RandomWardrobeSlot : Added a DeepCopy()
RandomAvatar : Added Copy feature ;
-> public void CopyFrom(RandomAvatar srcAvatar)
-> private static void CopyFromSrc(List src, List dest, Func<T, string> selector, Action<T, T> setter, Func<T, T> constructor)

UMARandomizerDefinitionPropertyDrawer.cs : UMARandomizer Property Drawer

UMARandomAvatarV2.cs : UMARandomAvatar Overhaul

UMARandomizerGenerationPropertyDrawer.cs : UMARandomAvatarV2 Property Drawer

GUIHelper : Refactoring and added functionalities
L94-102 : Added Static Color Class Helper
L106-146 : Added Static Style Class Helper
L147-214 : Refactored BeginHorizontal/vertical Padded/Indented
L323-336 : New Foldout bar variant usint GUIContent : FoldoutBar(bool foldout, string content, GUIContent tooltip)
L291-336 : Added FoldoutBar code summaries
L458 : ToolbarStyleHelp refactored into HelpGUI
End : Added DropAreaGUI

CharacterBaseEditor.cs : Add An error message if Race Base Slots have unassigned Material
L1684 : in OnGUI() :
if(_overlayData.asset.material == null) Debug.LogError($"Error - No material set in Overlay {_overlayData.overlayName}");

RecipeEditor.cs : Fix warnings
L56 : OnSceneDrag(SceneView view) : -> OnSceneDrag(SceneView view, int index):
Fix for : ArgumentException: method argument length mismatch System.Delegate.CreateDelegate
Failed to dispose EditorWrapper.

DynamicDNAConverterBehaviour.cs : Fix warnings
L317 and L335 : Fix 'PrefabStage.prefabAssetPath' is obsolete: 'prefabAssetPath has been deprecated. Use assetPath instead.'

UMARandomizer.cs
Refactored original UMARandomizer into UMARandomizerItems.cs and UMARandomizer.cs (Scriptable Object)
Additional Features ; Randomizer Definition, Global Shared Colors, Utilities (Copy Race Randomizer, Update DNA List)

UMARandomizerEditor.cs
Additional Features ; Randomizer Definition, Global Shared Colors, Utilities (Copy Race Randomizer, Update DNA List)

UMARandomizerItems.cs
Refactored with all classes from UMARandomizer.cs except UMARandomizer (SO) class
RandomDNA : Added Constructor public RandomDNA(RandomDNA randomDNA)
RandomWardrobeSlot : Added a DeepCopy()
RandomAvatar : Added Copy feature ;
-> public void CopyFrom(RandomAvatar srcAvatar)
-> private static void CopyFromSrc<T>(List<T> src, List<T> dest, Func<T, string> selector, Action<T, T> setter, Func<T, T> constructor)

UMARandomizerDefinitionPropertyDrawer.cs
UMARandomizer Property Drawer

UMARandomAvatarV2.cs
UMARandomAvatar Overhaul

UMARandomizerGenerationPropertyDrawer.cs
UMARandomAvatarV2 Property Drawer

GUIHelper
L94-102 : Added Static Color Class Helper
L106-146 : Added Static Style Class Helper
L147-214 : Refactored BeginHorizontal/vertical Padded/Indented
L323-336 : New Foldout bar variant usint GUIContent : FoldoutBar(bool foldout, string content, GUIContent tooltip)
L291-336 : Added FoldoutBar code summaries
L458 : ToolbarStyleHelp refactored into HelpGUI

CharacterBaseEditor
L1684 : in OnGUI(), Add An error message if Race Base Slots have unassigned Material
if(_overlayData.asset.material == null)
			Debug.LogError($"Error - No material set in Overlay {_overlayData.overlayName}");

RecipeEditor.cs
L56 : OnSceneDrag(SceneView view) : -> OnSceneDrag(SceneView view, int index):
Fix for : ArgumentException: method argument length mismatch System.Delegate.CreateDelegate
Failed to dispose EditorWrapper.

DynamicDNAConverterBehaviour.cs
L317 and L335 : Fix 'PrefabStage.prefabAssetPath' is obsolete: 'prefabAssetPath has been deprecated. Use assetPath instead.'
@Jaimi
Copy link
Contributor

Jaimi commented Sep 7, 2022

I will merge this manually, due to conflicting changes in alpha. Thanks for supporting UMA!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants