updated with enemy

This commit is contained in:
2023-04-10 23:58:47 -04:00
parent deda6a7810
commit 2815cfe844
419 changed files with 33788 additions and 854 deletions

View File

@ -0,0 +1,14 @@
{
"name": "Adobe.Substance",
"rootNamespace": "Adobe.Substance",
"references": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": true,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 0322a29457affe94ab4ade0a1555000f
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2692d856fc1b2d847a396ac35f24b247
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 46e431de90cc3ad41ae5c68d3c4327f2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,80 @@
fileFormatVersion: 2
guid: f292327062a6810428e455b714f2f512
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 0
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 1
- first:
Android: Android
second:
enabled: 1
settings:
CPU: ARM64
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
iPhone: iOS
second:
enabled: 0
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5f63445da63b1674bb9c9be3e308044c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,73 @@
fileFormatVersion: 2
guid: e0a6e848109591341ba75dea6bf29f90
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 0
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,73 @@
fileFormatVersion: 2
guid: a37bf4502d5eba940a4b499e4d910313
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 0
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,73 @@
fileFormatVersion: 2
guid: 2ed861b8ad9cf134d9346119598a0077
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 0
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,73 @@
fileFormatVersion: 2
guid: 3b4f4fd55d63b504d90f82cfd68f7560
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 0
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,73 @@
fileFormatVersion: 2
guid: 9385a5707a08acd4188a9d0e7d19208d
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 0
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,73 @@
fileFormatVersion: 2
guid: 74ea479585b771c48a04186006069101
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 0
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,73 @@
fileFormatVersion: 2
guid: d905326978f74624f994ee7bb628ce0d
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 0
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,73 @@
fileFormatVersion: 2
guid: e08a9991e3778e64c9323d393fbd26d9
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 0
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,73 @@
fileFormatVersion: 2
guid: ddcf6efef31d2044290c96caeadd7572
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 0
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,73 @@
fileFormatVersion: 2
guid: 29d7bb04e5a0eb74cb9fbd606b5b6d68
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 0
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,73 @@
fileFormatVersion: 2
guid: b7d6442d267fd094ebd9e94276c83b69
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 0
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,73 @@
fileFormatVersion: 2
guid: 10342a6a05fbf4a4a8a1914e7b3dc984
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 0
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,63 @@
fileFormatVersion: 2
guid: e913fe577a00848c58367b3e775b8a2c
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: x86_64
DefaultValueInitialized: true
OS: OSX
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,80 @@
fileFormatVersion: 2
guid: 9b40b6fe75dcdffaf9b0b0db569525bd
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 1
- first:
Android: Android
second:
enabled: 0
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: x86_64
DefaultValueInitialized: true
OS: Linux
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
iPhone: iOS
second:
enabled: 0
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,63 @@
fileFormatVersion: 2
guid: 83c4ed4f0caed42c79425b0cb8b00d09
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,63 @@
fileFormatVersion: 2
guid: 3325deba0a25449c5bd2426efc23e7ed
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@ -0,0 +1,80 @@
fileFormatVersion: 2
guid: b9441c23298894c028d4e1f5263e719e
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 1
- first:
Android: Android
second:
enabled: 0
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: x86_64
DefaultValueInitialized: true
OS: Linux
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
iPhone: iOS
second:
enabled: 0
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,63 @@
fileFormatVersion: 2
guid: 576b1a9b12cf24674bcf8e9a334f688c
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,80 @@
fileFormatVersion: 2
guid: 659d27409e79e7740ad0aebc20f2090f
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 1
- first:
Android: Android
second:
enabled: 0
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: x86_64
DefaultValueInitialized: true
OS: Linux
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
iPhone: iOS
second:
enabled: 0
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,63 @@
fileFormatVersion: 2
guid: 6e45d854f55a342e6b904a84e42d4e69
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: x86_64
DefaultValueInitialized: true
OS: Windows
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,63 @@
fileFormatVersion: 2
guid: 4d93358a4514fe54981d37196b1bb9c7
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: x86_64
DefaultValueInitialized: true
OS: Windows
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,63 @@
fileFormatVersion: 2
guid: 0634149143729f44a8289f223ec04b08
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: x86_64
DefaultValueInitialized: true
OS: Windows
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,63 @@
fileFormatVersion: 2
guid: 9a1f1618673081b4888cd4178c7ef44a
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5001d7f81c5fded4781b3133e0d6bb6c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,16 @@
{
"name": "Adobe.Substance.Runtime",
"rootNamespace": "Adobe.Substance.Runtime",
"references": [
"GUID:0322a29457affe94ab4ade0a1555000f"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

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

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c55ef6bd36342094da997a93adfbc20b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,75 @@
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using UnityEngine;
namespace Adobe.Substance.Runtime
{
/// <summary>
/// Singleton class that handles Substance engine initialization and it is used to get native handlers to substance instances.
/// </summary>
public class SubstanceRuntime : MonoBehaviour
{
/// <summary>
/// Singleton instance.
/// </summary>
/// <value>Global singleton instance.</value>
public static SubstanceRuntime Instance
{
get
{
if (_instance != null)
{
_instance.Initialize();
return _instance;
}
_instance = FindObjectOfType<SubstanceRuntime>();
if (_instance != null)
{
_instance.Initialize();
return _instance;
}
var go = new GameObject("SubstanceRuntime");
_instance = go.AddComponent<SubstanceRuntime>();
_instance.Initialize();
return _instance;
}
}
private static SubstanceRuntime _instance = null;
private static bool _isInitialized = false;
/// <summary>
/// Handles initialization of the substance engine.
/// </summary>
private void Initialize()
{
if (_isInitialized)
return;
var enginePath = PlatformUtils.GetEnginePath();
var pluginPath = PlatformUtils.GetPluginPath();
Engine.Initialize(pluginPath, enginePath);
_isInitialized = true;
}
/// <summary>
/// Creates a Substance SDK handle for a given SubstanceGraphSO.
/// </summary>
/// <param name="substanceInstance">Target SubstanceGraphSO</param>
/// <returns>Handle that comunicates with the Substance SDK.</returns>
public SubstanceNativeGraph InitializeInstance(SubstanceGraphSO substanceInstance)
{
if (substanceInstance == null)
return null;
return Engine.OpenFile(substanceInstance.RawData.FileContent, substanceInstance.GetNativeID());
}
}
}

View File

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

View File

@ -0,0 +1,688 @@
using Adobe.Substance.Input;
using Adobe.Substance.Input.Description;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using UnityEngine;
namespace Adobe.Substance.Runtime
{
/// <summary>
/// Class that provides runtime functionality to modify inputs at and render substance graphs, allowing SubstanceGraphSO to generate its assets at runtime.
/// </summary>
public class SubstanceRuntimeGraph : MonoBehaviour
{
/// <summary>
/// Target substance instance.
/// </summary>
[SerializeField]
public SubstanceGraphSO GraphSO;
/// <summary>
/// Native handler to the substance SDK object.
/// </summary>
private SubstanceNativeGraph _nativeGraph;
/// <summary>
/// Main material generated by the substance instance.
/// </summary>
public Material DefaulMaterial => GraphSO.OutputMaterial;
/// <summary>
/// Concurrent queue that handles results of substance render operations.
/// </summary>
/// <typeparam name="AsyncRenderResult"></typeparam>
private readonly ConcurrentQueue<AsyncRenderResult> _asyncRenderQueue = new ConcurrentQueue<AsyncRenderResult>();
/// <summary>
/// Dictionary to cache substance inputs by name.
/// </summary>
/// <returns></returns>
private readonly Dictionary<string, SubstanceInputBase> _inputsTable = new Dictionary<string, SubstanceInputBase>();
/// <summary>
/// Dictionary that caches substance outputs by name.
/// </summary>
/// <returns></returns>
private readonly Dictionary<string, SubstanceOutputTexture> _outputTable = new Dictionary<string, SubstanceOutputTexture>();
/// <summary>
/// Resoltion input.
/// </summary>
private SubstanceInputInt2 _resolutionInput;
/// <summary>
/// On awake SubstanceRuntime will be used to create a instance for the attached SubstanceGraphSO in the substance SDK.
/// </summary>
protected void Awake()
{
if (GraphSO == null)
return;
if (_nativeGraph != null)
return;
_nativeGraph = SubstanceRuntime.Instance.InitializeInstance(GraphSO);
InitializeGraph(GraphSO);
}
/// <summary>
/// Generate assets for the target graph and populates the inputs and outputs dictionaries.
/// </summary>
/// <param name="graph">Target graph.</param>
private void InitializeGraph(SubstanceGraphSO graph)
{
graph.RuntimeInitialize(_nativeGraph, true);
foreach (var input in graph.Input)
{
_inputsTable.Add(input.Description.Identifier, input as SubstanceInputBase);
if (input.ValueType == SubstanceValueType.Int2 && input.Description.Identifier == "$outputsize")
_resolutionInput = input as SubstanceInputInt2;
}
foreach (var output in graph.Output)
{
if (!_outputTable.ContainsKey(output.Description.Identifier))
{
_outputTable.Add(output.Description.Identifier, output);
}
}
}
/// <summary>
/// Check the render ConcurrentQueue for render results.
/// </summary>
protected void Update()
{
while (_asyncRenderQueue.TryDequeue(out AsyncRenderResult result))
{
if (result.Exception != null)
{
result.Tcs.SetException(result.Exception);
continue;
}
GraphSO.UpdateOutputTextures(result.RenderResult);
result.Tcs.SetResult(null);
}
}
/// <summary>
/// Attaches a new graph object to this runtime handler.
/// </summary>
/// <param name="graph">Target substance graph.</param>
public void AttachGraph(SubstanceGraphSO graph)
{
GraphSO = graph;
}
/// <summary>
/// Disposes the substance SDK handler.
/// </summary>
protected void OnDestroy()
{
if (_nativeGraph != null)
_nativeGraph.Dispose();
}
#region Input Handle
/// <summary>
/// Update Substance Float Input
/// </summary>
/// <param name="inputName">Name of the input in the SBSAR</param>
/// <param name="value">Value used to update parameter</param>
public void SetInputFloat(string inputName, float value)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
if (input.ValueType != SubstanceValueType.Float)
throw new ArgumentException($"Substance Input {inputName} is of type {input.ValueType} not {SubstanceValueType.Float}.");
_nativeGraph.SetInputFloat(input.Index, value);
}
/// <summary>
/// Get Substance Float Input
/// </summary>
/// <param name="inputName">Name of the input in the SBSAR</param>
/// <returns>Current input value.</returns>
public float GetInputFloat(string inputName)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
if (input.ValueType != SubstanceValueType.Float)
throw new ArgumentException($"Substance Input {inputName} is of type {input.ValueType} not {SubstanceValueType.Float}.");
return _nativeGraph.GetInputFloat(input.Index);
}
/// <summary>
/// Update Substance Vector2 Input
/// </summary>
/// <param name="inputName">Name of the input in the SBSAR</param>
/// <param name="value">Value used to update parameter</param>
public void SetInputVector2(string inputName, Vector2 value)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
if (input.ValueType != SubstanceValueType.Float2)
throw new ArgumentException($"Substance Input {inputName} is of type {input.ValueType} not {SubstanceValueType.Float2}.");
_nativeGraph.SetInputFloat2(input.Index, value);
}
/// <summary>
/// Get Substance Vector2 Input
/// </summary>
/// <param name="inputName">Name of the input in the SBSAR</param>
/// <returns>Current input value.</returns>
public Vector2 GetInputVector2(string inputName)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
if (input.ValueType != SubstanceValueType.Float2)
throw new ArgumentException($"Substance Input {inputName} is of type {input.ValueType} not {SubstanceValueType.Float2}.");
return _nativeGraph.GetInputFloat2(input.Index);
}
/// <summary>
/// Update Substance Vector3 Input
/// </summary>
/// <param name="inputName">Name of the input in the SBSAR</param>
/// <param name="value">Value used to update parameter</param>
public void SetInputVector3(string inputName, Vector3 value)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
if (input.ValueType != SubstanceValueType.Float3)
throw new ArgumentException($"Substance Input {inputName} is of type {input.ValueType} not {SubstanceValueType.Float3}.");
_nativeGraph.SetInputFloat3(input.Index, value);
}
/// <summary>
/// Get Substance Vector3 Input.
/// </summary>
/// <param name="inputName">Name of the input in the SBSAR</param>
/// <returns>Current input value.</returns>
public Vector3 GetInputVector3(string inputName)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
if (input.ValueType != SubstanceValueType.Float3)
throw new ArgumentException($"Substance Input {inputName} is of type {input.ValueType} not {SubstanceValueType.Float3}.");
return _nativeGraph.GetInputFloat3(input.Index);
}
/// <summary>
/// Update Substance Vector4 Input
/// </summary>
/// <param name="inputName">Name of the input in the SBSAR</param>
/// <param name="value">Value used to update parameter</param>
public void SetInputVector4(string inputName, Vector4 value)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
if (input.ValueType != SubstanceValueType.Float4)
throw new ArgumentException($"Substance Input {inputName} is of type {input.ValueType} not {SubstanceValueType.Float4}.");
_nativeGraph.SetInputFloat4(input.Index, value);
}
/// <summary>
/// Get Substance Vector4 Input
/// </summary>
/// <param name="inputName">Name of the input in the SBSAR</param>
/// <returns>Current input value.</returns>
public Vector4 GetInputVector4(string inputName)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
if (input.ValueType != SubstanceValueType.Float4)
throw new ArgumentException($"Substance Input {inputName} is of type {input.ValueType} not {SubstanceValueType.Float4}.");
return _nativeGraph.GetInputFloat4(input.Index);
}
/// <summary>
/// Update Substance Color Input
/// </summary>
/// <param name="inputName">Name of the input in the SBSAR</param>
/// <param name="value">Value used to update parameter</param>
public void SetInputColor(string inputName, Color value)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
if (input.ValueType != SubstanceValueType.Float3 && input.ValueType != SubstanceValueType.Float4)
throw new ArgumentException($"Substance Input {inputName} is of type {input.ValueType} not {SubstanceValueType.Float4} or {SubstanceValueType.Float3}.");
if (input.ValueType == SubstanceValueType.Float3)
{
var vector = new Vector3
{
x = value.r,
y = value.g,
z = value.b
};
_nativeGraph.SetInputFloat3(input.Index, vector);
}
else if (input.ValueType == SubstanceValueType.Float4)
{
_nativeGraph.SetInputFloat4(input.Index, value);
}
}
/// <summary>
/// Get Substance Color
/// </summary>
/// <param name="inputName">Name of the input in the SBSAR</param>
/// <returns>Current input value.</returns>
public Color GetInputColor(string inputName)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
if (input.ValueType != SubstanceValueType.Float3 && input.ValueType != SubstanceValueType.Float4)
throw new ArgumentException($"Substance Input {inputName} is of type {input.ValueType} not {SubstanceValueType.Float4} or {SubstanceValueType.Float3}.");
if (input.ValueType == SubstanceValueType.Float3)
{
Vector3 vector = _nativeGraph.GetInputFloat3(input.Index);
return new Color(vector.x, vector.y, vector.z);
}
else if (input.ValueType == SubstanceValueType.Float4)
{
Vector4 vector = _nativeGraph.GetInputFloat4(input.Index);
return new Color(vector.x, vector.y, vector.z, vector.w);
}
else
throw new ArgumentException();
}
/// <summary>
/// Update Substance Boolean Input
/// </summary>
/// <param name="inputName">Name of the input in the SBSAR</param>
/// <param name="value">Value used to update parameter</param>
public void SetInputBool(string inputName, bool value)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
if (input.ValueType != SubstanceValueType.Int)
throw new ArgumentException($"Substance Input {inputName} is of type {input.ValueType} not {SubstanceValueType.Int}.");
_nativeGraph.SetInputInt(input.Index, value ? 1 : 0);
}
/// <summary>
/// Get Substance Boolean Input.
/// </summary>
/// <param name="inputName">Name of the input in the SBSAR.</param>
/// <returns>Current input value.</returns>
public bool GetInputBool(string inputName)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
if (input.ValueType != SubstanceValueType.Int)
throw new ArgumentException($"Substance Input {inputName} is of type {input.ValueType} not {SubstanceValueType.Int}.");
return _nativeGraph.GetInputInt(input.Index) == 1;
}
/// <summary>
/// Update Substance Int Input
/// </summary>
/// <param name="inputName">Name of the input in the SBSAR</param>
/// <param name="value">Value used to update the parameter</param>
public void SetInputInt(string inputName, int value)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
if (input.ValueType != SubstanceValueType.Int)
throw new ArgumentException($"Substance Input {inputName} is of type {input.ValueType} not {SubstanceValueType.Int}.");
_nativeGraph.SetInputInt(input.Index, value);
}
/// <summary>
/// Get Substance Int Input
/// </summary>
/// <param name="inputName">Name of the input in the SBSAR</param>
/// <returns>Current input value.</returns>
public int GetInputInt(string inputName)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
if (input.ValueType != SubstanceValueType.Int)
throw new ArgumentException($"Substance Input {inputName} is of type {input.ValueType} not {SubstanceValueType.Int}.");
return _nativeGraph.GetInputInt(input.Index);
}
/// <summary>
/// Update Substance Vector2Int Input.
/// </summary>
/// <param name="inputName">Name of the input in the SBSAR</param>
/// <param name="value">Value used to update the parameter.</param>
public void SetInputVector2Int(string inputName, Vector2Int value)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
if (input.ValueType != SubstanceValueType.Int2)
throw new ArgumentException($"Substance Input {inputName} is of type {input.ValueType} not {SubstanceValueType.Int2}.");
_nativeGraph.SetInputInt2(input.Index, value);
}
/// <summary>
/// Get array of 2 int.
/// </summary>
/// <param name="inputName">Name of the input in the SBSAR</param>
/// <returns>Current input value.</returns>
public Vector2Int GetInputVector2Int(string inputName)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
if (input.ValueType != SubstanceValueType.Int2)
throw new ArgumentException($"Substance Input {inputName} is of type {input.ValueType} not {SubstanceValueType.Int2}.");
return _nativeGraph.GetInputInt2(input.Index);
}
/// <summary>
/// Update Substance Vector3Int Input.
/// </summary>
/// <param name="inputName">Name of the input in the SBSAR</param>
/// <param name="value">Value used to update the parameter.</param>
public void SetInputVector3Int(string inputName, Vector3Int value)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
if (input.ValueType != SubstanceValueType.Int3)
throw new ArgumentException($"Substance Input {inputName} is of type {input.ValueType} not {SubstanceValueType.Int3}.");
_nativeGraph.SetInputInt3(input.Index, value);
}
/// <summary>
/// Get array of 3 int (Vector3Ints x, y & z values)
/// </summary>
/// <param name="inputName">Name of the input in the SBSAR</param>
/// <returns>Current input value.</returns>
public Vector3Int GetInputVector3Int(string inputName)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
if (input.ValueType != SubstanceValueType.Int3)
throw new ArgumentException($"Substance Input {inputName} is of type {input.ValueType} not {SubstanceValueType.Int3}.");
return _nativeGraph.GetInputInt3(input.Index);
}
/// <summary>
/// Update Substance Vector4Int Input
/// </summary>
/// <param name="inputName">Name of the input in the SBSAR</param>
/// <param name="x">Value used to update the parameter</param>
/// <param name="y">Value used to update the parameter</param>
/// <param name="z">Value used to update the parameter</param>
/// <param name="w">Value used to update the parameter</param>
public void SetInputVector4Int(string inputName, int x, int y, int z, int w)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
if (input.ValueType != SubstanceValueType.Int4)
throw new ArgumentException($"Substance Input {inputName} is of type {input.ValueType} not {SubstanceValueType.Int4}.");
_nativeGraph.SetInputInt4(input.Index, x, y, z, w);
}
/// <summary>
/// Get array of 4 int (Vector4Ints x, y, z & w values)
/// </summary>
/// <param name="inputName">Name of the input in the SBSAR</param>
/// <returns>Current input value.</returns>
public int[] GetInputVector4Int(string inputName)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
if (input.ValueType != SubstanceValueType.Int4)
throw new ArgumentException($"Substance Input {inputName} is of type {input.ValueType} not {SubstanceValueType.Int4}.");
return _nativeGraph.GetInputInt4(input.Index);
}
/// <summary>
/// Update Substance string Input.
/// </summary>
/// <param name="inputName">Name of the input in the SBSAR.</param>
/// <param name="value">Value used to update the parameter.</param>
public void SetInputString(string inputName, string value)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
if (input.ValueType != SubstanceValueType.String)
throw new ArgumentException($"Substance Input {inputName} is of type {input.ValueType} not {SubstanceValueType.String}.");
_nativeGraph.SetInputString(input.Index, value);
}
/// <summary>
/// Get Substance string input.
/// </summary>
/// <param name="inputName">Name of the input in the SBSAR.</param>
/// <returns>Input current value.</returns>
public string GetInputString(string inputName)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
if (input.ValueType != SubstanceValueType.String)
throw new ArgumentException($"Substance Input {inputName} is of type {input.ValueType} not {SubstanceValueType.String}.");
return _nativeGraph.GetInputString(input.Index);
}
/// <summary>
/// Returns the complete input description for the target input name.
/// </summary>
/// <param name="inputName">Target input name.</param>
/// <returns>Complete input description for the target input.</returns>
public SubstanceInputDescription GetInputDescription(string inputName)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
return input.Description;
}
/// <summary>
/// Update Substance Texture2D Input.
/// </summary>
/// <param name="inputName">Name of the input in the SBSAR</param>
/// <param name="value"> value used to update the parameter</param>
public void SetInputTexture(string inputName, Texture2D value)
{
if (!TryGetInput(inputName, out SubstanceInputBase input))
throw new ArgumentException($"No Substance Input found with name {inputName}");
if (input.ValueType != SubstanceValueType.Image)
throw new ArgumentException($"Substance Input {inputName} is of type {input.ValueType} not {SubstanceValueType.Image}.");
if (value == null)
throw new ArgumentException("Texture can not be null.");
if (!value.isReadable)
throw new ArgumentException("Texture must be readable");
var pixels = value.GetPixels32();
_nativeGraph.SetInputTexture2D(input.Index, pixels, value.width, value.height);
}
/// <summary>
/// Returns instance texture output resoltion.
/// </summary>
/// <returns>Current output resolution</returns>
public Vector2Int GetTexturesResolution()
{
return _nativeGraph.GetInputInt2(_resolutionInput.Index);
}
/// <summary>
/// Sets instance texture output resolution.
/// </summary>
/// <param name="size"></param>
public void SetTexturesResolution(Vector2Int size)
{
_nativeGraph.SetInputInt2(_resolutionInput.Index, size);
}
/// <summary>
/// Returns true if this substance instance has an input with a given name.
/// </summary>
/// <param name="inputName">Input name.</param>
/// <returns>TRUE if substance instance has input with the given name.</returns>
public bool HasInput(string inputName)
{
return _inputsTable.ContainsKey(inputName);
}
private bool TryGetInput(string name, out Input.SubstanceInputBase input)
{
return _inputsTable.TryGetValue(name, out input);
}
#endregion Input Handle
#region Output Handle
/// <summary>
/// Returns a list with all output textures for the substance instance.
/// </summary>
/// <returns>Output texture.</returns>
public List<Texture2D> GetGeneratedTextures()
{
return _outputTable.Values.Select(a => a.OutputTexture).ToList();
}
/// <summary>
/// Returns the output texture for a given output name.
/// </summary>
/// <param name="outputName">Output name.</param>
/// <returns>Output texture.</returns>
public Texture2D GetOutputTexture(string outputName)
{
return _outputTable[outputName].OutputTexture;
}
#endregion Output Handle
#region Render
/// <summary>
/// Renders the substance instance synchronously.
/// </summary>
public void Render()
{
var result = _nativeGraph.Render();
GraphSO.UpdateOutputTextures(result);
}
/// <summary>
/// Renders the substance instance asynchronously.
/// </summary>
/// <returns>Task that will finish once render is done.</returns>
public Task RenderAsync()
{
TaskCompletionSource<object> tcs = new TaskCompletionSource<object>();
Task.Run(() =>
{
try
{
var result = _nativeGraph.Render();
_asyncRenderQueue.Enqueue(new AsyncRenderResult(result, tcs));
}
catch (Exception e)
{
_asyncRenderQueue.Enqueue(new AsyncRenderResult(e));
}
});
return tcs.Task;
}
#endregion Render
#region Preset
/// <summary>
/// Uses a preset XML to set graph input parameters.
/// </summary>
/// <param name="presetXML">Preset XML data.</param>
public void LoadPreset(string presetXML)
{
_nativeGraph.ApplyPreset(presetXML);
}
/// <summary>
/// Saves the current graph state into a preset XML.
/// </summary>
/// <returns>Preset created using the current state of the graph inputs.</returns>
public string CreatePresetFromCurrentState()
{
return _nativeGraph.CreatePresetFromCurrentState();
}
#endregion Preset
/// <summary>
/// Internal class to store substance instance render result.
/// </summary>
private class AsyncRenderResult
{
public IntPtr RenderResult { get; }
public TaskCompletionSource<object> Tcs { get; }
public Exception Exception { get; }
public AsyncRenderResult(IntPtr renderResult, TaskCompletionSource<object> tcs)
{
RenderResult = renderResult;
Tcs = tcs;
Exception = null;
}
public AsyncRenderResult(Exception exception)
{
Exception = exception;
}
}
}
}

