1 Commits

Author SHA1 Message Date
Timur Nizamov
5a13928a59 FMOD instance errors fix 2026-01-30 21:01:11 +02:00
67 changed files with 116 additions and 2614 deletions

View File

@@ -81,7 +81,6 @@ public class NetworkMenuUI : MonoBehaviour
} }
private void OnStartPlaying() private void OnStartPlaying()
{ {
Debug.Log("START PRESSED");
statusText.text = "Starting host..."; statusText.text = "Starting host...";
StartCoroutine(HostAndSearchRoutine()); StartCoroutine(HostAndSearchRoutine());
} }

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ConfigurationData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Loaded>true</Loaded>
<PrefabGenerator>
<Enabled>true</Enabled>
<LogToConsole>true</LogToConsole>
<FullRebuild>false</FullRebuild>
<SaveChanges>true</SaveChanges>
<DefaultPrefabObjectsPath>Assets\DefaultPrefabObjects.asset</DefaultPrefabObjectsPath>
<SearchScope>1</SearchScope>
<ExcludedFolders />
<IncludedFolders>
<string>Assets\_PROJECT</string>
</IncludedFolders>
</PrefabGenerator>
<CodeStripping>
<IsBuilding>false</IsBuilding>
<IsDevelopment>false</IsDevelopment>
<IsHeadless>false</IsHeadless>
<StripReleaseBuilds>false</StripReleaseBuilds>
<StrippingType>0</StrippingType>
</CodeStripping>
</ConfigurationData>

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: fdec8b985bdf2364cac858b4136da794
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -319,12 +319,9 @@ namespace FishNet.Editing.PrefabCollectionGenerator
{ {
foreach (string path in GetPrefabFiles("Assets", excludedPaths, true)) foreach (string path in GetPrefabFiles("Assets", excludedPaths, true))
{ {
NetworkObject nob = AssetDatabase.LoadAssetAtPath<NetworkObject>(path); NetworkObject nob = AssetDatabase.LoadAssetAtPath<NetworkObject>(path);
if (nob != null) if (nob != null)
foundNobs.Add(nob); foundNobs.Add(nob);
else
UnityEngine.Debug.LogWarning("Last loading error with: " + path);
} }
} }
//Specific folders. //Specific folders.

View File

@@ -7,7 +7,7 @@ TextureImporter:
mipmaps: mipmaps:
mipMapMode: 0 mipMapMode: 0
enableMipMap: 1 enableMipMap: 1
sRGBTexture: 0 sRGBTexture: 1
linearTexture: 0 linearTexture: 0
fadeOut: 0 fadeOut: 0
borderMipMap: 0 borderMipMap: 0
@@ -54,7 +54,7 @@ TextureImporter:
alphaUsage: 1 alphaUsage: 1
alphaIsTransparency: 0 alphaIsTransparency: 0
spriteTessellationDetail: -1 spriteTessellationDetail: -1
textureType: 1 textureType: 0
textureShape: 1 textureShape: 1
singleChannelComponent: 0 singleChannelComponent: 0
flipbookRows: 1 flipbookRows: 1

View File

