squash commits
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
#if UNITY_2017_1_OR_NEWER
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Playables;
|
||||
using UMA.CharacterSystem;
|
||||
|
||||
namespace UMA.Timeline
|
||||
{
|
||||
[Serializable]
|
||||
public class UmaRaceBehaviour : PlayableBehaviour
|
||||
{
|
||||
public string raceToChangeTo = "";
|
||||
|
||||
[HideInInspector]
|
||||
public bool isAdded = false;
|
||||
|
||||
public override void ProcessFrame(Playable playable, FrameData info, object playerData)
|
||||
{
|
||||
DynamicCharacterAvatar avatar = playerData as DynamicCharacterAvatar;
|
||||
|
||||
if (avatar == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(raceToChangeTo))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (avatar.activeRace.name != raceToChangeTo)
|
||||
{
|
||||
avatar.ChangeRace(raceToChangeTo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5134909ca53e5884daf6cd5e507b4aad
|
||||
timeCreated: 1537147204
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 35611
|
||||
packageName: UMA 2
|
||||
packageVersion: 2.13
|
||||
assetPath: Assets/UMA/Core/Extensions/Timeline/UmaRace/UmaRaceBehaviour.cs
|
||||
uploadId: 679826
|
||||
@@ -0,0 +1,28 @@
|
||||
#if UNITY_2017_1_OR_NEWER
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Playables;
|
||||
using UnityEngine.Timeline;
|
||||
|
||||
namespace UMA.Timeline
|
||||
{
|
||||
[Serializable]
|
||||
public class UmaRaceClip : PlayableAsset, ITimelineClipAsset
|
||||
{
|
||||
public string raceToChangeTo = "";
|
||||
|
||||
public ClipCaps clipCaps
|
||||
{
|
||||
get { return ClipCaps.None; }
|
||||
}
|
||||
|
||||
public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
|
||||
{
|
||||
var playable = ScriptPlayable<UmaRaceBehaviour>.Create(graph);
|
||||
playable.GetBehaviour().raceToChangeTo = raceToChangeTo;
|
||||
return playable;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b32596058d6d8774d9d9f7c5de45b102
|
||||
timeCreated: 1537147204
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 35611
|
||||
packageName: UMA 2
|
||||
packageVersion: 2.13
|
||||
assetPath: Assets/UMA/Core/Extensions/Timeline/UmaRace/UmaRaceClip.cs
|
||||
uploadId: 679826
|
||||
@@ -0,0 +1,14 @@
|
||||
#if UNITY_2017_1_OR_NEWER
|
||||
using UnityEngine.Timeline;
|
||||
using UMA.CharacterSystem;
|
||||
|
||||
namespace UMA.Timeline
|
||||
{
|
||||
[TrackColor(0.2f, 0.2f, 0.2f)]
|
||||
[TrackClipType(typeof(UmaRaceClip))]
|
||||
[TrackBindingType(typeof(DynamicCharacterAvatar))]
|
||||
public class UmaRaceTrack : TrackAsset
|
||||
{
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 09bdfe9c923e2974a83910a6111cb633
|
||||
timeCreated: 1537147204
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 35611
|
||||
packageName: UMA 2
|
||||
packageVersion: 2.13
|
||||
assetPath: Assets/UMA/Core/Extensions/Timeline/UmaRace/UmaRaceTrack.cs
|
||||
uploadId: 679826
|
||||
Reference in New Issue
Block a user