Skip to content

Commit

Permalink
ver1.19.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mimyquality committed May 18, 2024
1 parent 26122f0 commit 968abc7
Show file tree
Hide file tree
Showing 79 changed files with 1,461 additions and 260 deletions.
16 changes: 16 additions & 0 deletions Packages/com.mimylab.fukuroudon/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@

利用手順は[こちら](https://github.com/mimyquality/FukuroUdon/wiki)からご確認ください。

## [1.19.0] - 2024/5/18

- **Added**
- Active Relay
- ActiveRelay to GameObjectを追加、これに伴い、ActiveRelay to Componentではゲームオブジェクトのアクティブ切替ができなくなりました。
- ActiveRelay to ComponentにEvent Typeを追加、オブジェクトがアクティブに/非アクティブになった時だけ実行できるようになりました。
- ActiveRelay to VRCComponentを追加しました。
- ActiveRelay to ObjectSyncを追加しました。

- **Changed**
- AmbientEffect Assistant
- AmbientSound Assistantから改名しました。これに伴い、General枠に追加していた一部コンポーネントをこちらに移しました。
- Grab SlideDoor
- Prefab内のオブジェクト名を分かりやすいようリネームしました。

## [1.18.3] - 2024/5/5

- **Added**
Expand Down Expand Up @@ -441,6 +456,7 @@
- 0.2.7バージョンで、later-joiner視点でjoin直後が非アクティブだと同期しなかったのを修正しました。
- 他人がピックアップした際にオブジェクトが一瞬跳ねる現象を低減しました。

[1.19.0]: https://github.com/mimyquality/FukuroUdon/releases/tag/1.19.0
[1.18.3]: https://github.com/mimyquality/FukuroUdon/releases/tag/1.18.3
[1.18.2]: https://github.com/mimyquality/FukuroUdon/releases/tag/1.18.2
[1.18.1]: https://github.com/mimyquality/FukuroUdon/releases/tag/1.18.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,44 +18,44 @@ public enum ActiveRelayToAnimatorEventType
ActiveAndInactive,
}

[AddComponentMenu("Fukuro Udon/Active Relay/Active Relay to Animator")]
[AddComponentMenu("Fukuro Udon/Active Relay/ActiveRelay to Animator")]
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
public class ActiveRelayToAnimator : UdonSharpBehaviour
{
[SerializeField]
ActiveRelayToAnimatorEventType _eventType = default;
private ActiveRelayToAnimatorEventType _eventType = default;
[SerializeField]
Animator _animator = null;
private Animator _animator = null;

[Header("Set Animator parameters by event")]
[SerializeField]
string _triggerName = "";
private string _triggerName = "";
[SerializeField]
bool _resetTrigger = false;
private bool _resetTrigger = false;

[Space]
[SerializeField]
string _boolName = "";
private string _boolName = "";
[SerializeField]
bool _boolValue = false;
private bool _boolValue = false;

[Space]
[SerializeField]
string _intName = "";
private string _intName = "";
[SerializeField]
int _intValue = 0;
private int _intValue = 0;

[Space]
[SerializeField]
string _floatName = "";
private string _floatName = "";
[SerializeField]
float _floatValue = 0.0f;
private float _floatValue = 0.0f;

// パラメーター名ハッシュのキャッシュ用
int _triggerNameHash, _boolNameHash, _intNameHash, _floatNameHash;
private int _triggerNameHash, _boolNameHash, _intNameHash, _floatNameHash;

bool _initialized = false;
void Initialize()
private bool _initialized = false;
private void Initialize()
{
if (_initialized) { return; }

Expand All @@ -67,7 +67,7 @@ void Initialize()
_initialized = true;
}

void OnEnable()
private void OnEnable()
{
Initialize();

Expand All @@ -78,7 +78,7 @@ void OnEnable()
}
}

void OnDisable()
private void OnDisable()
{
if (_eventType == ActiveRelayToAnimatorEventType.ActiveAndInactive
|| _eventType == ActiveRelayToAnimatorEventType.Inactive)
Expand All @@ -87,7 +87,7 @@ void OnDisable()
}
}

