private void InitializeParticles() { // todo what happens when switching characters? if (_partHeavyR != null) { return; } PregnancyPlugin.Logger.LogDebug("Adding particles to heroine: " + ChaControl.fileParam.fullname); _partHeavyR = new HParticleCtrl.ParticleInfo { assetPath = @"h/common/00_00.unity3d", file = "LiquidSiru", numParent = 1, nameParent = "a_n_nip_R", //pos = new Vector3(0f, 0f, 0.05f), rot = new Vector3(-25f, 0, 0f) }; _partLightR = new HParticleCtrl.ParticleInfo { assetPath = @"h/common/00_00.unity3d", file = "LiquidSio", numParent = 1, nameParent = "a_n_nip_R", //pos = new Vector3(0, 0f, 0.05f), rot = new Vector3(-20, 0, 0) }; _partHeavyL = new HParticleCtrl.ParticleInfo { assetPath = @"h/common/00_00.unity3d", file = "LiquidSiru", numParent = 1, nameParent = "a_n_nip_L", //pos = new Vector3(0, 0f, 0.05f), rot = new Vector3(-25f, 0, 0f) }; _partLightL = new HParticleCtrl.ParticleInfo { assetPath = @"h/common/00_00.unity3d", file = "LiquidSio", numParent = 1, nameParent = "a_n_nip_L", //pos = new Vector3(0, 0f, 0.05f), rot = new Vector3(-20, 0, 0) }; // Load the particles var particleDic = (Dictionary <int, HParticleCtrl.ParticleInfo>)AccessTools .Field(typeof(HParticleCtrl), "dicParticle").GetValue(_particleCtrl); particleDic[691] = _partHeavyR; particleDic[692] = _partLightR; particleDic[693] = _partHeavyL; particleDic[694] = _partLightL; _particleCtrl.Load(ChaControl.objBodyBone, 1); }
private void InitializeParticles() { // todo what happens when switching characters? if (_partHeavyR != null) { return; } PregnancyPlugin.Logger.LogDebug("Adding particles to heroine: " + ChaControl.fileParam.fullname); _partHeavyR = new HParticleCtrl.ParticleInfo { file = "LiquidSiru", numParent = 1, nameParent = "a_n_nip_R", //pos = new Vector3(0f, 0f, 0.05f), rot = new Vector3(-25f, 0, 0f) }; _partLightR = new HParticleCtrl.ParticleInfo { file = "LiquidSio", numParent = 1, nameParent = "a_n_nip_R", //pos = new Vector3(0, 0f, 0.05f), rot = new Vector3(-20, 0, 0) }; _partHeavyL = new HParticleCtrl.ParticleInfo { file = "LiquidSiru", numParent = 1, nameParent = "a_n_nip_L", //pos = new Vector3(0, 0f, 0.05f), rot = new Vector3(-25f, 0, 0f) }; _partLightL = new HParticleCtrl.ParticleInfo { file = "LiquidSio", numParent = 1, nameParent = "a_n_nip_L", //pos = new Vector3(0, 0f, 0.05f), rot = new Vector3(-20, 0, 0) }; #if KK _partHeavyR.assetPath = @"h/common/00_00.unity3d"; _partLightR.assetPath = @"h/common/00_00.unity3d"; _partHeavyL.assetPath = @"h/common/00_00.unity3d"; _partLightL.assetPath = @"h/common/00_00.unity3d"; #elif KKS _partHeavyR.assetPath = @"h/common/01.unity3d"; _partLightR.assetPath = @"h/common/01.unity3d"; _partHeavyL.assetPath = @"h/common/01.unity3d"; _partLightL.assetPath = @"h/common/01.unity3d"; // Manifests are needed or the game will crash after changing H positions _partHeavyR.manifest = "add01"; _partLightR.manifest = "add01"; _partHeavyL.manifest = "add01"; _partLightL.manifest = "add01"; #endif // Load the particles var particleDic = _particleCtrl.dicParticle; particleDic[691] = _partHeavyR; particleDic[692] = _partLightR; particleDic[693] = _partHeavyL; particleDic[694] = _partLightL; _particleCtrl.Load(ChaControl.objBodyBone, 1); #if KKS // Need to unload the bundles we just loaded or things that try to load them later like hpointmove can crash // Need to unload both manifest null and add01 for some reason or the bundle won't fully unload AssetBundleManager.UnloadAssetBundle(@"h/common/01.unity3d", true, null, false); AssetBundleManager.UnloadAssetBundle(@"h/common/01.unity3d", true, "add01", false); #endif }