private void DrawAtomButton(AtomBase atom) { if (GUILayout.Button(atom.debugName ?? "[Anonymous]", Styles.LeftButton)) { _selectedAtom = atom; } }
internal static void Actualize(AtomBase atom) { _dirty = true; _updatingNextFrame.Enqueue(atom); if (ReferenceEquals(_current, null) && Application.isPlaying) { var go = new GameObject(nameof(AtomScheduler)); _current = go.AddComponent <AtomScheduler>(); DontDestroyOnLoad(_current); } }
private void DrawSelectedAtom() { // header { GUILayout.BeginHorizontal(EditorStyles.toolbar); if (GUILayout.Button("< Active Atoms", EditorStyles.toolbarButton)) { _selectedAtom = null; return; } GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); } var state = _selectedAtom.state == AtomState.Actual ? "Actual" : _selectedAtom.state == AtomState.Checking ? "Checking" : _selectedAtom.state == AtomState.Pulling ? "Pulling" : _selectedAtom.state == AtomState.Obsolete ? "Obsolete" : "Unknown"; GUILayout.Label(_selectedAtom.debugName ?? "[Anonymous]", EditorStyles.largeLabel); GUILayout.Label(state, EditorStyles.label); //if (_selectedAtom.KeepAlive) //{ // GUILayout.Label("Keep Alive", EditorStyles.boldLabel); //} GUILayout.Space(10); _selectedAtomScroll = GUILayout.BeginScrollView(_selectedAtomScroll); { DrawAtomCollection("Used By", _selectedAtom.subscribers, _selectedAtom.subscribersCount, _ => true); DrawAtomCollection("Uses", _selectedAtom.children, _selectedAtom.childrenCount, _ => true); } GUILayout.EndScrollView(); }
internal CyclicAtomDependencyException(AtomBase source) : base("Cyclic atom dependency of " + source) { }
private void OnAtomBecameActive(AtomBase obj) { RefreshActiveAtoms(); }
internal static void Unreap(AtomBase atom) { atom.Reaping = false; }
internal static void Reap(AtomBase atom) { _dirty = true; atom.Reaping = true; _reaping.Enqueue(atom); }
internal WatchScope(AtomBase self) { _parent = AtomBase.Stack; AtomBase.Stack = self; }