@@ -1,5 +1,4 @@
using System; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.InputSystem; using UnityEngine.InputSystem;
@@ -45,26 +44,6 @@ namespace _PROJECT.NewHandPresence
private GameObject _billboard; private GameObject _billboard;
public enum TutorialInfoKey
{
Initialized,
LeftHintController,
RightHintController,
LeftSmartHandPresence,
RightSmartHandPresence
}
protected Dictionary<TutorialInfoKey, bool> initializationInfoStatus = new Dictionary<TutorialInfoKey, bool>();
protected Coroutine initializationInfoCoroutine;
private void Awake()
{
initializationInfoStatus.Add(TutorialInfoKey.Initialized, false);
initializationInfoStatus.Add(TutorialInfoKey.LeftHintController, false);
initializationInfoStatus.Add(TutorialInfoKey.RightHintController, false);
initializationInfoStatus.Add(TutorialInfoKey.LeftSmartHandPresence, false);
initializationInfoStatus.Add(TutorialInfoKey.RightSmartHandPresence, false);
}
private void Update() private void Update()
{ {
if (_state == TutorialState.Initializing) if (_state == TutorialState.Initializing)
@@ -198,33 +177,29 @@ namespace _PROJECT.NewHandPresence
private void TryInitialize() private void TryInitialize()
{ {
if (!CanInitialize()) return; if (!CanInitialize()) return;
if (null == initializationInfoCoroutine)
{
initializationInfoCoroutine = StartCoroutine(InitializationInfoCoroutine());
}
_camera = Camera.main; _camera = Camera.main;
//Debug.Log("Initializing tutorial"); Debug.Log("Initializing tutorial");
_leftHintController = leftHand.GetComponentInChildren<XRControllerHintController>(); _leftHintController = leftHand.GetComponentInChildren<XRControllerHintController>();
_rightHintController = rightHand.GetComponentInChildren<XRControllerHintController>(); _rightHintController = rightHand.GetComponentInChildren<XRControllerHintController>();
initializationInfoStatus[TutorialInfoKey.LeftHintController] = null != _leftHintController; Debug.Log($"Left hint controller: {_leftHintController}");
initializationInfoStatus[TutorialInfoKey.RightHintController] = null != _rightHintController; Debug.Log($"Right hint controller: {_rightHintController}");
_leftSmartHandPresence = leftHand.GetComponentInChildren<SmartHandPresence>(); _leftSmartHandPresence = leftHand.GetComponentInChildren<SmartHandPresence>();
_rightSmartHandPresence = rightHand.GetComponentInChildren<SmartHandPresence>(); _rightSmartHandPresence = rightHand.GetComponentInChildren<SmartHandPresence>();
initializationInfoStatus[TutorialInfoKey.LeftSmartHandPresence] = null != _leftSmartHandPresence; Debug.Log($"Left smart hand presence: {_leftSmartHandPresence}");
initializationInfoStatus[TutorialInfoKey.RightSmartHandPresence] = null != _rightSmartHandPresence; Debug.Log($"Right smart hand presence: {_rightSmartHandPresence}");
if (_leftHintController == null || if (_leftHintController == null ||
_rightHintController == null || _rightHintController == null ||
_leftSmartHandPresence == null || _leftSmartHandPresence == null ||
_rightSmartHandPresence == null) _rightSmartHandPresence == null)
{ {
//Debug.Log("Hint controller or smart hand presence is null"); Debug.Log("Hint controller or smart hand presence is null");
return; return;
} }
@@ -241,7 +216,6 @@ namespace _PROJECT.NewHandPresence
UpdateState(_state.Next()); UpdateState(_state.Next());
Debug.Log("Tutorial initialized"); Debug.Log("Tutorial initialized");
StopCoroutine(initializationInfoCoroutine);
} }
private void OnGripPerformed(SelectEnterEventArgs arg0) private void OnGripPerformed(SelectEnterEventArgs arg0)
@@ -333,35 +307,5 @@ namespace _PROJECT.NewHandPresence
} }
} }
IEnumerator InitializationInfoCoroutine()
{
string CombineMessage(TutorialInfoKey key, object value, string prefix)
{
bool isAvailable = initializationInfoStatus.GetValueOrDefault(key);
return prefix + ": " + (isAvailable ? value.ToString() : "NULL") + "\r\n";
}
bool isInitialized = initializationInfoStatus.GetValueOrDefault(TutorialInfoKey.Initialized);
while (!isInitialized)
{
isInitialized = initializationInfoStatus.GetValueOrDefault(TutorialInfoKey.Initialized);
string infoMessage = "Tutorial not yet initialized!" + "\r\n";
infoMessage += "(click me for more info)" + "\r\n";
infoMessage += "Hint controllers" + "\r\n";
infoMessage += CombineMessage(TutorialInfoKey.LeftHintController, _leftHintController, "Left");
infoMessage += CombineMessage(TutorialInfoKey.RightHintController, _rightHintController, "Right");
infoMessage += "Smart hand presence" + "\r\n";
infoMessage += CombineMessage(TutorialInfoKey.LeftSmartHandPresence, _leftSmartHandPresence, "Left");
infoMessage += CombineMessage(TutorialInfoKey.RightSmartHandPresence, _rightSmartHandPresence, "Right");
Debug.Log(infoMessage);
yield return new WaitForSeconds(7);
}
}
} }
} }

View File

