Commit Graph

492 Commits

Author SHA1 Message Date
Adam Ramberg
cadd85993d Fix comment 2023-12-19 00:31:06 +01:00
Adam Ramberg
5dc2eb4726 Fix property field height for quaternions in variable editor as well 2023-12-19 00:27:28 +01:00
Adam Ramberg
f296444c98 Fix property height for quaternions 2023-12-19 00:10:25 +01:00
Adam Ramberg
de5513fb3b Fix value field height in reference drawer for older unity versions 2023-12-18 23:17:27 +01:00
ToasterHead
53bc009865
#441 [FEATURE] Auto drag and drop atom references through inspector without the need to manually switch usage type (#440)
* Added the ability to drag and drop any atom reference to a `AtomReference` without the need to manually select the type through the 3 dot button on inspector

- I also refactored the `AtomBaseReferenceDrawer` script so that it's easier to read/maintain.
- The class `BaseAtomInstancer` is needed to be able to auto reference instancers. Because when we drag a `GameObject` we need to get it's `AtomInstancer` component to determine the reference type. Also, the class represents something similiar to `BaseAtom` for `ScriptableObjects` but for `MonoBehaviors`, so it makes sense to have it.

* Addressed some of the key points @soraphis made and fixed the issues I mentioned on the #442 pull

- Solved the probelms that arise when a `GameObject` has multiple different instancers in it (mentioned in the #442 pull)
- Removed `UsageIndex` class as it is not needed

* Fixed file name not matching the class name

* Addressed @soraphis issue of `GuiData` not being a struct, so I changed it and modified the `AtomBaseReferenceDrawer` to handle it as a struct

* Fixed `GuiData` isn't updated even though `position` and `label` parameters of the `OnGUI` are.

* Reversed the for loops order because the order of the components inside the `GameObject` are more important than the order of the "usages" so it fixes that problem

- Also cleaned the code a bit

* Missed a line that could be simplified

- Made `Set/GetUsageIndex` into static because we can

* Fixed issue mentioned in #442 > "you only get the first component, when dragging in a game object, so there could be the case where selecting the type manually and dragging into it will swap the field"

The issue is when there are multiple instancer components in a single `GameObject` then when you drag said `GameObject` then the atom reference will switch to the first instancer (via usage index) no matter the intent of the user. However, the intent of the user could be to pick the 2nd or 3rd reference, so he could manually select the usage type using the 3 dots button, but it won't work if he decides to drag and drop a `GameObject` that has multiple instancers that the reference could switch to automatically, which will always be the first instancer of the dragged `GameObject`, which bascially makes the experience frustrating to that particular scenario. Now, you can guess that the issue is hyper specific just because of how hard it is to me to explain it in text, so don't worry if you didn't get it on the first read. If you would like me to showcase it, I will gladly share a video example of what I mean.

* Fixed index out of range exception (I forgot that I set the usage index at the end of this method and it could be -1 because of this line)

* Redone the previous push because it was incorrect

* Response to @AdamRamberg to try to make the code section clearer by refactoring it

* * Minor cosmetic changes
* Replace switch expression to be backwards compatible (for example to be able to run the unity-atoms-example project)
* Always remove the last greater than symbol in GetPropertyTypeName to take into account generic types

* Added comment to IAtomInstancer

---------

Co-authored-by: Adam Ramberg <adam@mambojambostudios.com>
2023-12-18 22:46:11 +01:00
Adam Ramberg
37ead24dbb v4.4.8 2023-08-08 20:28:19 +02:00
Adam Ramberg
808af5bb74
Add appropriate UNITY_EDITOR compiler flags (#425) 2023-08-08 20:25:12 +02:00
Adam Ramberg
50d04f1c9e Add a last step to PUBLISHING.md 2023-08-04 23:41:57 +02:00
Adam Ramberg
d3da0409e9 v4.4..7 2023-08-04 23:29:29 +02:00
Soraphis
2d2ae9b12f
Handling dead references when resetting objects. (#421)
* fix: handling dead references when resetting objects. (#417)

* fix: wrong state checked in AtomEvent reset (#403)

* fix: make AtomValueList compatible with disabled domain reload (#419)
fix: AtomValueList now resets runtime modifications (#418)

* fix: handling dead references when resetting objects for AtomValueList. (#417)

* removed the dead-reference handling (#417)
- this will be addressed in (#421)
compacted the Playmode state change

* Remove Atom types from their _instances lists OnDisable()

* Added disclaimer / comment regarding the solution

---------

Co-authored-by: Adam Ramberg <adam@mambojambostudios.com>
2023-08-04 23:19:42 +02:00
Adam Ramberg
0899d4113d Fixed formatting in AtomValueList 2023-08-03 23:30:17 +02:00
Soraphis
db3ed28471
AtomValueList disabled domain reload compatibility (#420)
* fix: wrong state checked in AtomEvent reset (#403)

* fix: make AtomValueList compatible with disabled domain reload (#419)
fix: AtomValueList now resets runtime modifications (#418)

* fix: handling dead references when resetting objects for AtomValueList. (#417)

* removed the dead-reference handling (#417)
- this will be addressed in (#421)
compacted the Playmode state change
2023-08-03 23:14:26 +02:00
Soraphis
7992efc98d
fix: FSM not compatible with disabled domain reload (#402) (#422) 2023-08-03 07:20:29 +02:00
Adam Ramberg
1d3d3f8607 Merge branch 'canary' 2023-07-22 19:18:58 +02:00
Adam Ramberg
d38b8f236e v4.4.6 2023-07-22 19:18:13 +02:00
Thimo
4912480957
#67 [FEATURE] Set event name suggestion on Variable Changed event creation (#317)
* [Added] Feature for #67 event name suggestion initial version

* [Refactored] Cleaned naming code to its own class

* [Fixed] c# range is not supported in 2019.4 LTS

* * Simplified logic for suggested name in AtomDrawer
* Simplified CleanPropertyName - first if-block was catched by second block
* Replaced FilterLastIndexOf with typeof(T).Name

---------

Co-authored-by: Thimo de Ram <tdram@esites.local>
Co-authored-by: Adam Ramberg <adam@mambojambostudios.com>
2023-07-22 18:54:35 +02:00
Adam Ramberg
2c46746a34
Remove generated API docs (#411)
* * Remove generateDocs.js
* Update PUBLISHING.md
* Remove generated md files
* Remove all package.json deps in root since they are not needed anymore
* Remove all refs to api folder in website
* Replaced header link to API with link to the first tutorial

* Tutorial -> Tutorials

* Clean up
2023-07-22 00:34:12 +02:00
Soraphis
eecaa5f80b
Adding Documentation (#413)
* fix: event replay buffer persisting if domain reload disabled

* fix: clearing event registrations when changing playmode stage.

* feat: add philosophy as separate section

* feat: added section about pre-change transformers

* made overview a bit slimmer and less intimidating.

* feat: added a page about tags

* revert file to state of canary

* * Removed everything that talks about implementations in the Philopsophy section.
* Added notes from Ryan Hipple's talk to the philosophy section
* Reintroduced the old overview page with changes from #416, since I believe it is
* Removed all Admonitions, since they are not working in docusaurus v1
* Proof read and made corrections to variables transformers and tags pages.
* Added changes in "creating atoms" from #416

* Replaced old ref / link to "Overview and philosophy"

---------

Co-authored-by: Adam Ramberg <adam@mambojambostudios.com>
2023-07-22 00:14:06 +02:00
Soraphis
62bc3c9812
fix: Event Replay Buffer not cleared when domain reload disabled (#403)
* fix: event replay buffer persisting if domain reload disabled

* fix: clearing event registrations when changing playmode stage.
2023-07-19 19:47:43 +02:00
Soraphis
b225290b48
FIX: Using TextField in AssetGenerator does not work as expected (#409)
* fix: pasting FullQualifiedName in the generators text field, not picking up the actual type

* fix: replaced TryAdd call to support lower .NET versions
2023-07-19 19:40:38 +02:00
Soraphis
f75215adba
fix: SyncGameObjectToList adding object multiple times to list (#389) 2023-07-18 23:09:23 +02:00
Soraphis
fb471754bc
prevents FiniteStateMachineMonoHook singleton from being unloaded (#386) 2023-07-18 22:48:06 +02:00
Adam Ramberg
994026fb7e Added input-system shield to README 2022-10-25 21:26:21 +02:00
Adam Ramberg
d6d3fbb1aa
Call base impl of ImplSpecificSetup() in FSM instancer (#373) 2022-10-24 23:04:31 +02:00
Soraphis
1d498090e3
prevent null reference exceptions in editor when using not-serializab… (#371)
* prevent null reference exceptions in editor when using not-serializable types

* - Draw warning helpbox only once in AtomVariableEditor.cs
- Minor clean up

* Revert unintended removed line

Co-authored-by: Adam Ramberg <adam@mambojambostudios.com>
2022-10-24 00:22:30 +02:00
Soraphis
9cf1b60a06
fix: corrected IEquatable implementation check (#362) 2022-10-23 23:03:20 +02:00
Soraphis
bc2a68527f
fix: #363 enum property did not return int value, but index (#364) 2022-10-23 22:51:31 +02:00
Soraphis
b457ac386f
removed ondisable method, to fix #349 (#369)
* removed ondisable method, to fix #349

* Remove _changed and _changedInstantiatedAtRuntime since they are not used anymore

Co-authored-by: Adam Ramberg <adam@mambojambostudios.com>
2022-10-23 22:34:12 +02:00
Soraphis
b2e302498d
fix: #353 "Vector2/3 reference not properly showing" (#359)
* fix: #353 while keeping #289 fixed

* Fix height of popup (was covering click area of expanded type's properties)

Co-authored-by: Adam Ramberg <adam@mambojambostudios.com>
2022-10-22 23:53:10 +02:00
davient
5df498b41e Corrected docs/tutorials/mono-hooks.md to reference a Collider2D Event Reference Listener
updated screenshot to match
2022-06-18 17:12:30 +02:00
Adam Ramberg
a41a7f4abe Update release date of 4.4.5 2022-05-09 23:01:50 +02:00
Miika Lönnqvist
12515aefc8
Update all version references to 4.4.5 (#350) 2022-05-09 22:50:56 +02:00
Soraphis
4ee7155b63 fix: conditional compilation for EDITOR only code 2022-04-28 07:36:58 +02:00
Adam Ramberg
d4eb9ccc3b Update release date of 4.4.4 2022-04-17 23:15:28 +02:00
Adam Ramberg
47f3062f3d Merge branch 'canary' 2022-04-17 23:08:19 +02:00
Adam Ramberg
495e3036e9 Add ThimoDEV to the list of maintainers 2022-04-17 23:05:45 +02:00
Miika Lönnqvist
3b39e6a2f1
Prepare for release of 4.4.4 (#343)
* Update CHANGELOG

* Update version in documentation to 4.4.4

* Remove reference to Examples directory

* Update package-lock.json

* Update API documentation
2022-04-17 22:52:38 +02:00
Thimo de Ram
5c094f1b10 [Removed] Debug mode logging 2022-03-15 21:28:03 +01:00
Thimo de Ram
a64ae84096 [Changed] NRE to Debug.Log 2022-03-15 21:28:03 +01:00
Thimo de Ram
46037ac590 fix #321 NRE when Event Reference Listeners event reference is not set 2022-03-15 21:28:03 +01:00
Miika Lönnqvist
a35e7342cc Remove Casey-Hofland from list of maintainers 2022-02-27 14:40:25 +01:00
Soraphis
9837fff97f fixing unnecessary allocations when debug mode disabled 2022-02-27 10:07:45 +01:00
dependabot[bot]
cdf7928ef1 Bump tar from 4.4.8 to 4.4.19 in /website
Bumps [tar](https://github.com/npm/node-tar) from 4.4.8 to 4.4.19.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v4.4.8...v4.4.19)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-23 21:57:00 +01:00
dependabot[bot]
53a9c65d7b Bump lodash from 4.17.19 to 4.17.21 in /website
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.19 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.19...4.17.21)

---
updated-dependencies:
- dependency-name: lodash
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-23 21:56:52 +01:00
dependabot[bot]
3e9c88de6e Bump postcss from 7.0.18 to 7.0.39 in /website
Bumps [postcss](https://github.com/postcss/postcss) from 7.0.18 to 7.0.39.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/7.0.39/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/7.0.18...7.0.39)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-23 21:56:43 +01:00
dependabot[bot]
3da8fea19d Bump shelljs from 0.8.3 to 0.8.5 in /website
Bumps [shelljs](https://github.com/shelljs/shelljs) from 0.8.3 to 0.8.5.
- [Release notes](https://github.com/shelljs/shelljs/releases)
- [Changelog](https://github.com/shelljs/shelljs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/shelljs/shelljs/compare/v0.8.3...v0.8.5)

---
updated-dependencies:
- dependency-name: shelljs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-23 21:56:10 +01:00
dependabot[bot]
277a8e3375 Bump url-parse from 1.4.7 to 1.5.7 in /website
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.4.7 to 1.5.7.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.4.7...1.5.7)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-23 21:54:59 +01:00
dependabot[bot]
fa0ac430d7 Bump ajv from 6.10.2 to 6.12.6 in /website
Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.10.2 to 6.12.6.
- [Release notes](https://github.com/ajv-validator/ajv/releases)
- [Commits](https://github.com/ajv-validator/ajv/compare/v6.10.2...v6.12.6)

---
updated-dependencies:
- dependency-name: ajv
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-23 21:54:38 +01:00
CaseyDeCoder
aecaa73ad0 Fix hasChildren display in AtomReferences
The display of an AtomReference would act a bit weird if the Atom was of e.g. a serializable class.
2021-12-28 16:14:11 +01:00
Thimo de Ram
7c372e6c38 Feature #293 changed private list variable to protected to support custom classes 2021-12-28 16:00:47 +01:00