View File

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

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e2e31b77766f89e499acb2692c36fb74
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,148 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Unity.Collections.LowLevel.Unsafe;
using UnityEngine;
namespace Adobe.Substance
{
public class Engine
{
private enum LoadState : uint
{
Engine_Unloaded = 0x00u, //!< Engine is currently not loaded
Engine_Loaded = 0x02u, //!< The engine is loaded
Engine_FatalError = 0x04u, //!< An unrecoverable error has occurred
}
private static LoadState sLoadState = LoadState.Engine_Unloaded;
public static bool IsInitialized => sLoadState == LoadState.Engine_Loaded;
#if (UNITY_IOS || UNITY_ANDROID) && !UNITY_EDITOR
private const int MAX_TEXTURE_SIZE = 512;
private const int MEMORY_BUGET = 512;
#else
private const int MEMORY_BUGET = 2048;
#endif
public static string Version()
{
var version_ptr = NativeMethods.sbsario_get_version();
return Marshal.PtrToStringAnsi(version_ptr);
}
public static string GetHash()
{
var version_ptr = NativeMethods.sbsario_get_hash();
return Marshal.PtrToStringAnsi(version_ptr);
}
//! @brief Initialize the Substance Engine
//! @param modulePath Path to the native module, only used if native module
//! dynamic loading is enabled in the managed library
//! @param enginePath Path to the Substance engine on disk, only used if
//! dynamic engine loading is enabled in the native library
public static void Initialize(string pluginPath, string enginePath)
{
if (sLoadState == LoadState.Engine_Loaded)
return;
IntPtr memoryBudget = (IntPtr)MEMORY_BUGET;
var code = (ErrorCode)NativeMethods.sbsario_initialize(pluginPath, enginePath, memoryBudget);
// On success, set the engine state to loaded
if (code == ErrorCode.SBSARIO_ERROR_OK)
sLoadState = LoadState.Engine_Loaded;
if (code != ErrorCode.SBSARIO_ERROR_OK)
throw new SubstanceException(code);
}
public static void Initialize()
{
if (sLoadState == LoadState.Engine_Loaded)
return;
IntPtr memoryBudget = (IntPtr)MEMORY_BUGET;
var code = (ErrorCode)NativeMethods.sbsario_initialize(null, null, memoryBudget);
if (sLoadState == LoadState.Engine_Unloaded)
{
// On success, set the engine state to loaded
if (code == ErrorCode.SBSARIO_ERROR_OK)
sLoadState = LoadState.Engine_Loaded;
}
if (code != ErrorCode.SBSARIO_ERROR_OK)
throw new SubstanceException(code);
}
public static void Shutdown()
{
var code = (ErrorCode)NativeMethods.sbsario_shutdown();
if (sLoadState == LoadState.Engine_Loaded)
{
// On success, set the engine to an unloaded state
if (code == ErrorCode.SBSARIO_ERROR_OK)
sLoadState = LoadState.Engine_Unloaded;
}
if (code != ErrorCode.SBSARIO_ERROR_OK)
throw new SubstanceException(code);
}
public static SubstanceNativeGraph OpenFile(byte[] data, int graphID)
{
if (sLoadState != LoadState.Engine_Loaded)
throw new ArgumentException("Engine must be loaded before creating Native Handler");
var substanceFile = new SubstanceNativeGraph(data, graphID);
return substanceFile;
}
/// <summary>
/// Get the total graph count for this substance object.
/// </summary>
/// <returns>Total graph count.</returns>
public static int GetFileGraphCount(byte[] fileContent)
{
int size = Marshal.SizeOf(fileContent[0]) * fileContent.Length;
var nativeMemory = Marshal.AllocHGlobal(size);
Marshal.Copy(fileContent, 0, nativeMemory, size);
try
{
var handler = NativeMethods.sbsario_sbsar_load_from_memory(nativeMemory, (IntPtr)size);
if (handler == default)
throw new ArgumentException();
return (int)NativeMethods.sbsario_sbsar_get_graph_count(handler);
}
finally
{
if (nativeMemory != default)
Marshal.FreeHGlobal(nativeMemory);
}
}
private static double InvPow(double pBase, double pResult)
{
double exposent = Math.Log(pResult) / Math.Log(pBase);
return exposent;
}
private static bool IsPowerOfTwo(double number)
{
double log = Math.Log(number, 2);
double pow = Math.Pow(2, Math.Round(log));
return pow == number;
}
}
}

