Commit Graph

335 Commits

Author SHA1 Message Date
Adam Ramberg
91b20c93ae Scene field fixes 2019-05-04 11:54:20 +02:00
Soraphis
97fcf763eb Fixed the ReferenceDrawer for SceneFields.
Fixed the ReferenceDrawer for any field
2019-05-04 11:49:35 +02:00
Soraphis
ce966e5cad minor changes, more utility 2019-05-04 11:49:35 +02:00
Soraphis
2efc97dcc4 Added SceneFields and UnityAtoms for the new Type 2019-05-04 11:49:35 +02:00
Soraphis
42ef1682c0 Removed event generic parameters from ScriptableObjectReference
- they are not needed and hinder the implementation if a type does not have events
2019-05-04 11:49:35 +02:00
Adam Ramberg
ca6ceaa2b2 GetRootVisualContainer not in 2018.3 2019-04-21 23:35:32 +02:00
Adam Ramberg
d9a505ec2d Added ObserveChangeWithHistory 2019-04-21 13:53:08 +02:00
Soraphis
f6ce403447 small fix for 2019.1 wher UIElements are not experimental anymore 2019-04-16 23:43:15 +02:00
Adam Ramberg
727ae015b3 Adjustments to example scene 2019-04-16 22:33:09 +02:00
Adam Ramberg
7a46365829 Add utils to merge observables 2019-04-16 22:32:38 +02:00
Adam Ramberg
7cb2fd09d6 Make variables, events and lists observable 2019-04-16 22:32:17 +02:00
Adam Ramberg
b1296b5848 Remove meta 2019-04-16 22:31:35 +02:00
Adam Ramberg
7db8fda7e5 Remove first expermimental version of Observer 2019-04-16 22:31:03 +02:00
Jeff Campbell
24eee05851 Removed redundant code
* Removed redundant interfaces IWithValue<T> and IWithOldValue<T> as they and their methods are unused.
* Removed redundant extensions and util classes/methods as they are unused by anything in the library
* Created AssemblyInfo.cs file to contain [assembly] attributes to expose internal types and methods to the UnityAtomsEditor assembly. This makes it easier to keep non-user facing code as internal, but still expose it for Editor usage.
* Removed AtomsLogger as this class does not add any value to the library. Some situations where it was being used in to warn of missing components such as OnButtonClickHook were doing so to warn of a missing component when it was already guaranteed to be there via the [RequireComponent] attribute (situation could never occur where it was not present). In some cases it was being used situationally like an Assert for situations where an NRE or other exception would immediately follow. Replacing these with an Assert accomplishes the same goal of removing these logging checks for non-editor builds while at the same time forcefully throwing an error with a more user-friendly error if a non-descript error would immediately be thrown.
* Where logs were being made previously with AtomsLogger, if not replaced with an Assert or removed entirely they are now being made with a const LogPrefix in new internal static class RuntimeConstants
2019-04-15 23:26:43 +02:00
Adam Ramberg
8f735b771d Add experminetal observer 2019-04-12 16:42:11 +02:00
Adam Ramberg
228cc0974a Add SetFunc method to GameFunctions 2019-04-12 16:41:54 +02:00
Adam Ramberg
593e057ab4 Add Pipe extensions to IList 2019-04-12 16:41:33 +02:00
Adam Ramberg
deea018ce1 Dynamic actions and functions 2019-04-12 10:19:40 +02:00
Adam Ramberg
1cabd33c74 Correct spelling mistake in GameFunction 2019-04-12 10:19:25 +02:00
Adam Ramberg
a98ad5be3b Use C# Func / Action in GameActions / Funcs 2019-04-12 10:09:54 +02:00
Adam Ramberg
0a057e0c64 Refactor DynamicAtoms 2019-04-12 09:41:53 +02:00
Adam Ramberg
29a3207d9d Move editor specific code into logger 2019-04-12 09:17:47 +02:00
Adam Ramberg
1468fd2771 Merge branch 'canary' into action-event 2019-04-11 16:00:02 +02:00
Adam Ramberg
eb5f6ef23d Remove unneccessary util funcs (use extensions) 2019-04-11 15:59:42 +02:00
Adam Ramberg
863ecb479a Merge branch 'canary' into action-event 2019-04-11 14:57:22 +02:00
Adam Ramberg
4c9d626933 Added Some with param 2019-04-11 14:56:57 +02:00
Adam Ramberg
8905bf8b8c Merge PR 2019-04-11 14:48:08 +02:00
Adam Ramberg
d551947c13 Test using action for game events 2019-04-11 13:52:13 +02:00
Gustavo Guimaraes
e6174b5397 Scriptable object IList (#34)
* Updated README

* ScriptableObjectList now implements IList

* Made ScriptableObjectList field a List again

* Fixed problems related to changing IList to List

* Update Source/Base/ScriptableObjectList.cs

Co-Authored-By: mutmedia <gustavo.ceci95@gmail.com>
2019-04-11 13:14:53 +02:00
Adam Ramberg
c6ed830713 Null check on disable in event listener 2019-04-11 10:11:13 +02:00
Adam Ramberg
4e5644b539 Break out the contributing part of the README 2019-04-11 09:44:07 +02:00
Adam Ramberg
564d3dc9b7 Forgotten meta files 2019-04-11 09:43:13 +02:00
Adam Ramberg
397e8f991b Moved Logger to /utils folder 2019-04-11 08:47:05 +02:00
Adam Ramberg
46ef78de91 Fixed broken asset in example scene 2019-04-11 08:39:37 +02:00
Adam Ramberg
ed574215ad Bug fixes + initial value -> not for constants 2019-04-08 19:46:02 +02:00
Adam Ramberg
06eab90bb1 Merge PR #29 2019-04-08 19:20:52 +02:00
Adam Ramberg
3b0664fe04 Minor style adjustments to CodeGenerator.cs 2019-04-08 18:43:29 +02:00
Adam Ramberg
302d81bff1 Merge PR #28 2019-04-08 18:15:31 +02:00
Soraphis
cc9f5a807b minor changes after rebase 2019-04-08 17:36:37 +02:00
Adam Ramberg
9e1fe7ae66 Example scene changes 2019-04-08 17:33:44 +02:00
Soraphis
64f6f785bb Added a script to generate atom-classes for other types 2019-04-08 17:25:32 +02:00
Soraphis
fa2d55fcf7 Refactored all type-related folders into an folder "Types" 2019-04-08 17:25:32 +02:00
Adam Ramberg
b54bf46bff Merge changes 2019-04-08 16:23:51 +02:00
Adam Ramberg
77cfaa1f24 Fixes to PR + assign null to remove warnings 2019-04-08 16:14:50 +02:00
Jeff Campbell
e65b69d8e9 Added code quality and style changes 2019-04-08 08:52:17 +02:00
Jeff Campbell
a9b6926d79 Updated readme to cover desired code style
* Updated readme to cover desired code style including class structure, formatting, and line settings.
2019-04-07 23:22:00 +02:00
Adam Ramberg
8a7216b79d Added new line before open braces to editorconfig 2019-04-07 17:59:10 +02:00
Adam Ramberg
4b10374850 Added every to ListExtensions 2019-04-07 17:57:57 +02:00
Jeff Campbell
943451b3d5 Cleaned up code readability, naming style to be consistent
* Add abstract modifier to all generic classes meant not to be instantiated directly as the intent is to specify a pattern for a closed type that can be serialized.
* Added sealed keyword to all closed types. This is an incidental performance improvement for mobile and desktop platforms utilizing il2cpp due to the way unsealed vs sealed virtual methods are handled in generated C++ code.
* Also sealed all inspectors to mark them as closed types.
* Dropped all where constraints to the next line as most of these class declarations break 120-130 characters. This should help improve readability and make this style consistent as it has been in use for the most-complex generic types already, but not for others.
* Dropped all generic type parameters (generally) numbering three or more to the next line to improve readability.
* Where found, added empty lines between property/field declarations in classes to improve readability.
* Extracted several 2x event classes into their own files to match convention established by other event classes.
* Removed unecessary meta files for C# solution.
* Added compiler options file (csc.rsp) file for the Unity project and added global warning ignore for 0649 (Field 'field' is never assigned to, and will always have its default value 'value'). This is necessary since 2018.3 switched the compiler to Roslyn and by design they have decided to not suppress this warning for monobehavior fields that are private, but serialized. This is very widely contested as most developers will not make every field needed to be assigned in the Editor as public (breaks encapsulation, opens surface area for bugs) and this can in some cases generate hundreds if not thousands of warnings. Adding the compiler options file suppresses this warning which also may hide legitimate warnings, but is far the lesser of two evils.
* Moved example scripts not in a namespace to UnityAtoms.Examples.
* Reordered public/private fields and properties to be consistent. Order is as follows; public and private properties followed by public/private fields.
* Renamed private fields to use '_' prefix and marked public fields as private where only used internally. Marked these fields with FormerlySerializedAs attribute to preserve older serialized values already in use.
* Removed redundant initialization of null to reference types as this is their default value.
* Marked implicitly private methods and members without an access modifier as explicitly private.
* Updated unit tests to use new private name field when getting private member field info.
2019-04-07 17:57:52 +02:00
Jeff Campbell
82fe803d48 Replaced foreach with for loop usage
* Replaced foreach with for loop usage in AtomicTags. Also renamed local variable tag to atomicTag to avoid hiding existing member.
* Previously in AtomicTags a #if UNITY_EDITOR was used around a portion of the code in OnValidate for editor-only code, but in truth this method is called only from the editor when selected in the inspector. I have moved this #if to surround the whole method.
2019-04-07 14:24:01 +02:00