Code improvement
This commit is contained in:
parent
219f2f987c
commit
59f4add2ac
@ -1082,7 +1082,7 @@ namespace Passer {
|
||||
using (new EditorGUILayout.HorizontalScope()) {
|
||||
EditorGUILayout.LabelField("Tracker", GUILayout.Width(120));
|
||||
if (TrackerComponentShowButton())
|
||||
tracker.CheckTracker(humanoid);
|
||||
tracker.GetTrackerComponent();
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -16,7 +16,7 @@ namespace Passer.Humanoid {
|
||||
|
||||
public SensorComponent sensorComponent;
|
||||
/// <summary>
|
||||
/// Returns sensorComponent and creates a new sensorComponent if it does not exist
|
||||
/// Returns sensorComponent and creates a new SensorComponent if it does not exist
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public abstract SensorComponent GetSensorComponent();
|
||||
|
@ -8,7 +8,7 @@ namespace Passer.Humanoid {
|
||||
/// <summary>
|
||||
/// A %Humanoid tracker
|
||||
/// </summary>
|
||||
public class HumanoidTracker : Tracker {
|
||||
public abstract class HumanoidTracker : Tracker {
|
||||
/// <summary>
|
||||
/// The humanoid for this tracker
|
||||
/// </summary>
|
||||
|
@ -7,7 +7,7 @@ namespace Passer {
|
||||
/// <summary>
|
||||
/// A tracker
|
||||
/// </summary>
|
||||
public class Tracker {
|
||||
public abstract class Tracker {
|
||||
/// <summary>
|
||||
/// The tracking status
|
||||
/// </summary>
|
||||
@ -36,6 +36,11 @@ namespace Passer {
|
||||
/// The tracking device
|
||||
/// </summary>
|
||||
public TrackerComponent trackerComponent;
|
||||
/// <summary>
|
||||
/// Returns trackerComponent and creates a new TrackerComponent if it does not exist
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public abstract TrackerComponent GetTrackerComponent();
|
||||
|
||||
#region SubTrackers
|
||||
|
||||
|
@ -129,6 +129,11 @@ namespace Passer.Humanoid {
|
||||
|
||||
#region Manage
|
||||
|
||||
public override TrackerComponent GetTrackerComponent() {
|
||||
CheckTracker(humanoid, UnityXR.Get);
|
||||
return trackerComponent;
|
||||
}
|
||||
|
||||
public override void CheckTracker(HumanoidControl humanoid) {
|
||||
CheckTracker(humanoid, UnityXR.Get);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user