void TrySetValue()
private void TrySetValue()
{
if (_animator)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,88 @@ MonoBehaviour:
Data:
- Name:
Entry: 12
Data: 2
Data: 3
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _components
Data: _eventType
- Name: $v
Entry: 7
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _components
Data: _eventType
- Name: <UserType>k__BackingField
Entry: 7
Data: 3|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: MimyLab.ActiveRelayEventType, FukuroUdon
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 7
Data: 4|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Int32, mscorlib
- Name:
Entry: 8
Data:
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 6
Data:
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 5|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 6|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _components
- Name: $v
Entry: 7
Data: 7|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _components
- Name: <UserType>k__BackingField
Entry: 7
Data: 8|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Object[], UnityEngine.CoreModule
Expand All @@ -67,7 +133,7 @@ MonoBehaviour:
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 3
Data: 8
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
Expand All @@ -82,13 +148,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 4|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 9|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 5|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 10|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
Expand All @@ -112,13 +178,13 @@ MonoBehaviour:
Data: _invert
- Name: $v
Entry: 7
Data: 6|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 11|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _invert
- Name: <UserType>k__BackingField
Entry: 7
Data: 7|System.RuntimeType, mscorlib
Data: 12|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Boolean, mscorlib
Expand All @@ -127,7 +193,7 @@ MonoBehaviour:
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 7
Data: 12
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
Expand All @@ -142,13 +208,13 @@ MonoBehaviour:
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 8|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 13|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 9|UnityEngine.SerializeField, UnityEngine.CoreModule
Data: 14|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,44 @@ namespace MimyLab
//using VRC.SDK3.Components;
//using VRC.Udon;

[AddComponentMenu("Fukuro Udon/Active Relay/Active Relay to Component")]
[AddComponentMenu("Fukuro Udon/Active Relay/ActiveRelay to Component")]
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
public class ActiveRelayToComponent : UdonSharpBehaviour
{
[SerializeField]
Object[] _components = new Object[0];
private ActiveRelayEventType _eventType = default;
[SerializeField]
bool _invert = false;
private Object[] _components = new Object[0];
[SerializeField]
private bool _invert = false;

void OnEnable()
private void OnEnable()
{
ToggleComponents(!_invert);
if (_eventType == ActiveRelayEventType.ActiveAndInactive
|| _eventType == ActiveRelayEventType.Active)
{
ToggleComponents(!_invert);
}
}

void OnDisable()
private void OnDisable()
{
ToggleComponents(_invert);
if (_eventType == ActiveRelayEventType.ActiveAndInactive
|| _eventType == ActiveRelayEventType.Inactive)
{
ToggleComponents(_invert);
}
}

void ToggleComponents(bool value)
private void ToggleComponents(bool value)
{
foreach (var component in _components)
{
if (!component) continue;

var type = component.GetType();
if (type == typeof(GameObject)) { var downCasted = (GameObject)component; downCasted.SetActive(value); }
//if (type == typeof(GameObject)) { var downCasted = (GameObject)component; downCasted.SetActive(value); }
if (type == typeof(GameObject)) { return; }
// Collider
else if (type == typeof(BoxCollider)) { var downCasted = (BoxCollider)component; downCasted.enabled = value; }
else if (type == typeof(SphereCollider)) { var downCasted = (SphereCollider)component; downCasted.enabled = value; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,37 @@ namespace MimyLab
//using VRC.SDKBase;
//using VRC.Udon;

[AddComponentMenu("Fukuro Udon/Active Relay/Active Relay to Effect")]
[AddComponentMenu("Fukuro Udon/Active Relay/ActiveRelay to Effect")]
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
public class ActiveRelayToEffect : UdonSharpBehaviour
{
[Tooltip("Only particle emission module toggle")]
[SerializeField]
bool _invert = false;
private bool _invert = false;

[Header("Settings when active")]
[SerializeField]
AudioSource _audioSourceForActive = null;
private AudioSource _audioSourceForActive = null;
[SerializeField]
AudioClip _soundForActive = null;
private AudioClip _soundForActive = null;

[SerializeField]
ParticleSystem _particleForActive = null;
private ParticleSystem _particleForActive = null;
[SerializeField]
int _emitForActive = 0;
private int _emitForActive = 0;

[Header("Settings when inactive")]
[SerializeField]
AudioSource _audioSourceForInactive = null;
private AudioSource _audioSourceForInactive = null;
[SerializeField]
AudioClip _soundForInactive = null;
private AudioClip _soundForInactive = null;

[SerializeField]
ParticleSystem _particleForInactive = null;
private ParticleSystem _particleForInactive = null;
[SerializeField]
int _emitForInactive = 0;
private int _emitForInactive = 0;

void OnEnable()
private void OnEnable()
{
if (_audioSourceForActive)
{
Expand All @@ -62,7 +62,7 @@ void OnEnable()
}
}

void OnDisable()
private void OnDisable()
{
if (_audioSourceForInactive)
{
Expand Down
Loading

0 comments on commit 968abc7

Please sign in to comment.