Search Unity

[RELEASED] Corgi Engine - Complete 2D/2.5D Platformer [new v8.0 : advanced damage system]

Discussion in 'Assets and Asset Store' started by reuno, Dec 18, 2014.

  1. brittany

    brittany

    Joined:
    Feb 26, 2013
    Posts:
    93
    Ok, thank you very much!! I will learn about how to use blend trees. I appreciate it!!!!!
     
    reuno likes this.
  2. Dumpling007

    Dumpling007

    Joined:
    Dec 13, 2018
    Posts:
    36
    Hello, I need your help, my friend.
    After adding the "Character Persistence" component to my character, I made a temporary game and selected "Restart Level". Then I was surprised to find that there were two characters in one scene.
     

    Attached Files:

  3. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Dumpling007 > I'd need a bit more info about what exactly you did, and in what context, to be able to tell what you may have done wrong.
    Here are repro steps that work, if your issue persists, don't hesitate to use the support form and provide similar ones :
    - fresh install of CE 8.3.1 on 2019.4.40f1
    - open MinimalLevel
    - edit the Rectangle prefab, add a CharacterPersistence ability to it, press play in the editor
    - press escape, then press the RestartLevel button, there's only one Rectangle in the scene
     
  4. xacarana

    xacarana

    Joined:
    May 12, 2015
    Posts:
    27
    Hello @reuno I want to add and Dead Event to a Enemy, so when the enemy dies, I could catch Death Event and drop a key. So I try with Health Script, but I din't see like and status or and a DeathEvent. I try with MMStateMachine, but I don't know how to use it. So please give me a hand, How could I Trigger Death Event in a specific Enemy and send the enemy gameobject reference. Also I want to know why HealthDeathEvent is not available in the Engine?, same happend with CorgiEngineEventTypes, some options are not included in the enum.

    Thank you!
     
  5. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @xacarana > You can listen to HealthDeathEvents to know when anything dies. There's no need for you to "add" them, they're already triggered.

    I do not know what you mean when you say "I want to know why HealthDeathEvent is not available in the Engine?, same happend with CorgiEngineEventTypes, some options are not included in the enum.", you'll have to be more specific.
     
  6. xacarana

    xacarana

    Joined:
    May 12, 2015
    Posts:
    27
    Thank you for a quikly reply, I have this code:

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using MoreMountains.CorgiEngine.HealthDeathEvent;
    5. using MoreMountains.CorgiEngine;
    6. using MoreMountains.Tools;
    7.  
    8. public class EstadoEnemigo : MonoBehaviour, MMEventListener<HealthDeathEvent> {
    9.  
    10.         public virtual void OnMMEvent(HealthDeathEvent e)
    11.         {
    12.         // here we start a coroutine that will display our achievement
    13.             Debug.Log(e);
    14.         }
    15.         void OnEnable()
    16.         {
    17.             this.MMEventStartListening<HealthDeathEvent>();
    18.         }
    19.         void OnDisable()
    20.         {
    21.             this.MMEventStopListening<HealthDeathEvent>();
    22.         }
    23.  
    24. }
    25.  
    And I recibe this compiler error:

    Assets/Juego/Scripts/EstadoEnemigo.cs(4,33): error CS0234: The type or namespace name `HealthDeathEvent' does not exist in the namespace `MoreMountains.CorgiEngine'. Are you missing an assembly reference?


    I don't know why.

    Thank you!
     
  7. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @xacarana > I don't know why either, that's unfortunately not enough info to tell. My guess would be you're trying to access this from a place under an asmdef that doesn't have access to it?
    If your issue persists, don't hesitate to send more info on how to repro your issue via the support form.
    These steps will work :
    - fresh install of CE 8.3.1 on 2019.4.40f1
    - add the following script outside of the CorgiEngine folder
    - it works

    Code (CSharp):
    1. using MoreMountains.CorgiEngine;
    2. using MoreMountains.Tools;
    3. using UnityEngine;
    4.  
    5. public class Test : MonoBehaviour, MMEventListener<HealthDeathEvent>
    6. {
    7.     public virtual void OnMMEvent(HealthDeathEvent deathEvent) { Debug.Log(deathEvent.AffectedHealth.name); }
    8.     void OnEnable() { this.MMEventStartListening<HealthDeathEvent>(); }
    9.     void OnDisable() { this.MMEventStopListening<HealthDeathEvent>(); }
    10. }
    11.  
     
    xacarana likes this.
  8. xacarana

    xacarana

    Joined:
    May 12, 2015
    Posts:
    27
    Hi @reuno, I thought the problem is I am usign a old version of unity, the thing is update CorgiEngine is not an option, so my engine code it's old.

    My solution would me be, add an Script and use OnDisable method, then i'll trigger a MMGameEvent and I'll catch this Event in other Script.

    Code (CSharp):
    1. private Health health;
    2.     void Start(){
    3.         health = this.GetComponent<Health>();
    4.     }
    5.  
    6.     void Update(){
    7.                //CurrentHealth is the same when the enemy dies
    8.         Debug.Log(health.CurrentHealth);
    9.     }
    10.  
    11.     void OnDisable(){
    12.         Debug.Log("Fire Event Here");
    13.     }
    Please, I want to know why, CurrentHealth didn't change when the enemy dies. Also would be nice if you could share a script to know how to use propertly a StateMachine, I was reading it is an option to events, but the T syntaxis was a little tricky for me.

    Thank you for your time,
     
  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @xacarana > I'm not sure why you'd use a MMGameEvent in this case, it's not what they're used for. I'd recommend just creating your own (or ideally updating to a more recent version of Unity/CE).
     
  10. xacarana

    xacarana

    Joined:
    May 12, 2015
    Posts:
    27
    @reuno I have to use and old version, because in classroom we don't have an updated version of unity because the lincense. So the option is use MMGameEvent, I know that seems like I'm using a pirate version of corgi, but is not, I could send you, a print screen of my purchase of your assets. So please, I still want to know if you have a script for State Machine, because that we could help use.

    Thank you!
     
  11. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @xacarana > It does indeed sound very sketchy. I don't know what you mean by "a script for state machine" in that context, or how it would apply to your question. I don't think that's the solution to your issue. As I said in my previous message, I'd recommend creating your own event. If your issue persists, please use the support form.
     
  12. Marboul

    Marboul

    Joined:
    Jun 26, 2020
    Posts:
    7
    Hi everyone ! I'm working on a multiplayer game and I have an issue with key to open door. I've created inventory for both players like in example scene and it works fine. When a player grab the key, it appears in right inventory. My issue is when I want to open the door. If it is player1 which grab the key, door open perfectly but if it is player2, impossible to open door even if he has the right key in his inventory... Any idea ? Thanks a lot for your help !
     
  13. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Marboul > Answered you on Discord already, but just in case, here are steps that will work :
    - fresh install of CE 8.3.1 on 2019.4.40f1
    - open FeaturesKeys demo scene, move the chest and a yellow key close to the starting area
    - add a new InputManager in the scene, set its PlayerID to Player2
    - add a new RectangleWithInventory to the scene, name it Player2, set its PlayerID to Player2
    - duplicate MainInventory, set its PlayerID to Player2
    - press play, using Player2, grab the key, open the chest
     
  14. Marboul

    Marboul

    Joined:
    Jun 26, 2020
    Posts:
    7
    Thanks a lot @reuno it was not working on my game like that. But I manage to make it works by attributing same inventory to both players. As it is a cooperation game, it works fine like that.
     
    reuno likes this.
  15. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    Heya folks,

    I'm using the latest version of Corgi Engine and I wondered what would be the best thing to achieve this.
    I have a corgi player character which I can move around and jump and whatnot. Now for accessibility I would like the player to be able to also use a mouse for movement, meaning when they click on the ground the player character should move to that point.

    What would be the best way of implementing that? How do I basically "remote control" a player corgi character?
    With an AI as part of the player character? If so, will that introduce any problems? Or is there a better way?
     
  16. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @BTStone > That would require implementing pathfinding, and basically an AI on top of that that would take decisions based on your rules. You can't have a character be an AI and a Player, in this case that'd be an AI (that can still have the Player tag if you want).
     
  17. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    Hi everyone! Good news, v8.4 of the Corgi Engine just hit the store.
    Here are the full release notes :

    - Adds the ChargeWeapon, letting you create charge sequence weapons (think charge shots ala Megaman, or more powerful melee attacks the longer you hold), and the MinimalChargeWeapon as an example of it
    - Adds burst mode options to Weapons
    - Adds the SurfaceFeedbacks character ability, that lets you define different run/walk feedbacks to play based on the surface your character is currently standing on
    - Adds RequiresCharacterAbove option (true by default) to Falling Platforms
    - Adds a new detachment method for stairs/one way platforms to the controller (should be reserved to use cases where you need to detach from overlapping platforms)
    - Changes the way the fall damage ability computes fall height, now taking into account any apex height reached, not just the last grounded point's height
    - Adds coyote time options to the wall jump character ability
    - Adds auto respawn support to the proximity mines
    - Adds ForceAlwaysShoot option to the CharacterHandleWeapon ability
    - Adds character enters/exits UnityEvents to MovingPlatforms
    - Adds an option to the Crouch ability to prevent (or allow) being able to move while crouching
    - Adds DirectionMultiplier and AngleModifier options to recoil properties
    - Adds a PreventAimWhileWeaponIsInUse option to WeaponAim
    - Adds the xSpeedAbsolute and ySpeedAbsolute float anim parameters, that output the absolute values of xSpeed and ySpeed
    - Adds 10 animation parameters to the CharacterAnimationParametersInitializer
    - Adds options to DamageOnTouch (and MeleeWeapon) to have damage apply only on TriggerEnter2D, TriggerStay2D, or both
    - Adds an ID field to the BackgroundMusic
    - Adds origin and destination getters to the WeaponLaserSight component
    - CharacterAbility's Start and Stop Feedbacks methods are now public
    - File, folder and extension names in the Achievement Manager are now public
    - Fixes a bug that could cause damage over time to still proc after a respawn
    - Fixes wall clinging not working as designed when AirControl was less than 1
    - Fixes a bug that could cause an unstunned character to resurrect back to life
    - Fixes the pusher class also pulling the controller if it was just standing still
    - Fixes loot random quantities maximum bound being excluded when randomizing
    - Fixes a bug that could cause contact bombs to explode infinitely
    - Fixes a bug that could cause a weapon to not reset movement multipliers correctly on change
    - Fixes the crouch state preventing the dash ability from running correctly
    - Fixes the CrushDetection ability's feedbacks not triggering correctly past the first time when in ApplyDamage mode
    - Fixes a bug that would cause fall damage to proc after falling out of bounds and respawning lower than the last jump point
    - RobotWeapons in the demos now mutualize their waiting pool
    - Fixes wrong comments in the AIDecisionTargetIsAlive class
    - The LevelStart event now also passes the player as its originCharacter
    - Reorders the MeleeWeapon's AreaSize and AreaOffset fields for consistency with the Collider inspector
    - Updates InventoryEngine to v3.4
    - Updates MMTools and MMFeedbacks to v3.12

    I hope you'll like this new update, and see you soon for the next one!
     
  18. DimJohnDoe

    DimJohnDoe

    Joined:
    Feb 22, 2020
    Posts:
    7
    This is a rudimentary question, but I have two questions.
    Both are about animator and mecanim.
    As for the animation, I am using 2D in Spine.
    Maybe that has something to do with it.

    1
    When using AnyState, the previous animation always plays to the end before switching to the next one.
    If I use arrows to connect the states to each other, the animation plays well, but it doesn't work for the AnyState related animation.
    The "Has Exit Time" checkbox is set to false.

    2
    When running toward a wall, the animators set in running and grounded are switched at high speed and the animator starts to wriggle.
    At first I didn't understand the significance of grounded and didn't set it, but I did so because the previous animation keeps playing at places where idle is not turned on, such as the edge of a diagonal column.
    Is there a way to address this?
    Also, is there a priority order mentioned anywhere when multiple conditions like Idle and Grounded are true?

    Thank you in advance for your help.
     
  19. DimJohnDoe

    DimJohnDoe

    Joined:
    Feb 22, 2020
    Posts:
    7
    How do I make both the player and enemy AI look like they are leaning along their legs when the ground is slanted?
    Sorry if this is a known question.
     
  20. DimJohnDoe

    DimJohnDoe

    Joined:
    Feb 22, 2020
    Posts:
    7
    I felt that the English was out of order.
    I am translating at DeepL so I apologize if the language is unnatural.

    What I wanted to ask is the following.

    When the ground is tilted, I want the character to look natural and in line with the ground.
    To give an exact example, a human figure would look like it has both feet exactly on the tilted ground.

    Sorry for the multiple questions.
    Thank you in advance for any help you may be able to provide.
     
  21. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @DimJohnDoe > You'll probably have more luck asking the Mecanim or Spine people, most of these are unrelated to the engine.
    1. I'd recommend avoiding "any state" patterns until you have a better understanding of how to setup animations, it's certainly harder to setup.
    2. Priority order for conditions is top to bottom. I don't know what "high speed switch" you're referring to, if that issue persists, please provide repro steps for it via the support form.
    3. Create a class to detect "slanted ground" and update an animation parameter for it? You could also implement feet IK.
     
  22. Dumpling007

    Dumpling007

    Joined:
    Dec 13, 2018
    Posts:
    36
    Hello, Reuno

    What should I do if I want to jump from a scene using "Corgi Engine components" to an original scene "without Corgi Engine components"?

    Because the Corgi Engine has some elements that are not destroyed along with the scene, this can result in some errors

    For example: I want to jump from a Corgi Demo scene to a scene like RPG MV scene

    I don't know if I made my question clear
     
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Dumpling007 > You can simply load your scene and unload the contents of DontDestroyOnLoad if you don't need to keep them around.
     
  24. Dumpling007

    Dumpling007

    Joined:
    Dec 13, 2018
    Posts:
    36
    Can I add a criterion to decide when to destroy or keep?Can you tell me exactly what to do, like if I need to inherit a class to rewrite a custom method or something?
     
    Last edited: May 17, 2023
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Dumpling007 > I'm not sure what you mean by "criterion" in this context. And no, you don't need to inherit a class or rewrite anything, that's not on the engine's side, that's on your game's side.
    When loading your scene, using whatever API you're using, use Unity's methods to unload the contents of DontDestroyOnLoad.
    There are plenty of ways to do it, you can google it, here was the first result : https://gamedev.stackexchange.com/questions/140014/how-can-i-get-all-dontdestroyonload-gameobjects
     
  26. ObsidianSpire

    ObsidianSpire

    Joined:
    Sep 13, 2013
    Posts:
    48
    Hi, I was playing with the demo scenes in the Handcrafted Art + Corgi Engine bundle and noticed that when you wall jump repeatedly you can get stuck in the ceiling for a while before gravity will eventually kick in. Is this a known bug? How do you prevent it from happening with low ceilings if we make our own levels? By the way, I'm not pressing the space bar after I reach the ceiling or anything to trigger the jetpack included in Corgi Engine.

     
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @ObsidianSpire > I think that demo scene is just missing an actual collider at the top. You can look at the MinimalScene (or others) for an example of that.
     
  28. Skyfighter11208

    Skyfighter11208

    Joined:
    Jun 11, 2023
    Posts:
    2
    Hi, I'm trying to make my player being able to swap to another character after talking to him, but I found I couldn't disable the character swap by setting "Ability Permitted" to false. Is there any way I can dis able a character's swap ability and re enable it when I want? Thank you.
     
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Skyfighter11208 > You can disable the CharacterSwapManager to prevent swap.
     
  30. Skyfighter11208

    Skyfighter11208

    Joined:
    Jun 11, 2023
    Posts:
    2
    Thanks for answering. But what if there are three diffrerent characters, and I want only two of them to swap with each other and the person you can swap with can be changed by talking to the third person?
     
  31. wikio

    wikio

    Joined:
    Mar 4, 2022
    Posts:
    1
    Hi, @reuno! I am trying to work with the health bar on Enemies but it is not working correctly, the bar is displayed but it does not update with the Characters current health, even in the RetroAI scene. I have tried to create my own health bar prefab by referencing the current health from the Health script on the Character but the Health script seems to not be identified as a script. How can I refence the float CurrentHealth, InitialHealth and MaximumHealth in my own script or do you have an Idea on why the health bars are not working correctly?
     
  32. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Skyfighter11208 > I've added such a feature to the next update, drop me a line via the support form if you'd like to have it before the next update hits.
    @wikio > I've never heard of health bars on enemies not working in Retro AI in a fresh install. Maybe you've made some changes to the scene, or some scripts. Try in a fresh install of v8.4, and if the issue persists, send more info about what exactly you're doing via the support form.
     
  33. Dumpling007

    Dumpling007

    Joined:
    Dec 13, 2018
    Posts:
    36
    Hello my friend, I have a problem now, I want to make a tracking bullet that can track characters, I have added WeaponAim and AutoAim to the robot weapons in the Demo, but it doesn't seem to have any effect, what should I do specifically? If you need a custom script, please also give me a simple idea, thank you!
     
  34. mattimus

    mattimus

    Joined:
    Mar 8, 2008
    Posts:
    576
    AutoAim and WeaponAim just point the weapon towards the target. It doesn't update the projectile's direction mid flight. For a tracking bullet you'd have to create a custom projectile class that constantly updates the projectile's direction.
     
    reuno likes this.
  35. Dumpling007

    Dumpling007

    Joined:
    Dec 13, 2018
    Posts:
    36
    Thanks for the valuable advice, I hope the engine can give this kind of tracking weapon demo scene later
     
  36. apdaniel

    apdaniel

    Joined:
    Sep 22, 2013
    Posts:
    2
    I have just been writing the code for this, and I've almost finished it. I'll share it with you once I've done it - it might not be what you're looking for exactly but will probably help.
     
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
  38. DimJohnDoe

    DimJohnDoe

    Joined:
    Feb 22, 2020
    Posts:
    7
    I implemented a semi-automatic melee weapon and the animation played well.
    However, that playback speed seemed slow, so I doubled the animation playback speed.
    Then, the animation of swinging the weapon started to play twice.

    Melee Wepon -> Melee Damage Area Timing -> Active Duration
    I thought the above might be the cause, so I shortened it to match the animation as well.
    However, the hitboxes now disappear faster, but the animation still plays twice.

    I would appreciate it if you could tell me how to fix it.

    Translated with www.DeepL.com/Translator (free version)
     
  39. DimJohnDoe

    DimJohnDoe

    Joined:
    Feb 22, 2020
    Posts:
    7
    Self resolved.

    TimeBetweenUses
    was unchecked.

    I don't have a good understanding of TimeBetweenUses, but why does it behave this way if it is unchecked?
     
  40. DimJohnDoe

    DimJohnDoe

    Joined:
    Feb 22, 2020
    Posts:
    7
    My apologies for repeating myself.
    Self-resolved.

    The parameter was not Start but Use.
    This is why it was a looping process.
    Setting it to start fixed it.

    Sorry for the trouble.
     
    reuno likes this.
  41. Dumpling007

    Dumpling007

    Joined:
    Dec 13, 2018
    Posts:
    36
    Oh, I can't wait.
     
  42. Dumpling007

    Dumpling007

    Joined:
    Dec 13, 2018
    Posts:
    36
    Hello,my friend, now I have a problem about charge weapon, I set the secondary weapon to charge weapon, I keep the default setting of "MinimalChargeWeapon"
    But there are two problems:

    1. The weapon is always charged, whether I press the attack button or not;

    2. The bullets fired after charging are all in the first stage, and I have set the bullets and charging effects of different charging states

    I don't know if it's my weapon stats or something else
     
  43. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Dumpling007 > Could you explain what exactly it is you're doing, and how to reproduce your issue?
     
  44. Dumpling007

    Dumpling007

    Joined:
    Dec 13, 2018
    Posts:
    36
    I went back and reenacted the bug:

    Just add the "Character Handle Secondery Weapon" to the Player and add the" Charge Weapon" to the component and it will trigger the bug I described, you can try it out
     
  45. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Dumpling007 > Again, without knowing what exactly you're doing, where, with what character, on what version, it's hard to tell what the issue may be.
    These steps will work, I'd recommend trying them :
    - fresh install of CE 8.5 on 2020.3.48f1
    - open MinimalLevel
    - edit the Rectangle prefab, add a CharacterHandleSecondaryWeapon to it, set the MinimalChargeWeapon as its InitialWeapon
    - save the prefab, press play, use your mouse right click to shoot/charge the weapon, it works as designed
     
  46. Dumpling007

    Dumpling007

    Joined:
    Dec 13, 2018
    Posts:
    36
    It's great that CE8.5 is available so quickly, problem solved, thank you very much
     
    reuno likes this.
  47. andreiagmu

    andreiagmu

    Joined:
    Feb 20, 2014
    Posts:
    175
    Hi, I've had some issues with Corgi's object poolers, when Domain Reload is disabled (in Unity's Enter Play Mode options).

    MMObjectPooler.cs has a "static Instance" that isn't properly cleaned up when the game is restarted while Domain Reload is disabled.
    Because of this, sometimes the Instance wasn't being correctly initialized on Awake(), and this caused some null/wrong reference exceptions later, on my pooled objects.

    Adding the following code in MMObjectPooler.cs makes it more compatible with disabled Domain Reload.
    I added this code above the Awake() method.

    Code (CSharp):
    1. [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
    2. protected static void InitializeStatics()
    3. {
    4.     Instance = null;
    5. }
     
    Last edited: Jul 31, 2023
  48. andreiagmu

    andreiagmu

    Joined:
    Feb 20, 2014
    Posts:
    175
    Another issue I noticed:
    It seems the CharacterWallClinging (wall slide) movement is currently frame rate-dependent.

    In my game, when the frame rate is high, the character wall slides with a normal speed.
    But if the frame rate drops considerably, then the character starts sliding down much faster.

    I'm using Corgi v8.5, Unity 2022.3.5f1.
     
  49. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @andreiagmu > Thank you for spotting these! I'll fix the domain reload issue. And there does indeed seem to be something off with the clinging vs framerate, I'll fix this for the next release. If you find more bugs, or if you'd like the fix for that one before the next update drops, don't hesitate to use the form at https://corgi-engine.moremountains.com/corgi-engine-contact.
     
    andreiagmu likes this.
  50. andreiagmu

    andreiagmu

    Joined:
    Feb 20, 2014
    Posts:
    175
    Great, thank you very much for the support! :D

    I also want to share an extension class I made for CharacterPersistence.cs, that moves the character to a custom scene instead of moving it to DontDestroyOnLoad.
    I generally avoid moving stuff to DontDestroyOnLoad due to some issues with it, so I have a custom additively loaded scene in my game, for persistent objects.

    In the component's inspector, you just need to set the correct scene name to the persistentSceneName field, then the character gets moved to that scene. :)

    Code (CSharp):
    1. using MoreMountains.Tools;
    2. using UnityEngine;
    3. using UnityEngine.SceneManagement;
    4.  
    5. namespace MoreMountains.CorgiEngine.Custom
    6. {
    7.     [MMHiddenProperties("AbilityStartFeedbacks", "AbilityStopFeedbacks")]
    8.     [AddComponentMenu("Corgi Engine/Character/Abilities/Character Persistence_CustomScene")]
    9.     public class CharacterPersistence_CustomScene : CharacterPersistence
    10.     {
    11.         public string persistentSceneName;
    12.  
    13.         protected override void Initialization()
    14.         {
    15.             base.Initialization();
    16.  
    17.             if (AbilityAuthorized)
    18.             {
    19.                 SceneManager.MoveGameObjectToScene(gameObject, SceneManager.GetSceneByName(persistentSceneName));
    20.             }
    21.         }
    22.     }
    23. }
    24.  
     

    Attached Files: