private static void CreateSecondaryStatAsset()
        {
            SecondaryStat newData = CustomDataAssetUtility.CreateAndReturnDataAsset <SecondaryStat>();

            newData.Init();

            RpgDataRegistry registry = RpgDataAssetUtility.FindRpgDataRegistry();

            RpgRegistryUtility.AdderOfSecondaryStat newAdder;
            newAdder.secondaryStat = newData;
            registry.AddRpgDataObject(newAdder);
        }
        /// <summary>
        ///     Search for a SecondaryStat by name (not filename). Will return null if not found
        /// </summary>
        public SecondaryStat SearchSecondaryStat(string byName)
        {
            SecondaryStat foundObject = null;

            foreach (SecondaryStat entry in this.secondaryStats)
            {
                if (entry.Name.Equals(byName))
                {
                    foundObject = entry;
                    break;
                }
            }

            return(foundObject);
        }
        /// <summary>
        ///     Search for a SecondaryStat by ID. Will return null if not found
        /// </summary>
        public SecondaryStat SearchSecondaryStat(Guid byId)
        {
            SecondaryStat foundObject = null;

            foreach (SecondaryStat entry in this.secondaryStats)
            {
                if (entry.Id.Equals(byId))
                {
                    foundObject = entry;
                    break;
                }
            }

            return(foundObject);
        }
 void OnEnable()
 {
     this.dataObject = target as SecondaryStat;
 }
 /// <summary>
 ///     Constructor needs a SecondaryStat
 /// </summary>
 public SecondarySpDeriver(SecondaryStat statReference) : base(statReference.Id)
 {
     this.stat = statReference;
 }