View File

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

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 33b96c1a3b96fcb45b2fa65b50de541b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,26 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using UnityEngine;
namespace Adobe.Substance
{
public class SubstanceNotInitializedException : Exception
{
}
public class SubstanceEngineNotFoundException : Exception
{
public SubstanceEngineNotFoundException(string engine) : base($"Substance engine not found {engine}")
{
}
}
public class SubstanceException : Exception
{
internal SubstanceException(ErrorCode code) : base(code.GetMessage())
{
}
}
}

View File

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

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 551ddb489d69d334986aac5d60ec4660
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,43 @@
using System;
using System.Runtime.InteropServices;
namespace Adobe.Substance
{
//! @brief Numeric type union
//! @note The size will need to be changed if the API
[StructLayout(LayoutKind.Explicit, Size = 16)]
internal struct DataInternalNumeric
{
[FieldOffset(0)]
public int mIntData0;
[FieldOffset(4)]
public int mIntData1;
[FieldOffset(8)]
public int mIntData2;
[FieldOffset(12)]
public int mIntData3;
[FieldOffset(0)]
public float mFloatData0;
[FieldOffset(4)]
public float mFloatData1;
[FieldOffset(8)]
public float mFloatData2;
[FieldOffset(12)]
public float mFloatData3;
[FieldOffset(0)]
public IntPtr mPtr;
[FieldOffset(0)]
public NativeDataImage ImageData;
}
//! @brief Separate type for outputs
} // namespace Alg.Sbsario

