Cailean Finn
1 year ago
17 changed files with 13156 additions and 7195 deletions
File diff suppressed because it is too large
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 9b11eb86e59329e4bbdcc21d97aad4f7 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
Binary file not shown.
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: ad6e27f938fd93949bc5539b807393eb |
|||
ScriptedImporter: |
|||
internalIDToNameTable: [] |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
script: {fileID: 11500000, guid: 183c1cb276390b14e883dae29f585dfa, type: 3} |
|||
_containerType: 2 |
Binary file not shown.
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 07e0d43bfcf8aa942bd82e459375dff4 |
|||
ScriptedImporter: |
|||
internalIDToNameTable: [] |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
script: {fileID: 11500000, guid: 183c1cb276390b14e883dae29f585dfa, type: 3} |
|||
_containerType: 2 |
Binary file not shown.
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 54023e4226011bf44b81da7a22834607 |
|||
ScriptedImporter: |
|||
internalIDToNameTable: [] |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
script: {fileID: 11500000, guid: 183c1cb276390b14e883dae29f585dfa, type: 3} |
|||
_containerType: 2 |
Binary file not shown.
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: d0583f90df282294d84b59b3cab1826c |
|||
ScriptedImporter: |
|||
internalIDToNameTable: [] |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
script: {fileID: 11500000, guid: 183c1cb276390b14e883dae29f585dfa, type: 3} |
|||
_containerType: 0 |
@ -0,0 +1,111 @@ |
|||
using Minis; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using UnityEngine.InputSystem; |
|||
using UnityEngine.VFX; |
|||
|
|||
[ExecuteInEditMode] |
|||
[System.Serializable] |
|||
public class CamerSwap : MonoBehaviour |
|||
{ |
|||
|
|||
public List<Camera> cameras; |
|||
private float count; |
|||
private bool b_R = false; |
|||
private bool b_L = false; |
|||
|
|||
void Start() |
|||
{ |
|||
count = 0f; |
|||
|
|||
InputSystem.onDeviceChange += (device, change) => |
|||
{ |
|||
|
|||
var num_of_cameras = cameras.Count; |
|||
|
|||
|
|||
if (change != InputDeviceChange.Added) |
|||
{ |
|||
|
|||
return; |
|||
} |
|||
|
|||
var midiDevice = device as Minis.MidiDevice; |
|||
|
|||
if (midiDevice == null) |
|||
{ |
|||
|
|||
return; |
|||
} |
|||
|
|||
midiDevice.onWillControlChange += (device, change) => |
|||
{ |
|||
// print(device.controlNumber);
|
|||
|
|||
if(device.controlNumber == 43) |
|||
{ |
|||
|
|||
if(b_L) |
|||
{ |
|||
b_L = false; |
|||
return; |
|||
} |
|||
|
|||
count++; |
|||
if(count >= num_of_cameras) |
|||
{ |
|||
count = 0; |
|||
Debug.Log(count); |
|||
} |
|||
|
|||
b_L = true; |
|||
|
|||
|
|||
} |
|||
if (device.controlNumber == 44) |
|||
{ |
|||
|
|||
if (b_R) |
|||
{ |
|||
b_R = false; |
|||
return; |
|||
} |
|||
|
|||
count--; |
|||
if (count < 0) |
|||
{ |
|||
count = num_of_cameras - 1; |
|||
Debug.Log(count); |
|||
} |
|||
|
|||
b_R = true; |
|||
|
|||
|
|||
} |
|||
}; |
|||
|
|||
// Debug.Log(count);
|
|||
}; |
|||
|
|||
} |
|||
|
|||
void Update() |
|||
{ |
|||
// Debug.Log(m_Slider);
|
|||
var tc = 0; |
|||
foreach (var item in cameras) |
|||
{ |
|||
|
|||
if (tc == count) |
|||
{ |
|||
item.enabled = true; |
|||
} |
|||
else |
|||
{ |
|||
item.enabled = false; |
|||
} |
|||
tc++; |
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: f4e2933df7a862a4ab9e6f22ac3f710f |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
File diff suppressed because it is too large
Loading…
Reference in new issue