@@ -1,22 +1,10 @@
using System.Collections.Generic;
using UnityEngine; using UnityEngine;
public class PlayAnimationOnTrigger : MonoBehaviour public class PlayAnimationOnTrigger : MonoBehaviour
{ {
public enum KnownAnimations
{
UFOFlight1
}
protected Dictionary<KnownAnimations, string> animationNames = new Dictionary<KnownAnimations, string>();
[SerializeField] public Animator animator; // Reference to the Animator component [SerializeField] public Animator animator; // Reference to the Animator component
[SerializeField] public KnownAnimations animationName = KnownAnimations.UFOFlight1; // Name of the animation to play [SerializeField] public string animationName = "YourAnimation"; // Name of the animation to play
protected void Awake()
{
animationNames[KnownAnimations.UFOFlight1] = "UFO group flight 1";
}
private void OnTriggerEnter(Collider other) private void OnTriggerEnter(Collider other)
{ {
@@ -27,16 +15,15 @@ public class PlayAnimationOnTrigger : MonoBehaviour
return; return;
} }
string animationNameString = animationNames[animationName];
// Check if the animation is already playing // Check if the animation is already playing
if (animator.GetCurrentAnimatorStateInfo(0).IsName(animationNameString) && animator.GetCurrentAnimatorStateInfo(0).normalizedTime < 1) if (animator.GetCurrentAnimatorStateInfo(0).IsName(animationName) && animator.GetCurrentAnimatorStateInfo(0).normalizedTime < 1)
{ {
Debug.Log("Animation is already playing.");
return; return;
} }
// Play the animation // Play the animation
animator.Play(animationNameString, 0, 0f); animator.Play(animationName, 0, 0f);
Debug.Log("Playing animation: " + animationNameString); Debug.Log("Playing animation: " + animationName);
} }
} }

View File

@@ -29,15 +29,7 @@ namespace _PROJECT.Multiplayer.NewBow
if (_notch == null) if (_notch == null)
Debug.LogError("Notch not found"); Debug.LogError("Notch not found");
//CreateArrowServer(); CreateArrowServer();
}
public override void OnOwnershipServer(NetworkConnection prevOwner)
{
base.OnOwnershipServer(prevOwner);
if (Owner.IsValid)
CreateArrowServer();
} }
public override void OnStartClient() public override void OnStartClient()

View File

@@ -1,40 +0,0 @@
using FishNet.Component.Spawning;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Valve.Newtonsoft.Json.Converters;
using static UnityEditor.ShaderGraph.Internal.KeywordDependentCollection;
public class CustomNetworkManager : MonoBehaviour
{
public static CustomNetworkManager instance = null;
public PlayerSpawner playerSpawner;
void Awake()
{
if (!instance) { instance = this; }
else if (instance != this) { Destroy(gameObject); }
DontDestroyOnLoad(gameObject);
}
private void Start()
{
if (playerSpawner.Spawns.Length == 0) {
Debug.LogWarning("Player spawns undefined. Assign a player spawn to PlayerSpawner!");
} else {
bool hasSpawn = false;
foreach (Transform spawn in playerSpawner.Spawns)
{
hasSpawn |= spawn != null;
}
if (!hasSpawn)
{
Debug.LogWarning("Player spawns undefined. Assign a player spawn to PlayerSpawner!");
}
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 067fc70e6bd1a024ba644f52017165fd
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 67f163b4eb8c8df43b48aab810b8a0a8
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -291,6 +291,11 @@ public class AudioManager : MonoBehaviour
} }
public static void Pause()
{
musicEventInstance.setPaused(true);
}
//=====// //=====//
//=====// //=====//
@@ -323,6 +328,8 @@ public class AudioManager : MonoBehaviour
// Set the callback for programmer sounds // Set the callback for programmer sounds
instance.setCallback(dialogueCallback); instance.setCallback(dialogueCallback);
bool managedByOcclusion = false;
// Add occlusion if available on the emitter // Add occlusion if available on the emitter
if (emitter != null) if (emitter != null)
{ {
@@ -330,11 +337,16 @@ public class AudioManager : MonoBehaviour
if (occlusion != null) if (occlusion != null)
{ {
occlusion.InitialiseWithInstance(instance); occlusion.InitialiseWithInstance(instance);
managedByOcclusion = true;
} }
} }
instance.start(); instance.start();
instance.release();
if (!managedByOcclusion)
{
instance.release();
}
} }
@@ -414,11 +426,6 @@ public class AudioManager : MonoBehaviour
instance.setPaused(false); instance.setPaused(false);
} }
public static void Pause()
{
musicEventInstance.setPaused(true);
}
public static void Pause(EventInstance instance) public static void Pause(EventInstance instance)
{ {
instance.setPaused(true); instance.setPaused(true);
@@ -430,8 +437,10 @@ public class AudioManager : MonoBehaviour
{ {
foreach (EventInstance eventInstance in eventInstances) foreach (EventInstance eventInstance in eventInstances)
{ {
eventInstance.stop(FMOD.Studio.STOP_MODE.IMMEDIATE); if (eventInstance.isValid()) {
eventInstance.release(); eventInstance.stop(FMOD.Studio.STOP_MODE.IMMEDIATE);
eventInstance.release();
}
} }
} }

View File

@@ -75,7 +75,7 @@ public class FirstPersonOcclusion : MonoBehaviour
AudioOccluded.start(); AudioOccluded.start();
// 4. Releasing Instance (This allows the event to self-manage its lifetime, which is fine) // 4. Releasing Instance (This allows the event to self-manage its lifetime, which is fine)
AudioOccluded.release(); //AudioOccluded.release();
managedInstances.Add(AudioOccluded); // ADDED managedInstances.Add(AudioOccluded); // ADDED
@@ -205,4 +205,17 @@ public class FirstPersonOcclusion : MonoBehaviour
} }
} }
} }
private void OnDestroy()
{
// Stop & release all instances when this object is destroyed
foreach (var inst in managedInstances)
{
if (inst.isValid())
{
inst.stop(FMOD.Studio.STOP_MODE.IMMEDIATE);
inst.release();
}
}
managedInstances.Clear();
}
} }