View File

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

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4f96894eae7ca5a4abd70a163c1e956e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,12 @@
namespace Adobe.Substance
{
//! @brief Enum type mapping from sbsario to C#
internal enum ErrorCode : uint
{
SBSARIO_ERROR_OK = 0x00u, //!< No error has occurred
SBSARIO_ERROR_STATE = 0x01u, //!< Call made with an invalid state
SBSARIO_ERROR_INVALID = 0x02u, //!< An invalid argument was given to the api
SBSARIO_ERROR_UNKNOWN = 0x03u, //!< An unspecified error has occurred
SBSARIO_ERROR_FAILURE = 0x04u, //!< The operation failed to complete
}
} // namespace Alg.Sbsario

View File

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

View File

@ -0,0 +1,14 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Adobe.Substance
{
internal enum HVFlip
{
SBSARIO_HVFLIP_NO = 0x0, //!< No flipping (default value)
SBSARIO_HVFLIP_HORIZONTAL = 0x1, //!< Horizontal flip
SBSARIO_HVFLIP_VERTICAL = 0x2, //!< Vertical flip
SBSARIO_HVFLIP_BOTH = 0x3 //!< Horizontal and Vertical flip
}
}

View File

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

View File

@ -0,0 +1,64 @@
namespace Adobe.Substance
{
//! @brief Image format
internal enum ImageFormat : int
{
// 2 bits reserved for the bytes per channel
SBSARIO_IMAGE_FORMAT_8B = 0x00,
SBSARIO_IMAGE_FORMAT_16B = 0x01,
SBSARIO_IMAGE_FORMAT_32B = 0x02,
/* Unused - 0x03u */
SBSARIO_IMAGE_FORMAT_BITDEPTH_MASK = 0x03,
// 2 bits reserved for the number of channels
SBSARIO_IMAGE_FORMAT_RGBA = 0x00,
SBSARIO_IMAGE_FORMAT_RGBX = 0x04,
SBSARIO_IMAGE_FORMAT_RGB = 0x08,
SBSARIO_IMAGE_FORMAT_L = 0x0c,
SBSARIO_IMAGE_FORMAT_CHANNELS_MASK = 0x0c,
// 1 bit to determine integer or floating point
SBSARIO_IMAGE_FORMAT_INT = 0x00,
SBSARIO_IMAGE_FORMAT_FLOAT = 0x10,
/* Format (2 bits) */
SBSARIO_IMAGE_FORMAT_PF_RAW = 0x0, /**< Non-compressed flag */
SBSARIO_IMAGE_FORMAT_PF_BC = 0x1 << 6, /**< DXT compression flag */
SBSARIO_IMAGE_FORMAT_PF_PVRTC = 0x3 << 6, /**< PVRTC compression flag */
SBSARIO_IMAGE_FORMAT_PF_ETC = 0x3 << 6, /**< ETC compression flag */
SBSARIO_IMAGE_FORMAT_PF_Misc = 0x2 << 6, /**< Other compression flag */
SBSARIO_IMAGE_FORMAT_PF_MASK_RAWFormat = 0x3 << 6,
// Combine integer and float bitfields to create more complex image types
SBSARIO_IMAGE_FORMAT_8I = SBSARIO_IMAGE_FORMAT_8B | SBSARIO_IMAGE_FORMAT_INT,
SBSARIO_IMAGE_FORMAT_16I = SBSARIO_IMAGE_FORMAT_16B | SBSARIO_IMAGE_FORMAT_INT,
SBSARIO_IMAGE_FORMAT_16F = SBSARIO_IMAGE_FORMAT_16B | SBSARIO_IMAGE_FORMAT_FLOAT,
SBSARIO_IMAGE_FORMAT_32F = SBSARIO_IMAGE_FORMAT_32B | SBSARIO_IMAGE_FORMAT_FLOAT,
SBSARIO_IMAGE_FORMAT_PRECISION_MASK = SBSARIO_IMAGE_FORMAT_BITDEPTH_MASK | 0x10
}
//! @brief Enum representing the order of the output channels
internal enum ChannelOrder : uint
{
SBSARIO_CHANNEL_ORDER_INVALID = 0x00u,
SBSARIO_CHANNEL_ORDER_RGBA = 0xe4u,
SBSARIO_CHANNEL_ORDER_BGRA = 0xc6u,
SBSARIO_CHANNEL_ORDER_ABGR = 0x1bu,
SBSARIO_CHANNEL_ORDER_ARGB = 0x39u,
SBSARIO_CHANNEL_RED_MASK = 0x03u,
SBSARIO_CHANNEL_GREEN_MASK = 0x0cu,
SBSARIO_CHANNEL_BLUE_MASK = 0x30u,
SBSARIO_CHANNEL_ALPHA_MASK = 0xc0u,
SBSARIO_CHANNEL_RED_RSHIFT = 0x00u,
SBSARIO_CHANNEL_GREEN_RSHIFT = 0x02u,
SBSARIO_CHANNEL_BLUE_RSHIFT = 0x04u,
SBSARIO_CHANNEL_ALPHA_RSHIFT = 0x06u,
}
} // namespace Alg.Sbsario

View File

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

View File

@ -0,0 +1,38 @@
namespace Adobe.Substance
{
//! @brief Enum describing whether the data is an input or output
internal enum DataType : uint
{
SBSARIO_DATA_INVALID = 0x00u, //!< Invalid data
SBSARIO_DATA_INPUT = 0x01u, //!< Input data
SBSARIO_DATA_OUTPUT = 0x02u, //!< Output data
}
//! @brief Enum describing the value type of an input or output
internal enum ValueType : uint
{
SBSARIO_VALUE_FLOAT = 0x00u, //!< Float type
SBSARIO_VALUE_FLOAT2 = 0x01u, //!< Float vector with two elements
SBSARIO_VALUE_FLOAT3 = 0x02u, //!< Float vector with three elements
SBSARIO_VALUE_FLOAT4 = 0x03u, //!< Float vector with four elements
SBSARIO_VALUE_INT = 0x04u, //!< Integer type
SBSARIO_VALUE_INT2 = 0x05u, //!< Integer vector with two elements
SBSARIO_VALUE_INT3 = 0x06u, //!< Integer vector with three elements
SBSARIO_VALUE_INT4 = 0x07u, //!< Integer vector with four elements
SBSARIO_VALUE_IMAGE = 0x08u, //!< Image type
SBSARIO_VALUE_STRING = 0x09u, //!< String type, input only
SBSARIO_VALUE_FONT = 0x0Au, //!< Font type, input only
}
internal enum WidgetType : uint
{
SBSARIO_WIDGET_NOWIDGET = 0x00u,
SBSARIO_WIDGET_SLIDER = 0x01u,
SBSARIO_WIDGET_ANGLE = 0x02u,
SBSARIO_WIDGET_COLOR = 0x03u,
SBSARIO_WIDGET_TOGGLEBUTTON = 0x04u,
SBSARIO_WIDGET_COMBOBOX = 0x05u,
SBSARIO_WIDGET_IMAGE = 0x06u,
SBSARIO_WIDGET_POSITION = 0x07u,
}
} // namespace Alg.Sbsario

View File

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

View File

@ -0,0 +1,59 @@
using System;
using System.Runtime.InteropServices;
namespace Adobe.Substance
{
[StructLayout(LayoutKind.Sequential)]
internal struct NativeDataImage
{
/** @brief Pointer to the underlying image data */
public IntPtr data;
/** @brief The width in pixels of the larget mipmap */
public IntPtr width;
/** @brief The height in pixels of the largest mipmap */
public IntPtr height;
/** @brief The number of mipmaps in the chain. The largest map (level 0)
will be the first in memory, with width/height as its dimensions
*/
public IntPtr mipmaps;
/** @brief Channel order enum, describing the channel index order */
public ChannelOrder channel_order;
/** @brief Image format enum, describing the bitdepth and channel size
of the image in memory
*/
public ImageFormat image_format;
public override string ToString()
{
return $"width:{width} \n " +
$"height:{height}\n" +
$"mipmaps:{mipmaps}\n" +
$"image_format:{(int)image_format} \n" +
$"channel_order:{(int)channel_order}";
}
}
[StructLayout(LayoutKind.Sequential)]
internal struct NativeData
{
/** @brief Type descriptor of the data value */
public ValueType ValueType;
/** @brief Descriptor of whether the data is for inputs or outputs */
public DataType DataType;
/** @brief Data index that this is associated with, either of the input
if it is input data, or of the output if it is output/result
data. */
public IntPtr Index;
/** @brief Internal data, of which the valid type is determined by
the value_type member.*/
public DataInternalNumeric Data;
}
} // namespace Adobe.Substance

View File

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

View File

@ -0,0 +1,16 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using UnityEngine;
namespace Adobe.Substance
{
[StructLayout(LayoutKind.Sequential)]
internal struct NativeInputVisibility
{
public IntPtr Index;
public IntPtr IsVisible;
}
}

View File

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

View File

@ -0,0 +1,86 @@
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using UnityEngine;
namespace Adobe.Substance
{
internal static class NativeConsts
{
public const uint UseDefault = ~0u;
}
[StructLayout(LayoutKind.Explicit, Size = 16)]
internal struct NativeOutputFormatComponent
{
[FieldOffset(0)]
public uint outputIndex;
[FieldOffset(4)]
public ShuffleIndex ShuffleIndex;
[FieldOffset(8)]
public float levelMin;
[FieldOffset(12)]
public float levelMax;
public static NativeOutputFormatComponent CreateDefault()
{
return new NativeOutputFormatComponent
{
outputIndex = NativeConsts.UseDefault,
levelMin = NativeConsts.UseDefault,
levelMax = NativeConsts.UseDefault
};
}
}
[StructLayout(LayoutKind.Explicit, Size = 84)]
internal struct NativeOutputFormat
{
[FieldOffset(0)]
public uint format;
[FieldOffset(4)]
public uint mipmapLevelsCount;
[FieldOffset(8)]
public HVFlip hvFlip;
[FieldOffset(12)]
public uint forceWidth;
[FieldOffset(16)]
public uint forceHeight;
[FieldOffset(20)]
public NativeOutputFormatComponent ChannelComponent0;
[FieldOffset(36)]
public NativeOutputFormatComponent ChannelComponent1;
[FieldOffset(52)]
public NativeOutputFormatComponent ChannelComponent2;
[FieldOffset(68)]
public NativeOutputFormatComponent ChannelComponent3;
public static NativeOutputFormat CreateDefault()
{
return new NativeOutputFormat
{
format = NativeConsts.UseDefault,
mipmapLevelsCount = NativeConsts.UseDefault,
hvFlip = HVFlip.SBSARIO_HVFLIP_NO,
forceWidth = NativeConsts.UseDefault,
forceHeight = NativeConsts.UseDefault,
ChannelComponent0 = NativeOutputFormatComponent.CreateDefault(),
ChannelComponent1 = NativeOutputFormatComponent.CreateDefault(),
ChannelComponent2 = NativeOutputFormatComponent.CreateDefault(),
ChannelComponent3 = NativeOutputFormatComponent.CreateDefault()
};
}
}
}

View File

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

View File

@ -0,0 +1,13 @@
using System;
using System.Runtime.InteropServices;
namespace Adobe.Substance
{
[StructLayout(LayoutKind.Sequential)]
internal struct NativePhysicalSize
{
public float X;
public float Y;
public float Z;
}
} // namespace Adobe.Substance

View File

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

View File

@ -0,0 +1,17 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using UnityEngine;
namespace Adobe.Substance
{
/// <summary>
/// Struct for handlign sending and receiving preset XML from native to managed code.
/// </summary>
[StructLayout(LayoutKind.Sequential)]
internal struct NativePreset
{
public IntPtr XMLString;
}
}

View File

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

View File

@ -0,0 +1,15 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using UnityEngine;
namespace Adobe.Substance
{
[StructLayout(LayoutKind.Sequential)]
internal struct NativeThumbnail
{
public IntPtr Size;
public IntPtr Data;
}
}

View File

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

View File

@ -0,0 +1,88 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using UnityEngine;
namespace Adobe.Substance
{
//! @brief Numeric type union
//! @note The size will need to be changed if the API
[StructLayout(LayoutKind.Explicit, Size = 16)]
internal struct NumericDescriptValue
{
[FieldOffset(0)]
public int mIntData0;
[FieldOffset(4)]
public int mIntData1;
[FieldOffset(8)]
public int mIntData2;
[FieldOffset(12)]
public int mIntData3;
[FieldOffset(0)]
public float mFloatData0;
[FieldOffset(4)]
public float mFloatData1;
[FieldOffset(8)]
public float mFloatData2;
[FieldOffset(12)]
public float mFloatData3;
}
//! @brief Managed representation of the native sbsario input desc type
[StructLayout(LayoutKind.Sequential)]
internal struct NativeNumericInputDesc
{
public IntPtr index;
/** @brief Unique string identifier for x axis of a vector input. ('X' if nullptr) */
public IntPtr xLabel;
/** @brief Unique string identifier for y axis of a vector input. ('Y' if nullptr) */
public IntPtr yLabel;
/** @brief Unique string identifier for z axis of a vector input. ('Z' if nullptr) */
public IntPtr zLabel;
/** @brief Unique string identifier for w axis of a vector input. ('W' if nullptr) */
public IntPtr wLabel;
/** @brief Unique string identifier for the false state of a bool int. */
public IntPtr LabelFalse;
/** @brief Unique string identifier for the true state of a bool int. */
public IntPtr LabelTrue;
/** @brief Step to be used for a slider input. */
public float sliderStep;
/** @brief Bool value that determs if the slider must clamp. */
public IntPtr sliderClamp;
/** @brief Internal data, of which the valid type is determined by
the value_type member.
*/
public NumericDescriptValue default_value;
public NumericDescriptValue min_value;
public NumericDescriptValue max_value;
public IntPtr enumValueCount;
}
[StructLayout(LayoutKind.Sequential)]
internal struct NativeEnumInputDesc
{
public IntPtr label;
public NumericDescriptValue value;
}
}

View File

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

View File

@ -0,0 +1,31 @@
using System;
using System.Runtime.InteropServices;
namespace Adobe.Substance
{
//! @brief Managed representation of the native sbsario graph descriptor structure
[StructLayout(LayoutKind.Sequential)]
internal struct NativeGraphDesc
{
//! @brief Unique string label of the graph
public IntPtr mLabel;
//! @brief Description set for the graph
public IntPtr mDescription;
//! @brief Category of the graph
public IntPtr mCategory;
//! @brief Semicolon separated list of keywords
public IntPtr mKeywords;
//! @brief Graph author
public IntPtr mAuthor;
//! @brief Graph author website url
public IntPtr mAuthorUrl;
//! @brief Graph user data
public IntPtr mUserTag;
}
} // namespace Adobe.Substance

View File

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

View File

@ -0,0 +1,34 @@
using System;
using System.Runtime.InteropServices;
namespace Adobe.Substance
{
//! @brief Managed representation of the native sbsario input desc type
[StructLayout(LayoutKind.Sequential)]
internal struct NativeInputDesc
{
//! @brief Unique string identifier of the input
public IntPtr mIdentifier;
//! @brief Display label of the input
public IntPtr mLabel;
//! @brief Gui group of the input.
public IntPtr GuiGroup;
//! @brief Description of the input.
public IntPtr GuiDescription;
//! @brief GUI visibility condition.
public IntPtr GuiVisibleIf;
//! @brief Index of the input
public IntPtr mIndex;
//! @brief Type of widget used for the input
public IntPtr inputWidgetType;
//! @brief Type of the input
public IntPtr mValueType;
}
} // namespace Alg.Sbsario

View File

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

View File

@ -0,0 +1,28 @@
using System;
using System.Runtime.InteropServices;
namespace Adobe.Substance
{
//! @brief Managed representation of the native sbsario output desc type
[StructLayout(LayoutKind.Sequential)]
internal struct NativeOutputDesc
{
//! @brief Unique string identifier of the output
public IntPtr mIdentifier;
//! @brief Display label for the output
public IntPtr mLabel;
//! @brief Index of the output
public UIntPtr mIndex;
//! @brief Image output format.
public IntPtr mFormat;
//! @brief Type of the output
public ValueType mValueType;
//! @brief Default usage for the output
public IntPtr mChannelUsage;
}
} // namespace Alg.Sbsario

Some files were not shown because too many files have changed in this diff Show More