Skip to content

Commit

Permalink
fix: some field not bein selialized
Browse files Browse the repository at this point in the history
  • Loading branch information
h2v9696 committed Sep 8, 2024
1 parent b6f7b69 commit 71def0a
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions LICENSE.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

namespace H2V.GameplayAbilitySystem.EffectSystem.AdditionApplyEffects
{
[Serializable]
public class GrantAbilityOnApplying : IAdditionApplyEffect
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace H2V.GameplayAbilitySystem.EffectSystem.AdditionApplyEffects
{
[Serializable]
public class GrantTagOnApplying : IAdditionApplyEffect
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@

namespace H2V.GameplayAbilitySystem.EffectSystem.AdditionApplyEffects
{
[Serializable]
public class RemoveOtherEffectOnAppliedByDef : IAdditionApplyEffect
{
/// <summary>
/// GameplayEffects on the Target that have any of these Defs
/// will be removed from the Target when this GameplayEffect is successfully applied.
/// </summary>
[field: SerializeField]
[field: SerializeReference]
public IGameplayEffectDef[] EffectDefs { get; private set; } = Array.Empty<IGameplayEffectDef>();

public void OnEffectSpecApplied(AbilitySystemComponent target)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace H2V.GameplayAbilitySystem.EffectSystem.AdditionApplyEffects
{
[Serializable]
public class RemoveOtherEffectOnAppliedByTags : IAdditionApplyEffect
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace H2V.GameplayAbilitySystem.EffectSystem
namespace H2V.GameplayAbilitySystem.EffectSystem.EffectConditions
{
// Implement for custom conditions
public interface IEffectCondition
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using H2V.GameplayAbilitySystem.Components;
using H2V.GameplayAbilitySystem.EffectSystem.AdditionApplyEffects;
using H2V.GameplayAbilitySystem.EffectSystem.EffectConditions;
using H2V.GameplayAbilitySystem.EffectSystem.GamplayEffectPolicies;
using H2V.GameplayAbilitySystem.EffectSystem.ScriptableObjects;
using H2V.GameplayAbilitySystem.TagSystem.ScriptableObjects;
Expand Down
7 changes: 3 additions & 4 deletions Runtime/EffectSystem/ScriptableObjects/GameplayEffectSO.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using H2V.GameplayAbilitySystem.Components;
using H2V.GameplayAbilitySystem.EffectSystem.AdditionApplyEffects;
using H2V.GameplayAbilitySystem.EffectSystem.EffectConditions;
using H2V.GameplayAbilitySystem.EffectSystem.GamplayEffectPolicies;
using H2V.GameplayAbilitySystem.TagSystem.ScriptableObjects;
using UnityEngine;
Expand Down Expand Up @@ -33,8 +34,7 @@ public class GameplayEffectSO : ScriptableObject, IGameplayEffectDef
[field: SerializeField]
public StackingDetails StackingDetails { get; private set; }

[Tooltip("Addition effect when this effect is applied on the target")]
[field: SerializeReference, SubclassSelector]
[field: SerializeReference, SubclassSelector, Tooltip("Addition effect when this effect is applied on the target")]
public IAdditionApplyEffect[] AdditionApplyEffects { get; private set; } = Array.Empty<IAdditionApplyEffect>();

/// <summary>
Expand All @@ -43,8 +43,7 @@ public class GameplayEffectSO : ScriptableObject, IGameplayEffectDef
[field: SerializeField, Tooltip("How the effect being execute with custom logic. Can leave it null.")]
public EffectExecutionSO[] CustomExecutions { get; private set; } = Array.Empty<EffectExecutionSO>();

[Tooltip("Custom requirement to know if we can apply effect or not")]
[field: SerializeReference, SubclassSelector]
[field: SerializeReference, SubclassSelector, Tooltip("Custom requirement to know if we can apply effect or not")]
public IEffectCondition[] ApplicationConditions { get; private set; } = Array.Empty<IEffectCondition>();

/// <summary>
Expand Down
1 change: 1 addition & 0 deletions Runtime/EffectSystem/Utilities/GameplayEffectDefBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using H2V.GameplayAbilitySystem.Components;
using H2V.GameplayAbilitySystem.EffectSystem.AdditionApplyEffects;
using H2V.GameplayAbilitySystem.EffectSystem.EffectConditions;
using H2V.GameplayAbilitySystem.EffectSystem.GamplayEffectPolicies;
using H2V.GameplayAbilitySystem.EffectSystem.ScriptableObjects;
using H2V.GameplayAbilitySystem.TagSystem.ScriptableObjects;
Expand Down
9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
{
"name": "com.h2v.gameplay-ability-system",
"version": "1.0.1",
"name": "h2v.gameplay-ability-system",
"version": "1.0.0",
"displayName": "Gameplay Ability System",
"description": "Gameplay Ability System from Unreal to Unity",
"unity": "2022.3",
"unityRelease": "0f1",
"dependencies": {
"com.mackysoft.serializereference-extensions": "1.1.9",
"com.h2v.extensions-core": "0.0.1"
},
"author": {
"name": "H2V",
"email": "h2v9696@gmail.com",
"url": "https://github.com/h2v9696"
}
}

0 comments on commit 71def0a

Please sign in to comment.