BIN
Build.zip LFS

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,86 +1,29 @@
![DeltaVR](https://cgvrgit.ulno.net/cgvr/DeltaVR/media/branch/master/Doc/Readme-Header.png) # DeltaVR
DeltaVR is a virtual reality experience set in the [Delta Centre](https://delta.ut.ee/) of the [University of Tartu](https://ut.ee/). The virtual Delta Building includes several interactive scenes that demonstrate the teaching and research actively done in the Delta Centre. DeltaVR is a virtual reality experience set in the Delta Centre of the University of Tartu. It was designed and implemented in a over three theses. The proiect used the Delta Building Visualization project as a basis for the building and built upon it, adding missing
details and improving the performance. DeltaVR has multiplayer support, which allows players to explore the building together in PCVR, Quest 2 and non-VR versions.
The application works on PCVR, Meta Quest 2 and 3, HTC Vive, and regular Windows PC platforms. There is cross-platform multiplayer functionality that enables several users to be in the same virtual environment from both VR and PC platforms. ## Gameplay Sample Footage (DeltaVR 2021)
https://youtu.be/AoRN4eluiWY
## Features ## History
### Exploration 2023 version:
DeltaVR features the first two floors of the Delta Educational Building for **exploration and discovery**. There are many diegetic elements representing the studies and research conducted at the Delta Building, such as robotics, the high-performance computing server room, video game development, and student life. https://comserv.cs.ut.ee/ati_thesis/datasheet.php?id=77065&language=en
![DeltaVR Exploration](https://cgvrgit.ulno.net/cgvr/DeltaVR/media/branch/master/Doc/clips/Explore-Clip.gif) (See Extras for build)
### UFO Bow Game 2022 version:
At the terrace on the second floor, Delta explorers can defend the building from UFO-s using a bow and **achieve high scores**. https://comserv.cs.ut.ee/ati_thesis/datasheet.php?id=74390
![DeltaVR UFO Bow Game](https://cgvrgit.ulno.net/cgvr/DeltaVR/media/branch/master/Doc/clips/UFO-Bow-Game-Clip.gif) https://gitlab.com/Joonasp1/deltavr-multiplayer-builds
### Bolt Self-Driving Car 2021 version:
The courtyard between the Educational and Entrepreneurial buildings of the Delta Centre, the explorers can see the Bolt Self-Driving Car. This car is developed by the [[http://adl.cs.ut.ee/|Autonomous Driving Lab]] of the [[https://cs.ut.ee|Institute of Computer Science]]. If one is brave enough, they can stop the car and catch a ride, simulating both the **feeling of being in a self-driving vehicle** as well as VR motion sickness. https://comserv.cs.ut.ee/ati_thesis/datasheet.php?id=71682
![DeltaVR Bolt Self-Driving Car](https://cgvrgit.ulno.net/cgvr/DeltaVR/media/branch/master/Doc/clips/Bolt-Self-Driving-Car-Clip.gif) https://drive.google.com/file/d/1n19_Wa69vCX6s6zKYoSYKirpHcfJHqaM/view?usp=sharing
### Space Walk
Where the actual Delta building has a set of skywalks connecting it with the entrepreneurship building, DeltaVR has a set of portals leading to the Space walk experience. In it, one can move in the **vastness of space** and experience **changes in gravity**. A fleet of UFO ships react to one's presence and come to investigate the arrival.
![DeltaVR Spacewalk](https://cgvrgit.ulno.net/cgvr/DeltaVR/media/branch/master/Doc/clips/Skywalk-Clip.gif)
### Server Room
On the second floor, one can hear the humming of the servers. Should they investigate, they will find a room of server racks and a large red button. Should they push the button, they will trigger the **fire alarm** and have the server room fill with harmful invisible gas. This propms the player to escape the room. This largerly **auditory experience** is noted to be engaging and immersive. It represents the work of UT HPC in maintaining the servers of the University of Tartu.
![DeltaVR Server Room](https://cgvrgit.ulno.net/cgvr/DeltaVR/media/branch/master/Doc/clips/Server-Room-Clip.gif)
### Interactive Map
To navigate the two floors of the large Delta Educational Building, explorers have an interactive map. This provides a clear overview of where they currently are and what other interactions are located across the building. Explorers can teleport to a **select interactive experiences**, while others are left for them to discover based on the hints on the map.
![DeltaVR Interactive Map](https://cgvrgit.ulno.net/cgvr/DeltaVR/media/branch/master/Doc/clips/Interactive-Map-Clip.gif)
### Whiteboard
In the virtual Computer Graphics and Virtual Reality Study Lab, explorers can use spray paint cans to draw on a whiteboard. Surprisingly, this is one of the **more popular interactive experiences** of DeltaVR.
![DeltaVR Whiteboard](https://cgvrgit.ulno.net/cgvr/DeltaVR/media/branch/master/Doc/clips/Whiteboard-Clip.gif)
## Credits
**Ranno Samuel Adson**<br/>
User experience design. Additional interactions. Interaction improvements.
**Toomas Tamm**<br/>
Project architecture, model optimization, lighting. [Bachelor's Thesis](https://comserv.cs.ut.ee/ati_thesis/datasheet.php?id=71682) ([poster](https://courses.cs.ut.ee/student_projects/download/478.pdf)), [Master's Thesis](https://comserv.cs.ut.ee/ati_thesis/datasheet.php?id=77065&language=en).
**Joonas Püks**<br/>
Multiplayer and cross-play functionality. [Bachelor's Thesis](https://comserv.cs.ut.ee/ati_thesis/datasheet.php?id=74390) ([poster](https://courses.cs.ut.ee/student_projects/download/534.pdf)).
**Timur Nizamov**<br/>
Technical sound design.
**Raimond Tunnel**<br/>
Project management, visual design.
Developed in the [Computer Graphcis and Virtual Reality Study Lab](https://cgvr.cs.ut.ee/) of the [Institute of Computer Science, University of Tartu](https://cs.ut.ee).
### Used Attributions
| Description | License | Source | Author |
|-----------------------------------------------------|----------------------------------------------|---------------------------------------------------------------------------------------------|------------------|
| Server rack model | Royalty Free, No AI License | [Link](https://www.cgtrader.com/free-3d-models/electronics/computer/simple-server-model) | anymelok |
| Robot movement sound | Creative Commons 0 | [Link](https://freesound.org/people/Brazilio123/sounds/661435/) | Brazilio123 |
| Spacewalk UFO sound | Attribution NonCommercial 4.0 | [Link](https://freesound.org/people/Speedenza/sounds/209366/) | Speedenza |
| Keyboard icons | Creative Commons Attribution-NoDerivs 3.0 | [Link](https://icons8.com/) | icons8 |
-----
DeltaVR was moved to this repository in 2025. The previous repository is available here: [[https://gitlab.com/UT-CGVR/deltavr]]
-----
![DeltaVR](https://cgvrgit.ulno.net/cgvr/DeltaVR/media/branch/master/Doc/Readme-Footer.png)

View File

@@ -8,6 +8,10 @@
"name": "timur", "name": "timur",
"score": 486.0 "score": 486.0
}, },
{
"name": "taavi",
"score": 480.0
},
{ {
"name": "ppppVBBPPP", "name": "ppppVBBPPP",
"score": 478.0 "score": 478.0
@@ -55,10 +59,6 @@
{ {
"name": "yty", "name": "yty",
"score": 446.0 "score": 446.0
},
{
"name": "lp",
"score": 444.0
} }
] ]
} }