mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-22 08:08:51 -05:00
Merge branch 'canary'
This commit is contained in:
commit
acf901eb6d
@ -8,7 +8,13 @@
|
||||
|
||||
# [Unreleased]
|
||||
|
||||
- <Fill in your change here>
|
||||
## 📝 Documentation
|
||||
|
||||
- [#73](https://github.com/AdamRamberg/unity-atoms/issues/73) Add discord link to docs. ([@AdamRamberg](https://github.com/AdamRamberg))
|
||||
|
||||
## 🚀 New feature
|
||||
|
||||
- [#78](https://github.com/AdamRamberg/unity-atoms/pull/78) Setter to AtomReference's Value was added. ([@Saso222](https://github.com/Saso222), [@soraphis](https://github.com/soraphis))
|
||||
|
||||
# 2.0.0 (October 24, 2019)
|
||||
|
||||
|
@ -13,4 +13,4 @@ _Here is a check list for publishing a new version:_
|
||||
- [] Run `npm start` to test and see that it runs as expected.
|
||||
- [] Run `GIT_USER=<your-username> \ CURRENT_BRANCH=master \ npm run publish-gh-pages` to publish the website.
|
||||
- [] Create a new release under `releases` on the Github repo.
|
||||
- [] From the root run `npm publish:all`. This is only possible for me (Adam Ramberg) at the moment. Will need to look into a solution for this.
|
||||
- [] From the root run `npm run publish:all`. This is only possible for me (Adam Ramberg) at the moment. Will need to look into a solution for this.
|
||||
|
@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
@ -56,7 +57,7 @@ namespace UnityAtoms
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the value for the Reference.
|
||||
/// Get or set the value for the Reference.
|
||||
/// </summary>
|
||||
/// <value>The value of type `T`.</value>
|
||||
public T Value
|
||||
@ -72,6 +73,25 @@ namespace UnityAtoms
|
||||
return _value;
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
switch (_usage)
|
||||
{
|
||||
case (AtomReference.Usage.Variable):
|
||||
{
|
||||
_variable.Value = value;
|
||||
break;
|
||||
}
|
||||
case (AtomReference.Usage.Value):
|
||||
{
|
||||
_value = value;
|
||||
break;
|
||||
}
|
||||
case (AtomReference.Usage.Constant):
|
||||
default:
|
||||
throw new NotSupportedException("Can't reassign constant value");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static implicit operator T(AtomReference<T, V, C> reference)
|
||||
|
@ -63,6 +63,10 @@ The Unity Atoms docs are now published at **https://adamramberg.github.io/unity-
|
||||
|
||||
Read [this](https://medium.com/@adamramberg/unity-atoms-tiny-modular-pieces-utilizing-the-power-of-scriptable-objects-e8add1b95201) article on Medium for a great introduction to Unity Atoms.
|
||||
|
||||
## Looking for support?
|
||||
|
||||
For questions and support please join our [Discord channel](https://discord.gg/W4yd7E7).
|
||||
|
||||
## Maintainers
|
||||
|
||||
- [AdamRamberg](https://github.com/AdamRamberg)
|
||||
|
@ -46,6 +46,13 @@ class Footer extends React.Component {
|
||||
</div>
|
||||
<div>
|
||||
<h5>Community</h5>
|
||||
<a
|
||||
href="https://discord.gg/W4yd7E7"
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
>
|
||||
Discord
|
||||
</a>
|
||||
<a
|
||||
href="https://gitter.im/unity-atoms/community#"
|
||||
target="_blank"
|
||||
|
Loading…
Reference in New Issue
Block a user