Пример #1
0
        public override void Init(Reactor reactor)
        {
            base.Init(reactor);
            if (reactable != null) {
                #region Edited by PanDenat
                reactor.AddComponentsIfMissing(reactable);
                #endregion
                var root = (React.Root)React.JsonSerializer.Decode(reactable.json);
                root.PreProcess(gameObject, reactor);
                importedChild = root.children[0];

                #region Log if null
                if (importedChild == null) {
                    Debug.LogWarning("Imported root: " + root + " \n\n"
                        + "Imported reactable: " + reactable + "\n\n"
                        + "Imported reactable behaviours: " + reactable.behaviourTypes + "\n\n"
                        + "Reactor: " + reactor);
                    Debug.Log(reactable.json);
                }
                #endregion
            } else Debug.LogError("[Import Reactable Node] no reactable to import!\n Reactor.reactable = " + reactor.reactable);
        }