Added VEL Voice and sample
parent
4896d802ac
commit
3778b0368c
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4a3b9ce0fbdeaeb49ba34712af854547
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,33 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: de5f7b300b62ded41914af19c9bf6386
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
isExplicitlyReferenced: 0
|
||||||
|
validateReferences: 1
|
||||||
|
platformData:
|
||||||
|
- first:
|
||||||
|
Any:
|
||||||
|
second:
|
||||||
|
enabled: 1
|
||||||
|
settings: {}
|
||||||
|
- first:
|
||||||
|
Editor: Editor
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
DefaultValueInitialized: true
|
||||||
|
- first:
|
||||||
|
Windows Store Apps: WindowsStoreApps
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,262 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using System.IO;
|
||||||
|
using Concentus.Structs;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace VelNet
|
||||||
|
{
|
||||||
|
public class VelVoice : MonoBehaviour
|
||||||
|
{
|
||||||
|
public class FixedArray
|
||||||
|
{
|
||||||
|
|
||||||
|
public byte[] array;
|
||||||
|
public int count;
|
||||||
|
|
||||||
|
public FixedArray(int max)
|
||||||
|
{
|
||||||
|
array = new byte[max];
|
||||||
|
count = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
OpusEncoder opusEncoder;
|
||||||
|
OpusDecoder opusDecoder;
|
||||||
|
//StreamWriter sw;
|
||||||
|
AudioClip clip;
|
||||||
|
float[] tempData;
|
||||||
|
float[] encoderBuffer;
|
||||||
|
List<float[]> frameBuffer;
|
||||||
|
|
||||||
|
List<FixedArray> sendQueue = new List<FixedArray>();
|
||||||
|
List<float[]> encoderArrayPool = new List<float[]>();
|
||||||
|
List<FixedArray> decoderArrayPool = new List<FixedArray>();
|
||||||
|
int lastUsedEncoderPool = 0;
|
||||||
|
int lastUsedDecoderPool = 0;
|
||||||
|
int encoderBufferIndex = 0;
|
||||||
|
int size = 0;
|
||||||
|
int lastPosition = 0;
|
||||||
|
string device = "";
|
||||||
|
int encoder_frame_size = 640;
|
||||||
|
double micSampleTime;
|
||||||
|
int opusFreq = 16000;
|
||||||
|
double encodeTime = 1 / (double)16000;//16000.0;
|
||||||
|
double lastMicSample; //holds the last mic sample, in case we need to interpolate it
|
||||||
|
double sampleTimer = 0; //increments with every mic sample, but when over the encodeTime, causes a sample and subtracts that encode time
|
||||||
|
EventWaitHandle waiter;
|
||||||
|
float silenceThreshold = .02f; //average volume of packet
|
||||||
|
int numSilent = 0; //number of silent packets detected
|
||||||
|
int minSilencePacketsToStop = 5;
|
||||||
|
double averageVolume = 0;
|
||||||
|
Thread t;
|
||||||
|
public Action<FixedArray> encodedFrameAvailable = delegate { };
|
||||||
|
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
opusEncoder = new OpusEncoder(opusFreq, 1, Concentus.Enums.OpusApplication.OPUS_APPLICATION_VOIP);
|
||||||
|
opusDecoder = new OpusDecoder(opusFreq, 1);
|
||||||
|
encoderBuffer = new float[opusFreq];
|
||||||
|
frameBuffer = new List<float[]>();
|
||||||
|
//string path = Application.persistentDataPath + "/" + "mic.csv"; //this was for writing mic samples
|
||||||
|
//sw = new StreamWriter(path, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for (int i = 0; i < 100; i++) //pre allocate a bunch of arrays for microphone frames (probably will only need 1 or 2)
|
||||||
|
{
|
||||||
|
encoderArrayPool.Add(new float[encoder_frame_size]);
|
||||||
|
decoderArrayPool.Add(new FixedArray(encoder_frame_size));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
t = new Thread(encodeThread);
|
||||||
|
waiter = new EventWaitHandle(true, EventResetMode.AutoReset);
|
||||||
|
t.Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void startMicrophone(string mic)
|
||||||
|
{
|
||||||
|
Debug.Log(mic);
|
||||||
|
device = mic;
|
||||||
|
int minFreq, maxFreq;
|
||||||
|
Microphone.GetDeviceCaps(device, out minFreq, out maxFreq);
|
||||||
|
Debug.Log("Freq: " + minFreq + ":" + maxFreq);
|
||||||
|
clip = Microphone.Start(device, true, 10, 48000);
|
||||||
|
micSampleTime = 1.0 / clip.frequency;
|
||||||
|
|
||||||
|
Debug.Log("Frequency:" + clip.frequency);
|
||||||
|
tempData = new float[clip.samples * clip.channels];
|
||||||
|
Debug.Log("channels: " + clip.channels);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnApplicationQuit()
|
||||||
|
{
|
||||||
|
t.Abort();
|
||||||
|
|
||||||
|
//sw.Flush();
|
||||||
|
//sw.Close();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
float[] getNextEncoderPool()
|
||||||
|
{
|
||||||
|
lastUsedEncoderPool = (lastUsedEncoderPool + 1) % encoderArrayPool.Count;
|
||||||
|
return encoderArrayPool[lastUsedEncoderPool];
|
||||||
|
}
|
||||||
|
|
||||||
|
FixedArray getNextDecoderPool()
|
||||||
|
{
|
||||||
|
lastUsedDecoderPool = (lastUsedDecoderPool + 1) % decoderArrayPool.Count;
|
||||||
|
|
||||||
|
FixedArray toReturn = decoderArrayPool[lastUsedDecoderPool];
|
||||||
|
toReturn.count = 0;
|
||||||
|
return toReturn;
|
||||||
|
}
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
if (clip != null)
|
||||||
|
{
|
||||||
|
int micPosition = Microphone.GetPosition(device);
|
||||||
|
if (micPosition == lastPosition)
|
||||||
|
{
|
||||||
|
return; //sometimes the microphone will not advance
|
||||||
|
}
|
||||||
|
int numSamples = 0;
|
||||||
|
float[] temp;
|
||||||
|
if (micPosition > lastPosition)
|
||||||
|
{
|
||||||
|
numSamples = micPosition - lastPosition;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//whatever was left
|
||||||
|
numSamples = (tempData.Length - lastPosition) + micPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//Debug.Log(micPosition);
|
||||||
|
temp = new float[numSamples]; //this has to be dynamically allocated because of the way clip.GetData works (annoying...maybe use native mic)
|
||||||
|
clip.GetData(temp, lastPosition);
|
||||||
|
lastPosition = micPosition;
|
||||||
|
|
||||||
|
|
||||||
|
//this code does 2 things. 1) it samples the microphone data to be exactly what the encoder wants, 2) it forms encoder packets
|
||||||
|
for (int i = 0; i < temp.Length; i++) //iterate through temp, which contans that mic samples at 44.1khz
|
||||||
|
{
|
||||||
|
sampleTimer += micSampleTime;
|
||||||
|
if (sampleTimer > encodeTime)
|
||||||
|
{
|
||||||
|
|
||||||
|
//take a sample between the last sample and the current sample
|
||||||
|
|
||||||
|
double diff = sampleTimer - encodeTime; //this represents how far past this sample actually is
|
||||||
|
double t = diff / micSampleTime; //this should be between 0 and 1
|
||||||
|
double v = lastMicSample * (1 - t) + temp[i] * t;
|
||||||
|
sampleTimer -= encodeTime;
|
||||||
|
|
||||||
|
encoderBuffer[encoderBufferIndex++] = (float)v;
|
||||||
|
averageVolume += v > 0 ? v : -v;
|
||||||
|
if (encoderBufferIndex > encoder_frame_size) //this is when a new packet gets created
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
averageVolume = averageVolume / encoder_frame_size;
|
||||||
|
|
||||||
|
if (averageVolume < silenceThreshold)
|
||||||
|
{
|
||||||
|
numSilent++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
numSilent = 0;
|
||||||
|
}
|
||||||
|
averageVolume = 0;
|
||||||
|
|
||||||
|
if (numSilent < minSilencePacketsToStop)
|
||||||
|
{
|
||||||
|
|
||||||
|
float[] frame = getNextEncoderPool(); //these are predefined sizes, so we don't have to allocate a new array
|
||||||
|
//lock the frame buffer
|
||||||
|
|
||||||
|
System.Array.Copy(encoderBuffer, frame, encoder_frame_size); //nice and fast
|
||||||
|
|
||||||
|
|
||||||
|
lock (frameBuffer)
|
||||||
|
{
|
||||||
|
|
||||||
|
frameBuffer.Add(frame);
|
||||||
|
waiter.Set(); //signal the encode frame
|
||||||
|
}
|
||||||
|
}
|
||||||
|
encoderBufferIndex = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
lastMicSample = temp[i]; //remember the last sample, just in case this is the first one next time
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
lock (sendQueue)
|
||||||
|
{
|
||||||
|
foreach (FixedArray f in sendQueue)
|
||||||
|
{
|
||||||
|
encodedFrameAvailable(f);
|
||||||
|
|
||||||
|
}
|
||||||
|
sendQueue.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public float[] decodeOpusData(byte[] data, int count)
|
||||||
|
{
|
||||||
|
float[] t = getNextEncoderPool();
|
||||||
|
opusDecoder.Decode(data, 0, count, t, 0, encoder_frame_size);
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
||||||
|
void encodeThread()
|
||||||
|
{
|
||||||
|
|
||||||
|
while (waiter.WaitOne(Timeout.Infinite)) //better to wait on signal
|
||||||
|
{
|
||||||
|
|
||||||
|
List<float[]> toEncode = new List<float[]>();
|
||||||
|
|
||||||
|
|
||||||
|
lock (frameBuffer)
|
||||||
|
{
|
||||||
|
foreach (float[] frame in frameBuffer)
|
||||||
|
{
|
||||||
|
toEncode.Add(frame);
|
||||||
|
}
|
||||||
|
frameBuffer.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (float[] frame in toEncode)
|
||||||
|
{
|
||||||
|
FixedArray a = getNextDecoderPool();
|
||||||
|
int out_data_size = opusEncoder.Encode(frame, 0, encoder_frame_size, a.array, 0, a.array.Length);
|
||||||
|
a.count = out_data_size;
|
||||||
|
//add frame to the send buffer
|
||||||
|
lock (sendQueue)
|
||||||
|
{
|
||||||
|
sendQueue.Add(a);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 798d4aea9be4cfc4297706b051a11b0e
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,107 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using UnityEngine;
|
||||||
|
namespace VelNet
|
||||||
|
{
|
||||||
|
public class VelVoicePlayer : NetworkComponent
|
||||||
|
{
|
||||||
|
|
||||||
|
public VelVoice voiceSystem; //must be set for the player only
|
||||||
|
public AudioSource source; //must be set for the clone only
|
||||||
|
AudioClip myClip;
|
||||||
|
int bufferedAmount = 0;
|
||||||
|
int playedAmount = 0;
|
||||||
|
int lastTime = 0;
|
||||||
|
float[] empty = new float[1000]; //a buffer of 0s to force silence, because playing doesn't stop on demand
|
||||||
|
float delayStartTime;
|
||||||
|
public override void ReceiveBytes(byte[] message)
|
||||||
|
{
|
||||||
|
float[] temp = voiceSystem.decodeOpusData(message, message.Length);
|
||||||
|
myClip.SetData(temp, bufferedAmount % source.clip.samples);
|
||||||
|
bufferedAmount += temp.Length;
|
||||||
|
myClip.SetData(empty, bufferedAmount % source.clip.samples); //buffer some empty data because otherwise you'll hear sound (but it'll be overwritten by the next sample)
|
||||||
|
|
||||||
|
if (!source.isPlaying)
|
||||||
|
{
|
||||||
|
delayStartTime = Time.time; //I've received a packet but I haven't played it
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
voiceSystem = GameObject.FindObjectOfType<VelVoice>();
|
||||||
|
if (voiceSystem == null)
|
||||||
|
{
|
||||||
|
Debug.LogError("No microphone found. Make sure you have one in the scene.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (networkObject.IsMine)
|
||||||
|
{
|
||||||
|
voiceSystem.encodedFrameAvailable += (frame) =>
|
||||||
|
{
|
||||||
|
//float[] temp = new float[frame.count];
|
||||||
|
//System.Array.Copy(frame.array, temp, frame.count);
|
||||||
|
MemoryStream mem = new MemoryStream();
|
||||||
|
BinaryWriter writer = new BinaryWriter(mem);
|
||||||
|
writer.Write(frame.array, 0, frame.count);
|
||||||
|
this.SendBytes(mem.ToArray(), false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
myClip = AudioClip.Create(this.name, 16000 * 7, 1, 16000, false);
|
||||||
|
source.clip = myClip;
|
||||||
|
source.loop = true;
|
||||||
|
source.Pause();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
if (bufferedAmount > playedAmount && !source.isPlaying)
|
||||||
|
{
|
||||||
|
if ((bufferedAmount - playedAmount > 1000) || (Time.time - delayStartTime) > .1f) //this seems to make the quality better
|
||||||
|
{
|
||||||
|
source.Play();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (playedAmount >= bufferedAmount)
|
||||||
|
{
|
||||||
|
playedAmount = bufferedAmount;
|
||||||
|
source.Pause();
|
||||||
|
source.timeSamples = bufferedAmount % source.clip.samples;
|
||||||
|
}
|
||||||
|
//Debug.Log(playedAmount);
|
||||||
|
if (source.timeSamples >= lastTime)
|
||||||
|
{
|
||||||
|
playedAmount += (source.timeSamples - lastTime);
|
||||||
|
}
|
||||||
|
else //repeated
|
||||||
|
{
|
||||||
|
|
||||||
|
int total = source.clip.samples - lastTime + source.timeSamples;
|
||||||
|
playedAmount += total;
|
||||||
|
}
|
||||||
|
lastTime = source.timeSamples;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a5aa9e635c1bd5c41b0847806a597f45
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: dc0ae145afb98164493d097e29dfb3bd
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: TransparentMat
|
||||||
|
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_ShaderKeywords: _ALPHAPREMULTIPLY_ON _GLOSSYREFLECTIONS_OFF _SPECULARHIGHLIGHTS_OFF
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: 3000
|
||||||
|
stringTagMap:
|
||||||
|
RenderType: Transparent
|
||||||
|
disabledShaderPasses: []
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailAlbedoMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailMask:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailNormalMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _EmissionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MetallicGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OcclusionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Floats:
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 10
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0.5
|
||||||
|
- _GlossyReflections: 0
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 3
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 0
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _UVSec: 0
|
||||||
|
- _ZWrite: 0
|
||||||
|
m_Colors:
|
||||||
|
- _Color: {r: 1, g: 1, b: 1, a: 0.03137255}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6fad1ca32acea73489c2c4b898cdb9d4
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 18b28d1150d229647ae76efe2bea95f8
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,429 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &2802320351940726854
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 6602982999811082154}
|
||||||
|
- component: {fileID: 6433756913090684124}
|
||||||
|
- component: {fileID: 6919422133110223353}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Range
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &6602982999811082154
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2802320351940726854}
|
||||||
|
m_LocalRotation: {x: -0.70710635, y: -0, z: -0, w: 0.7071073}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 8, y: 0.1, z: 8}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 3076416102083120807}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
|
||||||
|
--- !u!33 &6433756913090684124
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2802320351940726854}
|
||||||
|
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &6919422133110223353
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2802320351940726854}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 6fad1ca32acea73489c2c4b898cdb9d4, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!1 &6139051692386484099
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 3076416102083120807}
|
||||||
|
- component: {fileID: 8527011532923434593}
|
||||||
|
- component: {fileID: 6854617867369839}
|
||||||
|
- component: {fileID: 5845716565458182149}
|
||||||
|
- component: {fileID: 9102273340480352682}
|
||||||
|
- component: {fileID: -4404668399269848200}
|
||||||
|
- component: {fileID: 7564913803199044469}
|
||||||
|
- component: {fileID: 4663964746634023742}
|
||||||
|
- component: {fileID: 7756407589087806652}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: PlayerPrefab
|
||||||
|
m_TagString: TestSphere
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &3076416102083120807
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6139051692386484099}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 6602982999811082154}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &8527011532923434593
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6139051692386484099}
|
||||||
|
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &6854617867369839
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6139051692386484099}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!65 &5845716565458182149
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6139051692386484099}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Size: {x: 1, y: 1, z: 1}
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &9102273340480352682
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6139051692386484099}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5515094c5c544b6b8ed7fd51a86548d4, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
ownershipLocked: 1
|
||||||
|
networkId:
|
||||||
|
sceneNetworkId: 0
|
||||||
|
prefabName:
|
||||||
|
isSceneObject: 0
|
||||||
|
syncedComponents:
|
||||||
|
- {fileID: -4404668399269848200}
|
||||||
|
- {fileID: 7564913803199044469}
|
||||||
|
- {fileID: 4663964746634023742}
|
||||||
|
--- !u!114 &-4404668399269848200
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6139051692386484099}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 89e3af759df774692a566a166b4bf69b, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
networkObject: {fileID: 9102273340480352682}
|
||||||
|
serializationRateHz: 30
|
||||||
|
hybridOnChangeCompression: 1
|
||||||
|
color: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
--- !u!114 &7564913803199044469
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6139051692386484099}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 3f1f9b0bbd93a484a987c51f1107ebe5, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
networkObject: {fileID: 9102273340480352682}
|
||||||
|
serializationRateHz: 60
|
||||||
|
hybridOnChangeCompression: 1
|
||||||
|
position: 1
|
||||||
|
rotation: 1
|
||||||
|
scale: 0
|
||||||
|
useLocalTransform: 0
|
||||||
|
teleportDistance: 0
|
||||||
|
teleportAngle: 0
|
||||||
|
--- !u!114 &4663964746634023742
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6139051692386484099}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: a5aa9e635c1bd5c41b0847806a597f45, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
networkObject: {fileID: 9102273340480352682}
|
||||||
|
voiceSystem: {fileID: 0}
|
||||||
|
source: {fileID: 7756407589087806652}
|
||||||
|
--- !u!82 &7756407589087806652
|
||||||
|
AudioSource:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6139051692386484099}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 4
|
||||||
|
OutputAudioMixerGroup: {fileID: 0}
|
||||||
|
m_audioClip: {fileID: 0}
|
||||||
|
m_PlayOnAwake: 1
|
||||||
|
m_Volume: 1
|
||||||
|
m_Pitch: 1
|
||||||
|
Loop: 0
|
||||||
|
Mute: 0
|
||||||
|
Spatialize: 0
|
||||||
|
SpatializePostEffects: 0
|
||||||
|
Priority: 128
|
||||||
|
DopplerLevel: 1
|
||||||
|
MinDistance: 1
|
||||||
|
MaxDistance: 500
|
||||||
|
Pan2D: 0
|
||||||
|
rolloffMode: 0
|
||||||
|
BypassEffects: 0
|
||||||
|
BypassListenerEffects: 0
|
||||||
|
BypassReverbZones: 0
|
||||||
|
rolloffCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0.002
|
||||||
|
value: 1
|
||||||
|
inSlope: -500.20065
|
||||||
|
outSlope: -500.20065
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0
|
||||||
|
outWeight: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0.004
|
||||||
|
value: 0.5
|
||||||
|
inSlope: -125.05016
|
||||||
|
outSlope: -125.05016
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0
|
||||||
|
outWeight: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0.008
|
||||||
|
value: 0.25
|
||||||
|
inSlope: -31.26254
|
||||||
|
outSlope: -31.26254
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0
|
||||||
|
outWeight: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0.016
|
||||||
|
value: 0.125
|
||||||
|
inSlope: -7.815635
|
||||||
|
outSlope: -7.815635
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0
|
||||||
|
outWeight: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0.032
|
||||||
|
value: 0.0625
|
||||||
|
inSlope: -1.9539088
|
||||||
|
outSlope: -1.9539088
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0
|
||||||
|
outWeight: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0.064
|
||||||
|
value: 0.02798462
|
||||||
|
inSlope: -0.2878108
|
||||||
|
outSlope: -0.2878108
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 1
|
||||||
|
outWeight: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0.128
|
||||||
|
value: 0.015625
|
||||||
|
inSlope: -0.1221193
|
||||||
|
outSlope: -0.1221193
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0
|
||||||
|
outWeight: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0.256
|
||||||
|
value: 0.0078125
|
||||||
|
inSlope: -0.030529825
|
||||||
|
outSlope: -0.030529825
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0
|
||||||
|
outWeight: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0.512
|
||||||
|
value: 0.00390625
|
||||||
|
inSlope: -0.0076324563
|
||||||
|
outSlope: -0.0076324563
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0
|
||||||
|
outWeight: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 1
|
||||||
|
value: 0.002
|
||||||
|
inSlope: -0.002000801
|
||||||
|
outSlope: -0.002000801
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0
|
||||||
|
outWeight: 0
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
panLevelCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 1
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
spreadCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
reverbZoneMixCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 1
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d4158ab9c4a204cdbba28d3273fc1fb3
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,167 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &6003361529827848619
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 7099230484513283147}
|
||||||
|
- component: {fileID: 8811139817265458480}
|
||||||
|
- component: {fileID: 3776025769317911085}
|
||||||
|
- component: {fileID: 1426238303320144522}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Cube
|
||||||
|
m_TagString: TestSphere
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &7099230484513283147
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6003361529827848619}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 8565720275311462455}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &8811139817265458480
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6003361529827848619}
|
||||||
|
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &3776025769317911085
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6003361529827848619}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!65 &1426238303320144522
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6003361529827848619}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Size: {x: 1, y: 1, z: 1}
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &8565720275311462453
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 8565720275311462455}
|
||||||
|
- component: {fileID: 3951900052977689805}
|
||||||
|
- component: {fileID: 8565720275311462452}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: TestNetworkedGameObject
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &8565720275311462455
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8565720275311462453}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 7099230484513283147}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &3951900052977689805
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8565720275311462453}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5515094c5c544b6b8ed7fd51a86548d4, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
ownershipLocked: 0
|
||||||
|
networkId:
|
||||||
|
sceneNetworkId: 0
|
||||||
|
prefabName:
|
||||||
|
isSceneObject: 0
|
||||||
|
syncedComponents:
|
||||||
|
- {fileID: 8565720275311462452}
|
||||||
|
--- !u!114 &8565720275311462452
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8565720275311462453}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 3f1f9b0bbd93a484a987c51f1107ebe5, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
networkObject: {fileID: 3951900052977689805}
|
||||||
|
serializationRateHz: 60
|
||||||
|
hybridOnChangeCompression: 1
|
||||||
|
useLocalTransform: 0
|
||||||
|
teleportDistance: 0
|
||||||
|
teleportAngle: 0
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6e4a023f70e01405e8b249a4488fe319
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f8bb9027566930042942da486c1e29e0
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 640dff55801b890489258dcd776d4562
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: cd6dd1d4e81bce64faaf29eedf9d2a63
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
using UnityEngine;
|
||||||
|
using VelNet;
|
||||||
|
|
||||||
|
public class CustomMessageTest : MonoBehaviour
|
||||||
|
{
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
VelNetManager.OnJoinedRoom += _ =>
|
||||||
|
{
|
||||||
|
byte[] testPacket = { 244 };
|
||||||
|
VelNetManager.SendCustomMessage(testPacket, true, true, false);
|
||||||
|
};
|
||||||
|
|
||||||
|
VelNetManager.CustomMessageReceived += (senderId, dataWithCategory) =>
|
||||||
|
{
|
||||||
|
if (dataWithCategory[0] == 244)
|
||||||
|
{
|
||||||
|
Debug.Log($"Received test packet from {senderId}");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5ea1fe0eb58e4184bbb2edcc99c51119
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
using UnityEngine;
|
||||||
|
using VelNet;
|
||||||
|
|
||||||
|
public class MouseDragger : MonoBehaviour
|
||||||
|
{
|
||||||
|
private Camera cam;
|
||||||
|
public string[] draggableTags = { "draggable" };
|
||||||
|
private NetworkObject draggingObject;
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
cam = Camera.main;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
if (Input.GetMouseButtonDown(0))
|
||||||
|
{
|
||||||
|
if (Physics.Raycast(cam.ScreenPointToRay(Input.mousePosition), out RaycastHit hit))
|
||||||
|
{
|
||||||
|
foreach (string draggableTag in draggableTags)
|
||||||
|
{
|
||||||
|
if (hit.transform.CompareTag(draggableTag) || (hit.transform.parent != null && hit.transform.parent.CompareTag(draggableTag)))
|
||||||
|
{
|
||||||
|
NetworkObject netObj = hit.transform.GetComponent<NetworkObject>();
|
||||||
|
netObj ??= hit.transform.GetComponentInParent<NetworkObject>();
|
||||||
|
if (netObj == null) break;
|
||||||
|
netObj.TakeOwnership();
|
||||||
|
draggingObject = netObj;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (Input.GetMouseButtonUp(0))
|
||||||
|
{
|
||||||
|
draggingObject = null;
|
||||||
|
}
|
||||||
|
else if (Input.GetMouseButton(0) && draggingObject != null)
|
||||||
|
{
|
||||||
|
draggingObject.transform.position = cam.ScreenPointToRay(Input.mousePosition).direction * Vector3.Distance(draggingObject.transform.position, cam.transform.position) + cam.transform.position;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c9d312e1088769143a72b0c13d5aee32
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
namespace VelNet
|
||||||
|
{
|
||||||
|
public class NetworkGUI : MonoBehaviour
|
||||||
|
{
|
||||||
|
public InputField userInput;
|
||||||
|
public InputField sendInput;
|
||||||
|
public InputField roomInput;
|
||||||
|
public Text messages;
|
||||||
|
public List<string> messageBuffer;
|
||||||
|
public Dropdown microphones;
|
||||||
|
public VelVoice velVoice;
|
||||||
|
public void HandleLogin()
|
||||||
|
{
|
||||||
|
if (userInput.text != "")
|
||||||
|
{
|
||||||
|
VelNetManager.Login(userInput.text, SystemInfo.deviceUniqueIdentifier);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void HandleGetRooms()
|
||||||
|
{
|
||||||
|
if (VelNetManager.instance.connected)
|
||||||
|
{
|
||||||
|
VelNetManager.GetRooms();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void GetRoomData()
|
||||||
|
{
|
||||||
|
if (VelNetManager.IsConnected)
|
||||||
|
{
|
||||||
|
VelNetManager.GetRoomData(VelNetManager.Room);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void HandleJoin()
|
||||||
|
{
|
||||||
|
if (roomInput.text != "")
|
||||||
|
{
|
||||||
|
VelNetManager.Join(roomInput.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void HandleLeave()
|
||||||
|
{
|
||||||
|
VelNetManager.Leave();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start is called before the first frame update
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
microphones.AddOptions(new List<string>(Microphone.devices));
|
||||||
|
handleMicrophoneSelection();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void handleMicrophoneSelection()
|
||||||
|
{
|
||||||
|
velVoice.startMicrophone(microphones.options[microphones.value].text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7a7db5bc792cd471dbd8039664359eee
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using UnityEngine;
|
||||||
|
using Random = UnityEngine.Random;
|
||||||
|
|
||||||
|
namespace VelNet
|
||||||
|
{
|
||||||
|
public class PlayerController : NetworkSerializedObjectStream
|
||||||
|
{
|
||||||
|
private Renderer rend;
|
||||||
|
public Color color;
|
||||||
|
|
||||||
|
protected override void Awake()
|
||||||
|
{
|
||||||
|
base.Awake();
|
||||||
|
|
||||||
|
rend = GetComponent<MeshRenderer>();
|
||||||
|
if (IsMine)
|
||||||
|
{
|
||||||
|
color = new Color(Random.Range(0, 1f), Random.Range(0, 1f), Random.Range(0, 1f));
|
||||||
|
rend.material.color = color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
if (IsMine)
|
||||||
|
{
|
||||||
|
Vector3 movement = new Vector3();
|
||||||
|
movement.x += Input.GetAxis("Horizontal");
|
||||||
|
movement.y += Input.GetAxis("Vertical");
|
||||||
|
movement.z = 0;
|
||||||
|
transform.Translate(movement * Time.deltaTime);
|
||||||
|
|
||||||
|
if (Input.GetKeyDown(KeyCode.Space))
|
||||||
|
{
|
||||||
|
VelNetManager.NetworkInstantiate("TestNetworkedGameObject");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Input.GetKeyDown(KeyCode.BackQuote))
|
||||||
|
{
|
||||||
|
foreach (KeyValuePair<string, NetworkObject> kvp in VelNetManager.instance.objects)
|
||||||
|
{
|
||||||
|
kvp.Value.TakeOwnership();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Input.GetKeyDown(KeyCode.Backspace))
|
||||||
|
{
|
||||||
|
foreach (string key in VelNetManager.instance.objects
|
||||||
|
.Where(kvp => !kvp.Value.ownershipLocked)
|
||||||
|
.Select(kvp => kvp.Key).ToArray())
|
||||||
|
{
|
||||||
|
VelNetManager.NetworkDestroy(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void SendState(BinaryWriter binaryWriter)
|
||||||
|
{
|
||||||
|
binaryWriter.Write(color);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void ReceiveState(BinaryReader binaryReader)
|
||||||
|
{
|
||||||
|
// Color newColor = binaryReader.ReadColor();
|
||||||
|
Color newColor;
|
||||||
|
newColor.r = binaryReader.ReadSingle();
|
||||||
|
newColor.g = binaryReader.ReadSingle();
|
||||||
|
newColor.b = binaryReader.ReadSingle();
|
||||||
|
newColor.a = binaryReader.ReadSingle();
|
||||||
|
if (newColor != color)
|
||||||
|
{
|
||||||
|
rend.material.color = newColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
color = newColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 89e3af759df774692a566a166b4bf69b
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using UnityEngine;
|
||||||
|
using VelNet;
|
||||||
|
|
||||||
|
public class RPCTest : NetworkComponent
|
||||||
|
{
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
if (Input.GetKeyDown(KeyCode.R))
|
||||||
|
{
|
||||||
|
SendRPC(nameof(TestRPC), true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TestRPC()
|
||||||
|
{
|
||||||
|
Debug.Log("RPC RECEIVED!");
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ReceiveBytes(byte[] message)
|
||||||
|
{
|
||||||
|
Debug.Log("WOW. BYTES");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2bcc94802a5742d4299e48c898e52dfa
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
using System.IO;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
using VelNet;
|
||||||
|
|
||||||
|
public class SyncedTextbox : NetworkSerializedObjectStream
|
||||||
|
{
|
||||||
|
public InputField text;
|
||||||
|
|
||||||
|
|
||||||
|
protected override void SendState(BinaryWriter binaryWriter)
|
||||||
|
{
|
||||||
|
binaryWriter.Write(text.text);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void ReceiveState(BinaryReader binaryReader)
|
||||||
|
{
|
||||||
|
text.text = binaryReader.ReadString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void TakeOwnership()
|
||||||
|
{
|
||||||
|
networkObject.TakeOwnership();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0a7b2180d3fffdc459417bfc24b179b8
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
using UnityEngine;
|
||||||
|
using VelNet;
|
||||||
|
|
||||||
|
public class VelNetMan : MonoBehaviour
|
||||||
|
{
|
||||||
|
public GameObject playerPrefab;
|
||||||
|
|
||||||
|
// Start is called before the first frame update
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
VelNetManager.OnJoinedRoom += player =>
|
||||||
|
{
|
||||||
|
VelNetManager.NetworkInstantiate(playerPrefab.name);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2fcf036844b060b47b23ad9a1e49eec2
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "edu.uga.engr.vel.velnet",
|
"name": "edu.uga.engr.vel.velnet",
|
||||||
"displayName": "VelNet",
|
"displayName": "VelNet",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"unity": "2019.1",
|
"unity": "2019.1",
|
||||||
"description": "A custom networking library for Unity.",
|
"description": "A custom networking library for Unity.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|
@ -15,9 +15,14 @@
|
||||||
},
|
},
|
||||||
"samples": [
|
"samples": [
|
||||||
{
|
{
|
||||||
"displayName": "Example",
|
"displayName": "Example Dissonance",
|
||||||
"description": "Example Scene",
|
"description": "Example Scene with Dissonance Integration Required",
|
||||||
"path": "Samples~/Example"
|
"path": "Samples~/ExampleDissonance"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"displayName": "Example VEL Voice",
|
||||||
|
"description": "Example Scene using Built-in VEL Voice",
|
||||||
|
"path": "Samples~/ExampleVelVoice"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue