public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            if (GUILayout.Button("Fix reagents' indexes."))
            {
                ChemistryReagentsSO singleton = (ChemistryReagentsSO)target;
                singleton.AllChemistryReagents.Clear();
                singleton.AllChemistryReagents.AddRange(FindAssetsByType <Reagent>());
                for (int i = 0; i < ChemistryReagentsSO.Instance.AllChemistryReagents.Count; i++)
                {
                    if (singleton.AllChemistryReagents[i].IndexInSingleton != i)
                    {
                        singleton.AllChemistryReagents[i].IndexInSingleton = i;
                        EditorUtility.SetDirty(singleton.AllChemistryReagents[i]);
                    }
                }

                EditorUtility.SetDirty(singleton);
                AssetDatabase.SaveAssets();
                AssetDatabase.Refresh();
            }

            if (GUILayout.Button("Collect all reactions"))
            {
                ChemistryReagentsSO singleton = (ChemistryReagentsSO)target;
                singleton.AllChemistryReactions.Clear();
                singleton.AllChemistryReactions.AddRange(FindAssetsByType <Reaction>());
                EditorUtility.SetDirty(singleton);
                AssetDatabase.SaveAssets();
                AssetDatabase.Refresh();
            }
        }
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            if (GUILayout.Button("Fix reagents' indexes."))
            {
                ChemistryReagentsSO singleton = (ChemistryReagentsSO)target;
                for (int i = 0; i < ChemistryReagentsSO.Instance.AllChemistryReagents.Length; i++)
                {
                    if (singleton.AllChemistryReagents[i].IndexInSingleton != i)
                    {
                        singleton.AllChemistryReagents[i].IndexInSingleton = i;
                        EditorUtility.SetDirty(singleton.AllChemistryReagents[i]);
                    }
                }

                AssetDatabase.SaveAssets();
                AssetDatabase.Refresh();
            }
        }