Skip to content
This repository was archived by the owner on May 9, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .editorconfig

This file was deleted.

6 changes: 0 additions & 6 deletions .vsconfig

This file was deleted.

8 changes: 8 additions & 0 deletions Assets.meta

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

4 changes: 2 additions & 2 deletions Assets/SO Architecture/Collections/BaseCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace ScriptableObjectArchitecture
{
public abstract class BaseCollection : SOArchitectureBaseObject, IEnumerable
public abstract class BaseCollection : GameEventBase, IEnumerable
{
public object this[int index]
{
Expand All @@ -30,5 +30,5 @@ public bool Contains(object obj)
{
return List.Contains(obj);
}
}
}
}
22 changes: 19 additions & 3 deletions Assets/SO Architecture/Collections/Collection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,28 @@ public override Type Type
public void Add(T obj)
{
_list.Add(obj);
Raise();
}

public void AddRange(IList<T> obj)
{
_list.AddRange(obj);
Raise();
}

public void Remove(T obj)
{
if (_list.Contains(obj))
{
_list.Remove(obj);
Raise();
}

}
public void Clear()
{
_list.Clear();
Raise();
}
public bool Contains(T value)
{
Expand All @@ -61,10 +74,12 @@ public int IndexOf(T value)
public void RemoveAt(int index)
{
_list.RemoveAt(index);
Raise();
}
public void Insert(int index, T value)
{
_list.Insert(index, value);
Raise();
}
IEnumerator IEnumerable.GetEnumerator()
{
Expand All @@ -78,8 +93,9 @@ public override string ToString()
{
return "Collection<" + typeof(T) + ">(" + Count + ")";
}
public T[] ToArray() {
public T[] ToArray()
{
return _list.ToArray();
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ using ScriptableObjectArchitecture;

namespace $NAMESPACE$
{
[AddComponentMenu(SOArchitecture_Utility.EVENT_LISTENER_SUBMENU + "$TYPE$")]
[AddComponentMenu(SOArchitecture_Utility.EVENT_LISTENER_SUBMENU + "$TYPE$" + " Event Listener")]
public sealed class $TYPE_NAME$GameEventListener : BaseGameEventListener<$TYPE$, $TYPE_NAME$GameEvent, $TYPE_NAME$UnityEvent>
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public PropertyIterator(SerializedProperty property)
protected readonly SerializedProperty iterator;
protected readonly SerializedProperty endProperty;

private bool consumeChildren;
//private bool consumeChildren;
private int parentDepth;

public virtual bool Next()
Expand Down Expand Up @@ -54,7 +54,7 @@ private void UpdateState(SerializedProperty property)
if (IsSingleLine(iterator))
{
parentDepth = iterator.depth;
consumeChildren = true;
//consumeChildren = true;
}
}
private bool CanDraw()
Expand Down
10 changes: 8 additions & 2 deletions Assets/SO Architecture/Variables/SceneVariable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,21 @@ public void OnBeforeSerialize()
var sceneAssetGUID = UnityEditor.AssetDatabase.AssetPathToGUID(sceneAssetPath);
var scenes = UnityEditor.EditorBuildSettings.scenes;

//Fix SceneIndex != index in build settings, can cause exceptions when using LoadScene(int) #156
SceneIndex = -1;
int enabledSceneIndex = 0; //scenes are only given a build index if enabled.
for (var i = 0; i < scenes.Length; i++)
{
bool sceneIsEnabled = scenes[i].enabled;
if (scenes[i].guid.ToString() == sceneAssetGUID)
{
SceneIndex = i;
IsSceneEnabled = scenes[i].enabled;
if (sceneIsEnabled)
SceneIndex = enabledSceneIndex++;
IsSceneEnabled = sceneIsEnabled;
break;
}
else if (sceneIsEnabled)
++enabledSceneIndex;
}
}
#endif
Expand Down
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.

8 changes: 8 additions & 0 deletions Media.meta

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

143 changes: 143 additions & 0 deletions Media/1200x630.png.meta

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

Loading