Commit Graph

25 Commits

Author SHA1 Message Date
AdamRamberg
235766e76d Add posibility to choose what to generate 2019-09-22 20:59:54 +02:00
AdamRamberg
07c845330d Generate SetVariableValue action 2019-09-18 22:34:40 +02:00
Soraphis
3933782ba6 Moved a few classes from IconAssignment into Editor assemblies because they require UnityEditor 2019-07-15 00:05:28 +02:00
AdamRamberg
09db88ac8b Add AtomDrawers to Atoms generator 2019-07-05 10:55:22 +02:00
AdamRamberg
0f20423461 Small style tweaks 2019-06-17 23:11:00 +02:00
Oliver Biwer
72f17db03f Canary/generator fix (#44)
* Moved Generator.cs into Editor folder under AtomsEditor.asmdef

Generator.cs must not be outside of the Editor Assembly Definition because it uses UnityEditor and thus would prevent games from building

* - cleaned up unused imports
- fixed a potential bug in Templating.cs because IndexOf is culture specific
    - at least warnings in Rider are now eliminated
- cleaned up the logic of Templating.cs
    - the while condition had never changed, it contained a redundant true
    - using an early return if the list is null

* Replaced ResolveConditionals in Templating.cs to allow nested IF-blocks
fixed typos
2019-06-17 23:09:42 +02:00
Adam Ramberg
1a7b772e45 Improvements and added robustness to code generator 2019-06-09 16:47:14 +02:00
Adam Ramberg
f464293f7f Use AtomDrawer 2019-05-07 22:52:55 +02:00
Adam Ramberg
b4106d5f5e #42 - Create a default atoms property drawer 2019-05-07 22:37:50 +02:00
Adam Ramberg
6693a27d2d #22 - Trigger events from inspector 2019-05-06 00:03:43 +02:00
Adam Ramberg
1cab137cb5 Fix code generator 2019-05-05 00:54:05 +02:00
Adam Ramberg
37364196d8 Fixes to PR #38 2019-05-04 17:08:26 +02:00
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
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
Soraphis
f6ce403447 small fix for 2019.1 wher UIElements are not experimental anymore 2019-04-16 23:43:15 +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
3b0664fe04 Minor style adjustments to CodeGenerator.cs 2019-04-08 18:43:29 +02:00
Soraphis
64f6f785bb Added a script to generate atom-classes for other types 2019-04-08 17:25:32 +02:00
Adam Ramberg
77cfaa1f24 Fixes to PR + assign null to remove warnings 2019-04-08 16:14:50 +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
7763f81ede Unified line endings
* Unified all line endings in project to align with .editorconfig; all end-of-line characters have been set to LF and new-lines placed at the end of every file if not present.
2019-04-07 11:56:54 +02:00
Adam Ramberg
bdf81a5e9c Squashed commit of the following:
commit 847eff037204d841546c0da772d2f341f9cf1e25
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Sun Mar 17 22:09:38 2019 +0100

    #17 - Serializable not needed for ScriptableObject

commit 593b275e6394b9d589de8a7a20375145dfc4aa84
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Sun Mar 17 21:59:33 2019 +0100

    18 - IGameEvent<T1, T2> RegisterListener

commit 40443ce9bd4b1c339aaf19cfcb119f2336608dae
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 16:35:04 2019 +0100

    Remove some more warnings

commit bd453110ac51a6ebe3d54368fcb039bdbe52e278
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 16:33:30 2019 +0100

    Update README

commit 90977b853a047c84efb5311768a09f4e8a1165b2
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 16:31:45 2019 +0100

    Initialize to null to get rid off warnings

commit 38b7f5c4ede195aa7198f567801c9cbeedc9b6f6
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 16:15:53 2019 +0100

    More fixes to enable local unity project

commit 404e1cbf88ed4431c61d3ece074e838e74ac5141
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 16:12:37 2019 +0100

    Remove duplicated asmdef

commit 5734300684e8a16553f213157cad1b4722b7cb7f
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 16:09:46 2019 +0100

    Change files to include

commit d1e42b119a6bc1577b1792459fa298e063652337
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 16:05:56 2019 +0100

    Added root package json

commit 1709a0347147d74460f653182bbaf8d15eb6154e
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 15:30:44 2019 +0100

    #16 - Add test and examples Unity project

commit a3ea1a133bf6727e011ba85c64569db45302e487
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 13:12:02 2019 +0100

    #13 - Make usage of UPM (package manager)

commit 492a30e905f6cf3f5899cb7080ef2bda73110f00
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 11:28:56 2019 +0100

    Added extensions + code formatting fixes

commit 709949a1016c236cfd363cf25392fedfd8d083ca
Author: Oliver Biwer <soraphis@users.noreply.github.com>
Date:   Fri Mar 8 10:16:45 2019 +0100

    More AtomicTags changes (#15)

    * - added assembly defintions, and unit tests
    - improved AtomicTags in regards of #8, #9 and #10

    * Fixes #11
    - Added Equality Members (inclusive HashCode) for ScriptableObjectVariableBase

    * removed Rider Plugins from git

    * Further AtomicTag optimization

commit ae6584c879f182e727fe0a8d0aff4b0715829914
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 10:08:36 2019 +0100

    Editor config

commit 197d7067608600e4e2d13dc42db909ee8f8c75df
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Mar 8 09:23:12 2019 +0100

    Added editor config file

commit 53d6adc07b
Author: Oliver Biwer <soraphis@users.noreply.github.com>
Date:   Tue Mar 5 22:57:47 2019 +0100

    More efficient AtomicTags (#12)

    * - added assembly defintions, and unit tests
    - improved AtomicTags in regards of #8, #9 and #10

    * Fixes #11
    - Added Equality Members (inclusive HashCode) for ScriptableObjectVariableBase

    * removed Rider Plugins from git

commit 81209d83b5
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Wed Dec 12 20:54:17 2018 +0100

    Added MonoHooks + ColliderType + bug fixes

commit c6b240cebb
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Sat Dec 1 00:23:10 2018 +0100

    Experimenting with adding UI state management

commit dfd70a8944
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Nov 30 23:10:21 2018 +0100

    Issue #6 - AtomicTags

commit 8907763227
Author: Adam Ramberg <andersson.adam.89@gmail.com>
Date:   Fri Nov 30 22:42:29 2018 +0100

    First commit of v1.0.0
2019-03-17 23:43:20 +01:00