Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
VAUnity
Commits
f2eb1803
Commit
f2eb1803
authored
Oct 18, 2019
by
Dipl.-Ing. Jonas Stienen
Browse files
Adding simpler way to add search paths by a dedicated class
parent
019e15e7
Changes
3
Hide whitespace changes
Inline
Side-by-side
VAUAdapter.cs
View file @
f2eb1803
...
...
@@ -7,14 +7,13 @@ using VA;
// Adapter to VA (singleton)
/**
* Drop this file onto any GameObject. Add a VAUConfig script to the same object
for special settings. Add VAUControl to control the running core
.
* Drop this file onto any GameObject. Add a VAUConfig script to the same object
to control parameters
.
* */
public
class
VAUAdapter
:
MonoBehaviour
{
public
static
string
Server
=
"localhost"
;
public
static
int
Port
=
12340
;
public
static
string
AdditionalSearchPath
=
""
;
// Provide further paths where VA should look for audio files, directivities and HRIRs.
public
static
bool
ResetOnStart
=
true
;
public
static
bool
ResetOnStop
=
true
;
public
static
bool
DeactivateUnitySoundOnAwake
=
true
;
...
...
@@ -51,12 +50,6 @@ public class VAUAdapter : MonoBehaviour
// Add Asset folder as search path for VA (only works if VA is running on same host PC)
if
(!
VA
.
AddSearchPath
(
Application
.
dataPath
))
Debug
.
LogError
(
"Could not add application assets folder to VA search path, VA server running on remote host?"
);
if
(
AdditionalSearchPath
.
Length
>
0
)
{
VA
.
AddSearchPath
(
AdditionalSearchPath
);
// ... append more if required.
}
}
// Use this for initialization
...
...
VAUAdditionalSearchPath.cs
0 → 100644
View file @
f2eb1803
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
VAUAdditionalSearchPath
:
MonoBehaviour
{
public
string
Path
=
""
;
void
Start
()
{
VAUAdapter
.
VA
.
AddSearchPath
(
Path
);
}
}
VAUConfig.cs
View file @
f2eb1803
...
...
@@ -10,9 +10,6 @@ public class VAUConfig : MonoBehaviour {
[
Tooltip
(
"TCP/IP port where the VA server is communicating."
)]
public
int
Port
=
VAUAdapter
.
Port
;
[
Tooltip
(
"Add an additional path where to find files"
)]
public
string
AdditionalSearchPath
=
""
;
[
Tooltip
(
"Resets server on startup"
)]
public
bool
ResetOnStart
=
true
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment