Interhaptics SDK for Unity
1.6
Loading...
Searching...
No Matches
Interhaptics
sdk_unity
Interhaptics
Runtime
Platforms
Mobile
Dependencies
UnityCoreHaptics
Utility.cs
Go to the documentation of this file.
1
using
System.IO;
2
using
UnityEngine;
3
using
UnityEngine.Assertions;
4
5
namespace
UnityCoreHaptics
{
6
public
static
class
Utility
7
{
13
public
static
bool
FileExists(
string
relativePath) {
14
var fullPath = Path.Combine(UnityEngine.Application.streamingAssetsPath, relativePath);
15
return
File.Exists(fullPath);
16
}
17
23
public
static
void
AssertFileExists(
string
relativePath) {
24
#if UNITY_EDITOR
25
try
{
26
Assert.IsTrue(FileExists(relativePath));
27
}
28
catch
{
29
throw
new
System.Exception(
30
"The relative path to file "
+ relativePath +
" does."
31
+
" Please check that this path is valid relative to Assets/StreamingAssets."
32
+
" If this is your first time using this asset, please upload an AHAP file"
33
+
" inside Assets/StreamingAssets/path/to/myfile.ahap and set AhapRelativePath to"
34
+
" path/to/myfile.ahap"
35
);
36
}
37
#endif
38
}
39
}
40
}
UnityCoreHaptics
Definition
UnityCoreHapticsProxy.cs:7
Generated by
1.11.0