CUAManager

Plugins CUAManager

Blazedust updated CUAManager with a new update entry:

CUAManager v.1.19

CUAManager v 19

Requires VAM 1.22.0.0 or later!

* Changed trigger plugin preset load order to happen as soon as loading is over after changing a look but before CUAManager's "Post waiting" is finished. This makes plugin presets load as soon as a look finishes loading, skipping the artifical wait for CustomUnityAssets to load too if the look uses such triggers. A minor quality of life improvement for me.

Read the rest of this update entry...
 

@Blazedust Hello! First off thanks for the amazing plugin!

I have a question about the new Merge Plugin (R) feature.
I was testing it out, and I am finding that it doesn't replace the same plugin # but it is clearing the plugin at the target plugin # and then adding a new plugin with a new plugin #
Example:
  1. I have Timeline at plugin #41
  2. I merge-load a preset with just timeline
  3. It clears plugin #41 and adds a new plugin #42 with timeline preset
This sounds like a perfect solution to a headache I've been trying to solve forever!
My other question is: How would I go about triggering this plugin load from a scene trigger/button?
That would be *insert chef's kiss*.
 
@Blazedust Hello! First off thanks for the amazing plugin!

I have a question about the new Merge Plugin (R) feature.
I was testing it out, and I am finding that it doesn't replace the same plugin # but it is clearing the plugin at the target plugin # and then adding a new plugin with a new plugin #
Example:
  1. I have Timeline at plugin #41
  2. I merge-load a preset with just timeline
  3. It clears plugin #41 and adds a new plugin #42 with timeline preset
This sounds like a perfect solution to a headache I've been trying to solve forever!
My other question is: How would I go about triggering this plugin load from a scene trigger/button?
That would be *insert chef's kiss*.
It works as you describe and as explained in the update https://hub.virtamate.com/resources/cuamanager.547/updates#resource-update-43567, see the last paragraphs.
Perhaps it could be possible to keep the pluginUid intact. I might look into this at some point, see if that would work. Problems would of course happen if plugin versions would differ.

CUAManager is not designed to be triggered from other triggers or atoms. I don't even know if it's possible to activate it from a scene as it's running as a session plugin. What is your specific use-case here?
 
Last edited:
It works as you describe and as explained in the update https://hub.virtamate.com/resources/cuamanager.547/updates#resource-update-43567, see the last paragraphs.
Perhaps it could be possible to keep the pluginUid intact. I might look into this at some point, see if that would work. Problems would of course happen if plugin versions would differ.

CUAManager is not designed to be triggered from other triggers or atoms. I don't even know if it's possible to activate it from a scene as it's running as a session plugin. What is your specific use-case here?

I am trying to build a scene that can load different LARGE timeline plugin presets with mocaps (like 100+mb preset files) without breaking scene triggers (so keeping the same timeline plugin id#)
I don't want to load all the animations at once, but replace the timeline animations on demand via triggers.

I misunderstood your line in that paragraph about "preserving the pluginUids", I get what you mean now. But wont the triggers still break because the plugin at that uid has been cleared?
 
I am trying to build a scene that can load different LARGE timeline plugin presets with mocaps (like 100+mb preset files) without breaking scene triggers (so keeping the same timeline plugin id#)
I don't want to load all the animations at once, but replace the timeline animations on demand via triggers.

I misunderstood your line in that paragraph about "preserving the pluginUids", I get what you mean now. But wont the triggers still break because the plugin at that uid has been cleared?
Have you looked at https://hub.virtamate.com/resources/sexy-kpop-dances-vol-1-to-4-total-16-songs.25990/ which load plugin presets to swap out timeline animations data? Perhaps you can already do what you're looking for with existing tools.

If the first plugin was removed (and not cleared) on a person containing many plugins all following pluginUids would be reset next time another plugin preset is loaded, changing the pluginUids starting from plugin#0 and counting up to the total amount of remaining plugins, effectively changing all the pluginUids. This could ruin triggers that rely on a stored pluginUid.

CUAManager's way of handling plugin replacement is out of necessity due to the limitation in VAM's plugin API possibilities. I managed to find a way to clear plugins, but that's about it. Optimally, I would want to be able to select a new plugin url source entirely, to match the version saved in a plugin preset, and then apply the json data. But that would require to get hold of an existing MVRPlugin instance, which I never found a way of doing and I don't know if scripts are allowed to load .json data directly from the plugin preset folder without user interaction selecting a file (which would also be required).

If it's possible reading .json data from the plugin preset folder *and* from scene subfolders within .var packages, one could in theory call RestoreFromJSON on existing MVRScript instances on a plugin on a person from another plugin in the scene. Effectively making it possible to creating a scene plugin that could load presets onto existing plugins on a person. I have no idea if timeline would work with RestoreFromJSON. Just to be clear, this is nothing I will investigate or develop. It's just an idea. But perhaps someone else is up for the challenge.
 
As I couldn't find any setting for it: Unloading the .dll from assets would be great. If you loaded it once in one session it won't unload even if you create a new CUA and load the asset without the .dll checkbox enabled. You currently need to restart the game to properly unload the movement/physics which come with the dll.

A button at the bottom left to load/unload .dll to disable/enable movement/physics from it for all or specific CUAs would be a dream for some CUAs and scenes. Not sure if it's possible considering this might be an engine bug with dll being permanently loaded for a CUA once you loaded it once in a session.
 
Last edited:
As I couldn't find any setting for it: Unloading the .dll from assets would be great. If you loaded it once in one session it won't unload even if you create a new CUA and load the asset without the .dll checkbox enabled. You currently need to restart the game to properly unload the movement/physics which come with the dll.

A button at the bottom left to load/unload .dll to disable/enable movement/physics from it for all or specific CUAs would be a dream for some CUAs and scenes. Not sure if it's possible considering this might be an engine bug with dll being permanently loaded for a CUA once you loaded it once in a session.
I don't have a CustomUnityAsset myself with a .dll so can't test anything. Seeing how there's only a checkbox to "Load DLL if exists" checkbox on the CUA Atom I don't think there's any way to clear or unload it. To my understanding once any asset has been loaded it stays loaded. This is why you can't select the very same binary assetbundle from two different locations but must reuse the first one. CUAManager assumes this based on the same assetbundle name.

If any .dll is not unloaded when the CUA Atom is removed/destroyed then it won't be unloaded I guess. Just a limitation I will accept with CUAManager.

Have you tried to manually create a CUA, load the assetbundle, remove the CUA atom and recreate it and experience the same problem without CUAManager involved? If so then it's probably a limitation within the engine and how assemblies are loaded (and stays loaded) in memory.
 
I don't have a CustomUnityAsset myself with a .dll so can't test anything. Seeing how there's only a checkbox to "Load DLL if exists" checkbox on the CUA Atom I don't think there's any way to clear or unload it. To my understanding once any asset has been loaded it stays loaded. This is why you can't select the very same binary assetbundle from two different locations but must reuse the first one. CUAManager assumes this based on the same assetbundle name.

If any .dll is not unloaded when the CUA Atom is removed/destroyed then it won't be unloaded I guess. Just a limitation I will accept with CUAManager.

Have you tried to manually create a CUA, load the assetbundle, remove the CUA atom and recreate it and experience the same problem without CUAManager involved? If so then it's probably a limitation within the engine and how assemblies are loaded (and stays loaded) in memory.

That's a shame with assets never being unloaded properly. Any CUA which has movement or physics uses a .dll - it's baked into the file when you create one (most often used with hair to make it look closer to not CUA hair). I can make clone copies of the entire assets beforehand with different names/diretories to use them with or without movement in the same scene/session so that's at least a workaround.

Here comes the kicker though which sadly won't be something you can fix then either: If two assets use a similar enough method (using bones in the asset for movement which creates the same dll with different settings applied) it is used/activated on all assets loaded in the future in that session but not for ones which have been loaded without the dll active. This means all not moving objects need to be loaded before moving ones if the not moving ones would move if you tick the dll checkbox. I guess this is something which should be directed towards the Virtamate devs then if it's nothing you can do about it. The option to unload the assets and dll after the object is deleted. (or a button unload all currently not in used ones). I will create a bug report thread on the forums or is there a better way to report? This is a bug which will most likely carry over to VAM 2 after all.

One thing you could change is the order in which assets are loaded though. Let's take Vega from oniekohvius as an example: Her hair easily clips through her head but the tail does rarely do that. If I want to disable the movement JUST for the hair I have to load the hair BEFORE the tail/ears/cheekfur or the hair will not be able to be loaded without movement. I know it most likely already has some internal order like "load by alphabet" but being able to set up the load order manually would be great. The ability to edit a CUAM preset to tell it the order in which to load the many assets it contains.

EDIT: Bug Thread has been created and possible workaround suggested (creating a new instance of an asset each time it is loaded and discard the old instances if they are no longer used on asset load and scene change). Thanks a lot for responding btw. Love your CUA Manager plugin it's the only reason I can properly use VAM (especially with the new plugin load options as I use plugins to edit colliders and bones to fix many models to work in automated scenes).
 
Last edited:
The only thing you can experiment with is the "Delay Physic Properties On Load Preset" option having it OFF in CUAManager. When it's on it deactivates certain physics properties and restores it after a certain delay to avoid physics explosion problems. Maybe you have some CUAs where you want to ignore this and that's causing the problem?

I no longer actively develop CUAManager (only maintain it to keep it operational). The plugin load feature was the last planned feature. CUAManager really grow from a pure CustomUnityAsset preset manager to "Make it easier to change looks with CUAs, clothing details and Plugins in other scenes" kind of plugin. Glad to hear you enjoy it :)
Anyone can feel free to continue working on it or create a spiritual successor with improved features.
 
Last edited:
New and lost, sorry. Where in my VAM files do I put the manager after downloading?
 
I also only see colorscale and parenthold in my session plugins, no "Add_me", but I may just be doing it wrong.
 
I also only see colorscale and parenthold in my session plugins, no "Add_me", but I may just be doing it wrong.
Place the .var file in your AddonPackages folder. Follow this .gif how to activate the session plugin.
 
Trying to use latest var version 19 this as a session plugin and on a fresh install of VAM with everything else working I get these errors every time it loads:


!> LoadJSON: File Custom/Scripts/Blazedust/CUAManager/presets/options_Blazedust_Mira.json not found
!>
!> Failed to load option file Saves\PluginData\Blazedust\CUAManager\options_Blazedust_Mira.json
!> System.NullReferenceException: Object reference not set to an instance of an object
at Blazedust.CUAM.Options.LoadOptions () [0x00000] in <filename unknown>:0
!> LoadJSON: File Custom/Scripts/Blazedust/CUAManager/presets/options_Blazedust_Yen.json not found
!>
!> Failed to load option file Saves\PluginData\Blazedust\CUAManager\options_Blazedust_Yen.json
!> System.NullReferenceException: Object reference not set to an instance of an object
at Blazedust.CUAM.Options.LoadOptions () [0x00000] in <filename unknown>:0
!> LoadJSON: File Custom/Scripts/Blazedust/CUAManager/presets/options_Blazedust_Yen_Alt.json not found
!>
!> Failed to load option file Saves\PluginData\Blazedust\CUAManager\options_Blazedust_Yen_Alt.json
!> System.NullReferenceException: Object reference not set to an instance of an object
at Blazedust.CUAM.Options.LoadOptions () [0x00000] in <filename unknown>:0

Anyone else getting these?
 
Trying to use latest var version 19 this as a session plugin and on a fresh install of VAM with everything else working I get these errors every time it loads:


!> LoadJSON: File Custom/Scripts/Blazedust/CUAManager/presets/options_Blazedust_Mira.json not found
!>
!> Failed to load option file Saves\PluginData\Blazedust\CUAManager\options_Blazedust_Mira.json
!> System.NullReferenceException: Object reference not set to an instance of an object
at Blazedust.CUAM.Options.LoadOptions () [0x00000] in <filename unknown>:0
!> LoadJSON: File Custom/Scripts/Blazedust/CUAManager/presets/options_Blazedust_Yen.json not found
!>
!> Failed to load option file Saves\PluginData\Blazedust\CUAManager\options_Blazedust_Yen.json
!> System.NullReferenceException: Object reference not set to an instance of an object
at Blazedust.CUAM.Options.LoadOptions () [0x00000] in <filename unknown>:0
!> LoadJSON: File Custom/Scripts/Blazedust/CUAManager/presets/options_Blazedust_Yen_Alt.json not found
!>
!> Failed to load option file Saves\PluginData\Blazedust\CUAManager\options_Blazedust_Yen_Alt.json
!> System.NullReferenceException: Object reference not set to an instance of an object
at Blazedust.CUAM.Options.LoadOptions () [0x00000] in <filename unknown>:0

Anyone else getting these?
I figured it out, it was a from some old save files in the save/plugindata/Blazedust/ path - deleted them and no more error. Sorry BD for the unnecessary bothersome ping
 
I'm sorry but I don't understand. I've downloaded a look and made a preset just like the video showed but when I want to replace another model with it there's no appearance to choose. I can load the stuff like the hair and eyes with the preset I made but they're just on top of the other model. Like, the model I want has purple skin, but that doesn't show up. How do I get what I need to show up in the 'select appearance' menu?
 
I'm sorry but I don't understand. I've downloaded a look and made a preset just like the video showed but when I want to replace another model with it there's no appearance to choose. I can load the stuff like the hair and eyes with the preset I made but they're just on top of the other model. Like, the model I want has purple skin, but that doesn't show up. How do I get what I need to show up in the 'select appearance' menu?
CUAManager is about saving CustomUnityAsset presets which can be applied at a later time to an existing person atom.
The appearance preset is a built-in preset type within VAM. Create your appearance preset for a look in the appearance preset tab on a person root atom within the native VAM interface.

The videos doesn't showcase how to create a native VAM appearance preset which might be troublesome for new users of VAM.
CUAManager assumes that users of this plugin already knows how to create and apply appearance presets in other scenes.

Hope it helps get you started.
 
CUAManager is about saving CustomUnityAsset presets which can be applied at a later time to an existing person atom.
The appearance preset is a built-in preset type within VAM. Create your appearance preset for a look in the appearance preset tab on a person root atom within the native VAM interface.

The videos doesn't showcase how to create a native VAM appearance preset which might be troublesome for new users of VAM.
CUAManager assumes that users of this plugin already knows how to create and apply appearance presets in other scenes.

Hope it helps get you started.

I understand now, thanks a bunch! In hindsight I probably should have noticed the vanilla 'appearance presets' section!
 
So I am stuck on the part of creating preset, fairly simple as I follow the videos and I have my preset. However i notice yours is saved in Vap and mines is json. Did I already do something wrong because when i load preset it literally just loads the hair and doesn't swap any facial/body features.
 
So I am stuck on the part of creating preset, fairly simple as I follow the videos and I have my preset. However i notice yours is saved in Vap and mines is json. Did I already do something wrong because when i load preset it literally just loads the hair and doesn't swap any facial/body features.

This plugin does NOT save appearance presets as it's already a native feature within VAM. ALWAYS save your look as an appearance preset first! I do not show this in the video as I assume everyone picking up this plugin already know how to create appearance presets and apply them in scenes in VAM. The video focuses on the CUAManager preset type (connected CustomUnityAssets) only.

I did some rephrasing in the plugin description as this seem to be questioned a lot.
 
Hello!

I was wondering if it's possible to combine a CUA / Clothing preset so that it's able to load both linked assets and clothing items in one preset? I was able to edit a json manually after saving each preset type, successfully accomplishing what I was after... but it'd be much more convenient if it was possible to save a merged preset within the plugin itself. Maybe such a feature already exists and I just can't figure it out?
 
Hello!

I was wondering if it's possible to combine a CUA / Clothing preset so that it's able to load both linked assets and clothing items in one preset? I was able to edit a json manually after saving each preset type, successfully accomplishing what I was after... but it'd be much more convenient if it was possible to save a merged preset within the plugin itself. Maybe such a feature already exists and I just can't figure it out?

I never took time to create a save button to combine them both into a single .json preset. Didn't know if it would work loading, but looks like you already tested that bit yourself. I will look into making it possible to save both CUA + Clothing into a single preset in the coming months, don't have too much time right now.
 
Hello, can you help me please ?

"Compile of Blazedust.SessionPlugin_CUAManager.19:/Custom/Scripts/Blazedust/CUAManager/ADD_ME.cslist failed. Errors:
!> [CS1061]: Type `SuperController' does not contain a definition for `MainHUDVisible' and no extension method `MainHUDVisible' of type `SuperController' could be found. Are you missing an assembly reference? in <Unknown>

i have version 1.20.77.10
and open only ADD_ME.cslist

but doesnt work :/

Thank you
 
Hello, can you help me please ?

"Compile of Blazedust.SessionPlugin_CUAManager.19:/Custom/Scripts/Blazedust/CUAManager/ADD_ME.cslist failed. Errors:
!> [CS1061]: Type `SuperController' does not contain a definition for `MainHUDVisible' and no extension method `MainHUDVisible' of type `SuperController' could be found. Are you missing an assembly reference? in <Unknown>

i have version 1.20.77.10
and open only ADD_ME.cslist

but doesnt work :/

Thank you
Requires VAM 1.22.0.0 or later!

Use the history tab to download older compatible versions with VAM 1.20.77.10
 
Back
Top Bottom