post processing; dynamic world space ui; wasm interpreter

This commit is contained in:
Rowan 2025-07-16 00:23:58 -04:00
parent 0093909358
commit 176ad8c8da
131 changed files with 2202 additions and 210 deletions

View file

@ -24,8 +24,9 @@ MonoBehaviour:
probeSamplingDebugMesh: {fileID: 0} probeSamplingDebugMesh: {fileID: 0}
probeSamplingDebugTexture: {fileID: 0} probeSamplingDebugTexture: {fileID: 0}
probeVolumeBlendStatesCS: {fileID: 0} probeVolumeBlendStatesCS: {fileID: 0}
m_RendererFeatures: [] m_RendererFeatures:
m_RendererFeatureMap: - {fileID: 601012607912154617}
m_RendererFeatureMap: f9952258c8395708
m_UseNativeRenderPass: 0 m_UseNativeRenderPass: 0
xrSystemData: {fileID: 0} xrSystemData: {fileID: 0}
postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}
@ -44,10 +45,36 @@ MonoBehaviour:
failOperation: 0 failOperation: 0
zFailOperation: 0 zFailOperation: 0
m_ShadowTransparentReceive: 1 m_ShadowTransparentReceive: 1
m_RenderingMode: 0 m_RenderingMode: 2
m_DepthPrimingMode: 0 m_DepthPrimingMode: 0
m_CopyDepthMode: 1 m_CopyDepthMode: 1
m_DepthAttachmentFormat: 0 m_DepthAttachmentFormat: 0
m_DepthTextureFormat: 0 m_DepthTextureFormat: 0
m_AccurateGbufferNormals: 0 m_AccurateGbufferNormals: 0
m_IntermediateTextureMode: 1 m_IntermediateTextureMode: 1
--- !u!114 &601012607912154617
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f62c9c65cf3354c93be831c8bc075510, type: 3}
m_Name: ScreenSpaceAmbientOcclusion
m_EditorClassIdentifier:
m_Active: 1
m_Settings:
AOMethod: 0
Downsample: 0
AfterOpaque: 0
Source: 1
NormalSamples: 1
Intensity: 3
DirectLightingStrength: 0.25
Radius: 0.035
Samples: 1
BlurQuality: 0
Falloff: 100
SampleCount: -1

View file

@ -92,7 +92,7 @@ MonoBehaviour:
m_MaxPixelLights: 0 m_MaxPixelLights: 0
m_ShadowAtlasResolution: 256 m_ShadowAtlasResolution: 256
m_VolumeFrameworkUpdateMode: 0 m_VolumeFrameworkUpdateMode: 0
m_VolumeProfile: {fileID: 0} m_VolumeProfile: {fileID: 11400000, guid: ab09877e2e707104187f6f83e2f62510, type: 2}
apvScenesData: apvScenesData:
obsoleteSceneBounds: obsoleteSceneBounds:
m_Keys: [] m_Keys: []

30
Assets/DefaultEditor.cs Normal file
View file

@ -0,0 +1,30 @@
using UnityEngine;
using UnityEditor;
using UnityEngine.UIElements;
using UnityEditor.UIElements;
[CustomEditor(typeof(Object), true, isFallback = true)]
public class DefaultEditor : Editor
{
public override VisualElement CreateInspectorGUI()
{
var container = new VisualElement();
var iterator = serializedObject.GetIterator();
if (iterator.NextVisible(true))
{
do
{
var propertyField = new PropertyField(iterator.Copy()) { name = "PropertyField:" + iterator.propertyPath };
if (iterator.propertyPath == "m_Script" && serializedObject.targetObject != null)
propertyField.SetEnabled(value: false);
container.Add(propertyField);
}
while (iterator.NextVisible(false));
}
return container;
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: b9af3c2b0b924c5a6a45c4788726c0be

View file

@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3}
m_Name: New Volume Profile
m_EditorClassIdentifier:
components: []

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0ef82ce49038ef596b5717dac6df2898
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

166
Assets/Prefabs/Key.prefab Normal file
View file

@ -0,0 +1,166 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2892703864492016621
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2368094401510200604}
- component: {fileID: 3721857971285848745}
- component: {fileID: 4840302974988827429}
- component: {fileID: 2542814135003069057}
- component: {fileID: 2022912019066975223}
- component: {fileID: 1756562992861857283}
m_Layer: 0
m_Name: Key
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2368094401510200604
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2892703864492016621}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0.38268343, z: 0, w: 0.92387956}
m_LocalPosition: {x: -2, y: 0.005, z: 0}
m_LocalScale: {x: 0.4, y: 0.01, z: 0.2}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 45, z: 0}
--- !u!33 &3721857971285848745
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2892703864492016621}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &4840302974988827429
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2892703864492016621}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: be8072c6f51e356f8a8c5affbe22973f, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &2542814135003069057
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2892703864492016621}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &2022912019066975223
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2892703864492016621}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6eeb0be32fefa054589fe082a0a7273a, type: 3}
m_Name:
m_EditorClassIdentifier:
oneTimeUse: 0
onInteracted:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1756562992861857283}
m_TargetAssemblyTypeName: KitsuneCafe.Interaction.AddItem, Assembly-CSharp
m_MethodName: ToInteractor
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
- m_Target: {fileID: 2892703864492016621}
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &1756562992861857283
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2892703864492016621}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 67cbbbb78aff08ac19b6fa07b7f41307, type: 3}
m_Name:
m_EditorClassIdentifier:
item: {fileID: 11400000, guid: 3a9b5fc9b523890cf8abd310dbc64940, type: 2}
count: 1

View file

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

View file

@ -1,34 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fcf7219bab7fe46a1ad266029b2fee19, type: 3}
m_Name: Readme
m_EditorClassIdentifier:
icon: {fileID: 2800000, guid: 727a75301c3d24613a3ebcec4a24c2c8, type: 3}
title: URP Empty Template
sections:
- heading: Welcome to the Universal Render Pipeline
text: This template includes the settings and assets you need to start creating with the Universal Render Pipeline.
linkText:
url:
- heading: URP Documentation
text:
linkText: Read more about URP
url: https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest
- heading: Forums
text:
linkText: Get answers and support
url: https://forum.unity.com/forums/universal-render-pipeline.383/
- heading: Report bugs
text:
linkText: Submit a report
url: https://unity3d.com/unity/qa/bug-reporting
loadedLayout: 1

View file

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: acb1c120479088ab5b42b2f04af1cbf0 guid: adffce9df35457a8e85ccb5847423921
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View file

@ -0,0 +1,137 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-7920160008583251365
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 10
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: DebugKey
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _XRMotionVectorsPass: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0, g: 0, b: 0, a: 1}
- _Color: {r: 0, g: 0, b: 0, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1

View file

@ -1,8 +1,8 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 8105016687592461f977c054a80ce2f2 guid: be8072c6f51e356f8a8c5affbe22973f
NativeFormatImporter: NativeFormatImporter:
externalObjects: {} externalObjects: {}
mainObjectFileID: 0 mainObjectFileID: 2100000
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View file

@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7fb754f9e0773ecf5b1fe29c163e1ec2, type: 3}
m_Name: HelloEnvironment
m_EditorClassIdentifier:
functions:
- {fileID: 11400000, guid: 5c153b604f1b1916cb5880726d0123d5, type: 2}

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: aa4803d7cbd2cd0d3938c170ae2e4426
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c278fb50cca0b84469e0af15b5b75ce9, type: 3}
m_Name: HelloModule
m_EditorClassIdentifier:
moduleName: hello
wasm: {fileID: -8528525496504085160, guid: ba9642a266c04a33d8a1443db2ebb016, type: 3}
SkipModuleValidation: 0
SkipStartFunction: 0

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5000fd7bd5e859c3aa908dda32789565
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e6dc78199a8464287bf7cf7e9e8ff4d3, type: 3}
m_Name: HelloRuntime
m_EditorClassIdentifier:
environments:
- {fileID: 11400000, guid: aa4803d7cbd2cd0d3938c170ae2e4426, type: 2}
modules:
- {fileID: 11400000, guid: 5000fd7bd5e859c3aa908dda32789565, type: 2}

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7cdd54e2ee68f04efa76abf0d040e9ad
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/SOAP/HelloWorld.wasm Normal file

Binary file not shown.

View file

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

View file

@ -20,5 +20,5 @@ MonoBehaviour:
stackable: 0 stackable: 0
maxStackCount: 10 maxStackCount: 10
icon: {fileID: 0} icon: {fileID: 0}
instancePrefab: {fileID: 0} instancePrefab: {fileID: 2892703864492016621, guid: 51202e3c62c3d3e1c9bb0ff9c09a608f, type: 3}
previewPrefab: {fileID: 0} previewPrefab: {fileID: 0}

View file

@ -12,7 +12,5 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 9702da9b93bb25bf089c54dc37cc44e7, type: 3} m_Script: {fileID: 11500000, guid: 9702da9b93bb25bf089c54dc37cc44e7, type: 3}
m_Name: TestInventory m_Name: TestInventory
m_EditorClassIdentifier: m_EditorClassIdentifier:
serializableItems: serializableItems: []
- Item: {fileID: 11400000, guid: 3a9b5fc9b523890cf8abd310dbc64940, type: 2}
count: 1
capacity: 8 capacity: 8

View file

@ -0,0 +1,14 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a1d86ab1e1c07c78fbb94a44dbb50503, type: 3}
m_Name: SayCBinding
m_EditorClassIdentifier:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5c153b604f1b1916cb5880726d0123d5
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

8
Assets/SOAP/UI.meta Normal file
View file

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

View file

@ -0,0 +1,17 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 0}
m_Name: Modal
m_EditorClassIdentifier: Assembly-CSharp:KitsuneCafe.UI:ModalElementSO
visualTreeAsset: {fileID: 9197481963319205126, guid: bc70bdaaf37609283aac14435c5441a2, type: 3}
titleId: title
contentId: content

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1a47b12328bfde496ab2f3847d762a79
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,17 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0b01085379e9a10319622dd3dd23f4bd, type: 3}
m_Name: New Modal Element
m_EditorClassIdentifier:
visualTreeAsset: {fileID: 0}
titleId: title
contentId: content

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 71a6f29fae4392a4f97870a52b6adf1e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,14 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6a0779b28f619757e9a8468b485857f3, type: 3}
m_Name: Orchestrator
m_EditorClassIdentifier:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 994ab04db2c2004abb8272830cb16b26
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -751,7 +751,7 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &832575517 --- !u!1 &881234002
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
@ -759,8 +759,8 @@ GameObject:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 832575519} - component: {fileID: 881234004}
- component: {fileID: 832575518} - component: {fileID: 881234003}
m_Layer: 0 m_Layer: 0
m_Name: Global Volume m_Name: Global Volume
m_TagString: Untagged m_TagString: Untagged
@ -768,13 +768,13 @@ GameObject:
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 1
--- !u!114 &832575518 --- !u!114 &881234003
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 832575517} m_GameObject: {fileID: 881234002}
m_Enabled: 1 m_Enabled: 1
m_EditorHideFlags: 0 m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3}
@ -784,14 +784,14 @@ MonoBehaviour:
priority: 0 priority: 0
blendDistance: 0 blendDistance: 0
weight: 1 weight: 1
sharedProfile: {fileID: 11400000, guid: 10fc4df2da32a41aaa32d77bc913491c, type: 2} sharedProfile: {fileID: 11400000, guid: ab09877e2e707104187f6f83e2f62510, type: 2}
--- !u!4 &832575519 --- !u!4 &881234004
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 832575517} m_GameObject: {fileID: 881234002}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
@ -1066,6 +1066,70 @@ MeshFilter:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1190731365} m_GameObject: {fileID: 1190731365}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1281046467
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1281046468}
- component: {fileID: 1281046469}
- component: {fileID: 1281046470}
m_Layer: 0
m_Name: World Space UI
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1281046468
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1281046467}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1520555326}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1281046469
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1281046467}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 39f2893c7acdb9928b0e8e9c693228ce, type: 3}
m_Name:
m_EditorClassIdentifier:
camera: {fileID: 330585546}
registerChildren: 1
--- !u!114 &1281046470
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1281046467}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9a35ed32b167081b98babff069b52667, type: 3}
m_Name:
m_EditorClassIdentifier:
orchestrator: {fileID: 11400000, guid: 994ab04db2c2004abb8272830cb16b26, type: 2}
root: {fileID: 1281046468}
panelSettings: {fileID: 11400000, guid: 2bc58aab5867867e5b0feeae2df42fd0, type: 2}
prefab: {fileID: 0}
--- !u!1 &1363717994 --- !u!1 &1363717994
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1082,6 +1146,8 @@ GameObject:
- component: {fileID: 1363718002} - component: {fileID: 1363718002}
- component: {fileID: 1363718005} - component: {fileID: 1363718005}
- component: {fileID: 1363718004} - component: {fileID: 1363718004}
- component: {fileID: 1363718007}
- component: {fileID: 1363718006}
m_Layer: 0 m_Layer: 0
m_Name: Player m_Name: Player
m_TagString: Untagged m_TagString: Untagged
@ -1427,6 +1493,39 @@ MonoBehaviour:
motor: {fileID: 1363718002} motor: {fileID: 1363718002}
sprint: {fileID: 11400000, guid: 07250b1c5f2bd07c793772099684f602, type: 2} sprint: {fileID: 11400000, guid: 07250b1c5f2bd07c793772099684f602, type: 2}
adjustedMaxSpeed: 3.5 adjustedMaxSpeed: 3.5
--- !u!114 &1363718006
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1363717994}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b57786c673a3e53d0aa6fad8d47eeed5, type: 3}
m_Name:
m_EditorClassIdentifier:
inventory: {fileID: 11400000, guid: cd3f9ac2afa71f8b6acb3fb0cacfe441, type: 2}
--- !u!114 &1363718007
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1363717994}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1f31bf0aa63f4af71b570fff56455548, type: 3}
m_Name:
m_EditorClassIdentifier:
root: {fileID: 1363717994}
collider: {fileID: 1915136996}
interactSource: {fileID: 11400000, guid: 8ad6b00b0192bc3d4b39b6f91de2447f, type: 2}
updateFrequency: 7
minimumChangeDelta: 0.1
outlineColor: {r: 1, g: 0.2705882, b: 0, a: 1}
outlineWidth: 3
outlineMode: 0
--- !u!1 &1504087844 --- !u!1 &1504087844
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1535,6 +1634,117 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1520555325
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1520555326}
- component: {fileID: 1520555327}
- component: {fileID: 1520555328}
- component: {fileID: 1520555329}
m_Layer: 5
m_Name: UIDocument
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1520555326
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1520555325}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -2, y: 1, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1281046468}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1520555327
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1520555325}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_PanelSettings: {fileID: 11400000, guid: 2bc58aab5867867e5b0feeae2df42fd0, type: 2}
m_ParentUI: {fileID: 0}
sourceAsset: {fileID: 9197481963319205126, guid: bc70bdaaf37609283aac14435c5441a2, type: 3}
m_SortingOrder: 0
m_WorldSpaceSizeMode: 1
m_WorldSpaceWidth: 1920
m_WorldSpaceHeight: 1080
--- !u!1931382933 &1520555328
UIRenderer:
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1520555325}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!114 &1520555329
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1520555325}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d11d59e048d068de9a36d02d67cfd1ad, type: 3}
m_Name:
m_EditorClassIdentifier:
doc: {fileID: 1520555327}
value: test
--- !u!1001 &1574173917 --- !u!1001 &1574173917
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1669,9 +1879,8 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 1915136995} - component: {fileID: 1915136995}
- component: {fileID: 1915136996} - component: {fileID: 1915136996}
- component: {fileID: 1915136997}
m_Layer: 0 m_Layer: 0
m_Name: Interactor m_Name: Interaction Collider
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
@ -1711,28 +1920,10 @@ CapsuleCollider:
m_ProvidesContacts: 0 m_ProvidesContacts: 0
m_Enabled: 1 m_Enabled: 1
serializedVersion: 2 serializedVersion: 2
m_Radius: 0.55 m_Radius: 1.25
m_Height: 2 m_Height: 2.5
m_Direction: 1 m_Direction: 1
m_Center: {x: 0, y: 0, z: 0} m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &1915136997
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1915136994}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1f31bf0aa63f4af71b570fff56455548, type: 3}
m_Name:
m_EditorClassIdentifier:
collider: {fileID: 1915136996}
interactSource: {fileID: 11400000, guid: 8ad6b00b0192bc3d4b39b6f91de2447f, type: 2}
updateFrequency: 7
minimumChangeDelta: 0.1
outlineColor: {r: 1, g: 0.2705882, b: 0, a: 1}
outlineWidth: 3
--- !u!1 &1918868759 --- !u!1 &1918868759
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1842,6 +2033,63 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &7547016027398857338
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 2368094401510200604, guid: 51202e3c62c3d3e1c9bb0ff9c09a608f, type: 3}
propertyPath: m_LocalPosition.x
value: -2
objectReference: {fileID: 0}
- target: {fileID: 2368094401510200604, guid: 51202e3c62c3d3e1c9bb0ff9c09a608f, type: 3}
propertyPath: m_LocalPosition.y
value: 0.005
objectReference: {fileID: 0}
- target: {fileID: 2368094401510200604, guid: 51202e3c62c3d3e1c9bb0ff9c09a608f, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2368094401510200604, guid: 51202e3c62c3d3e1c9bb0ff9c09a608f, type: 3}
propertyPath: m_LocalRotation.w
value: 0.92387956
objectReference: {fileID: 0}
- target: {fileID: 2368094401510200604, guid: 51202e3c62c3d3e1c9bb0ff9c09a608f, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2368094401510200604, guid: 51202e3c62c3d3e1c9bb0ff9c09a608f, type: 3}
propertyPath: m_LocalRotation.y
value: 0.38268343
objectReference: {fileID: 0}
- target: {fileID: 2368094401510200604, guid: 51202e3c62c3d3e1c9bb0ff9c09a608f, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2368094401510200604, guid: 51202e3c62c3d3e1c9bb0ff9c09a608f, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2368094401510200604, guid: 51202e3c62c3d3e1c9bb0ff9c09a608f, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 45
objectReference: {fileID: 0}
- target: {fileID: 2368094401510200604, guid: 51202e3c62c3d3e1c9bb0ff9c09a608f, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2892703864492016621, guid: 51202e3c62c3d3e1c9bb0ff9c09a608f, type: 3}
propertyPath: m_Name
value: Key
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 51202e3c62c3d3e1c9bb0ff9c09a608f, type: 3}
--- !u!1660057539 &9223372036854775807 --- !u!1660057539 &9223372036854775807
SceneRoots: SceneRoots:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1849,7 +2097,7 @@ SceneRoots:
- {fileID: 330585546} - {fileID: 330585546}
- {fileID: 230761406} - {fileID: 230761406}
- {fileID: 410087041} - {fileID: 410087041}
- {fileID: 832575519} - {fileID: 881234004}
- {fileID: 1363717997} - {fileID: 1363717997}
- {fileID: 1918868763} - {fileID: 1918868763}
- {fileID: 983805441} - {fileID: 983805441}
@ -1857,3 +2105,5 @@ SceneRoots:
- {fileID: 518677617} - {fileID: 518677617}
- {fileID: 584591836} - {fileID: 584591836}
- {fileID: 1632951288} - {fileID: 1632951288}
- {fileID: 7547016027398857338}
- {fileID: 1281046468}

View file

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

View file

@ -0,0 +1,57 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8e6292b2c06870d4495f009f912b9600, type: 3}
m_Name: Main Camera Profile
m_EditorClassIdentifier:
settings:
- {fileID: 2740214698417265193}
--- !u!114 &2740214698417265193
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 54ccac7a7b193e24b838948044c40846, type: 3}
m_Name: RetroPostProcessEffect
m_EditorClassIdentifier:
active: 1
enabled:
overrideState: 1
value: 1
UsesFixedResolution:
overrideState: 0
value: 0
PixelScale:
overrideState: 1
value: 4
FixedVerticalResolution:
overrideState: 1
value: 480
ColorDepth:
overrideState: 1
value: 0.15
DitherPattern:
overrideState: 1
value: {fileID: 0}
defaultState: 0
DitherPatternScale:
overrideState: 1
value: 1
DitherThreshold:
overrideState: 1
value: 0.75
DitherIntensity:
overrideState: 1
value: 0.15

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8b8055d59bd35cbc2bb1da055bbe21b2
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,36 @@
using System;
using KitsuneCafe.ItemSystem;
using UnityEngine;
namespace KitsuneCafe.Interaction
{
public class AddItem : MonoBehaviour
{
[SerializeField]
private Item item;
[SerializeField]
private int count = 1;
public void ToInventory<T>(IInventory<T> inventory) where T : IEquatable<Item>, ICountable
{
Debug.Log(inventory.Add(item, count));
}
public bool ToGameObject(GameObject gameObject)
{
if (gameObject != null && gameObject.TryGetComponent<InventoryInstance>(out var inventory))
{
ToInventory(inventory);
return false;
}
return true;
}
public void ToInteractor(IInteractor interactor)
{
ToGameObject(interactor.Root);
}
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 67cbbbb78aff08ac19b6fa07b7f41307

View file

@ -1,6 +1,6 @@
using System; using System;
using KitsuneCafe.System; using KitsuneCafe.System;
using Unity.Entities.UI; using UnityEngine;
namespace KitsuneCafe.Interaction namespace KitsuneCafe.Interaction
{ {
@ -65,7 +65,10 @@ namespace KitsuneCafe.Interaction
} }
} }
public interface IInteractor : IGameObject { } public interface IInteractor : IGameObject
{
GameObject Root { get; }
}
public interface IInteractable : IGameObject public interface IInteractable : IGameObject
{ {

View file

@ -13,6 +13,10 @@ namespace KitsuneCafe.Player
{ {
public class Interactor : MonoBehaviour, IInteractor public class Interactor : MonoBehaviour, IInteractor
{ {
[SerializeField]
private GameObject root;
public GameObject Root => root;
[SerializeField] [SerializeField]
private new Collider collider; private new Collider collider;
@ -33,13 +37,27 @@ namespace KitsuneCafe.Player
[SerializeField] [SerializeField]
private int outlineWidth = 3; private int outlineWidth = 3;
[SerializeField]
private Outline.Mode outlineMode = Outline.Mode.OutlineAll;
private readonly ObservableHashSet<IInteractable> interactables = new ObservableHashSet<IInteractable>(); private readonly ObservableHashSet<IInteractable> interactables = new ObservableHashSet<IInteractable>();
public ReactiveProperty<IInteractable> CurrentHighlightedInteractable { get; private set; } public ReactiveProperty<IInteractable> CurrentHighlightedInteractable { get; private set; }
private Vector3 lastPosition; private Vector3 lastPosition;
public new T GetComponent<T>()
{
return Root.GetComponent<T>();
}
public new bool TryGetComponent<T>(out T component)
{
return root.TryGetComponent<T>(out component);
}
void Reset() void Reset()
{ {
root = gameObject;
collider = GetComponent<Collider>(); collider = GetComponent<Collider>();
} }
@ -151,14 +169,13 @@ namespace KitsuneCafe.Player
{ {
if (interactable == null) { return; } if (interactable == null) { return; }
Outline outline; if (!interactable.TryGetComponent(out Outline outline))
if (!interactable.TryGetComponent(out outline))
{ {
outline = interactable.gameObject.AddComponent<Outline>(); outline = interactable.gameObject.AddComponent<Outline>();
outline.OutlineColor = outlineColor; outline.OutlineColor = outlineColor;
outline.OutlineWidth = outlineWidth; outline.OutlineWidth = outlineWidth;
outline.OutlineMode = Outline.Mode.OutlineVisible; outline.OutlineMode = outlineMode;
} }
outline.enabled = true; outline.enabled = true;

View file

@ -83,7 +83,7 @@ namespace KitsuneCafe.ItemSystem
bool Has(Item item); bool Has(Item item);
} }
[CreateAssetMenu(menuName = KitsuneCafeMenu.ItemMenu + "Inventory")] [CreateAssetMenu(menuName = KitsuneCafeMenu.Item + "Inventory")]
public class Inventory : ScriptableObject, IInventory<InventoryItem>, IEnumerable<InventoryItem>, IObservableCollection<InventoryItem>, ISerializationCallbackReceiver public class Inventory : ScriptableObject, IInventory<InventoryItem>, IEnumerable<InventoryItem>, IObservableCollection<InventoryItem>, ISerializationCallbackReceiver
{ {
[SerializeField] [SerializeField]
@ -179,11 +179,6 @@ namespace KitsuneCafe.ItemSystem
private IResult<int, InventoryError> AddToExisting(Item item, int count) private IResult<int, InventoryError> AddToExisting(Item item, int count)
{ {
if (!item.IsStackable)
{
return Result.Err<int, InventoryError>(InventoryError.ItemNotStackable);
}
if (count <= 0) if (count <= 0)
{ {
return Result.Err<int, InventoryError>(InventoryError.InvalidQuantity); return Result.Err<int, InventoryError>(InventoryError.InvalidQuantity);
@ -195,6 +190,11 @@ namespace KitsuneCafe.ItemSystem
if (existingItem.Equals(item)) if (existingItem.Equals(item))
{ {
if (!item.IsStackable)
{
return Result.Err<int, InventoryError>(InventoryError.ItemNotStackable);
}
var consumedAmount = existingItem.IncreaseCount(count, out var updatedItem); var consumedAmount = existingItem.IncreaseCount(count, out var updatedItem);
runtimeItems[i] = updatedItem.Value; runtimeItems[i] = updatedItem.Value;
@ -253,7 +253,7 @@ namespace KitsuneCafe.ItemSystem
{ {
if (existingItem.Count > count) if (existingItem.Count > count)
{ {
var consumedAmount = existingItem.ReduceCount(count, out var updatedItem); existingItem.ReduceCount(count, out var updatedItem);
runtimeItems[i] = updatedItem.Value; runtimeItems[i] = updatedItem.Value;
return Result.Ok<Unit, InventoryError>(Unit.Default); return Result.Ok<Unit, InventoryError>(Unit.Default);
} }

View file

@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using KitsuneCafe.System;
using UnityEngine;
namespace KitsuneCafe.ItemSystem
{
public class InventoryInstance : MonoBehaviour, IInventory<InventoryItem>
{
[SerializeField]
private Inventory inventory;
public int Capacity => inventory.Capacity;
public int Count => inventory.Count;
public IResult<Unit, InventoryError> Add(Item item, int count = 1)
{
return inventory.Add(item, count);
}
public IEnumerable<InventoryItem> Find(Func<InventoryItem, bool> predicate)
{
return inventory.Find(predicate);
}
public bool Has(Item item)
{
return inventory.Has(item);
}
public IResult<Unit, InventoryError> Remove(Item item, int count = 1)
{
return inventory.Remove(item, count);
}
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: b57786c673a3e53d0aa6fad8d47eeed5

View file

@ -14,7 +14,7 @@ namespace KitsuneCafe.ItemSystem
Tool Tool
} }
[CreateAssetMenu(menuName = KitsuneCafeMenu.ItemMenu + "Item")] [CreateAssetMenu(menuName = KitsuneCafeMenu.Item + "Item")]
public class Item : ScriptableObject public class Item : ScriptableObject
{ {
[SerializeField] [SerializeField]

View file

@ -3,7 +3,7 @@ using UnityEngine;
namespace KitsuneCafe.ItemSystem namespace KitsuneCafe.ItemSystem
{ {
[CreateAssetMenu(fileName = "NewRecipe", menuName = KitsuneCafeMenu.ItemMenu + "Recipe")] [CreateAssetMenu(fileName = "NewRecipe", menuName = KitsuneCafeMenu.Item + "Recipe")]
public class Recipe : ScriptableObject public class Recipe : ScriptableObject
{ {
[SerializeField] [SerializeField]

View file

@ -0,0 +1,52 @@
using System.Collections.Generic;
using UnityEngine;
namespace KitsuneCafe.Rendering
{
public class BillboardManager : MonoBehaviour
{
[SerializeField]
private new Transform camera;
[SerializeField]
private bool registerChildren = false;
private readonly List<Transform> transforms = new();
private void Reset()
{
camera = Camera.main.transform;
}
private void Awake()
{
if (camera == null)
{
camera = Camera.main.transform;
}
}
private void Start()
{
var count = transform.childCount;
for (int i = 0; i < count; i++)
{
Register(transform.GetChild(i));
}
}
private void Register(Transform transform)
{
transforms.Add(transform);
}
private void LateUpdate()
{
var count = transforms.Count;
for (int i = 0; i < count; i++)
{
transforms[i].forward = camera.forward;
}
}
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 39f2893c7acdb9928b0e8e9c693228ce

View file

@ -3,7 +3,7 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "BoolConstant", menuName = KitsuneCafeMenu.SoapConstantMenu + "Bool")] [CreateAssetMenu(fileName = "BoolConstant", menuName = KitsuneCafeMenu.SoapConstant + "Bool")]
public class BoolConstant : ConstantValue<string> public class BoolConstant : ConstantValue<string>
{ {
} }

View file

@ -3,7 +3,7 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "FloatConstant", menuName = KitsuneCafeMenu.SoapConstantMenu + "Float")] [CreateAssetMenu(fileName = "FloatConstant", menuName = KitsuneCafeMenu.SoapConstant + "Float")]
public class FloatConstant : ConstantValue<string> public class FloatConstant : ConstantValue<string>
{ {
} }

View file

@ -3,7 +3,7 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "IntConstant", menuName = KitsuneCafeMenu.SoapConstantMenu + "Int")] [CreateAssetMenu(fileName = "IntConstant", menuName = KitsuneCafeMenu.SoapConstant + "Int")]
public class IntConstant : ConstantValue<string> public class IntConstant : ConstantValue<string>
{ {
} }

View file

@ -3,7 +3,7 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "StringConstant", menuName = KitsuneCafeMenu.SoapConstantMenu + "String")] [CreateAssetMenu(fileName = "StringConstant", menuName = KitsuneCafeMenu.SoapConstant + "String")]
public class StringConstant : ConstantValue<string> public class StringConstant : ConstantValue<string>
{ {
} }

View file

@ -3,7 +3,7 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "Vector2Constant", menuName = KitsuneCafeMenu.SoapConstantMenu + "Vector2")] [CreateAssetMenu(fileName = "Vector2Constant", menuName = KitsuneCafeMenu.SoapConstant + "Vector2")]
public class Vector2Constant : ConstantValue<string> public class Vector2Constant : ConstantValue<string>
{ {
} }

View file

@ -3,7 +3,7 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "Vector3Constant", menuName = KitsuneCafeMenu.SoapConstantMenu + "Vector3")] [CreateAssetMenu(fileName = "Vector3Constant", menuName = KitsuneCafeMenu.SoapConstant + "Vector3")]
public class Vector3Constant : ConstantValue<string> public class Vector3Constant : ConstantValue<string>
{ {
} }

View file

@ -3,6 +3,6 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "BoolEvent", menuName = KitsuneCafeMenu.SoapEventMenu + "Bool")] [CreateAssetMenu(fileName = "BoolEvent", menuName = KitsuneCafeMenu.SoapEvent + "Bool")]
public class BoolEvent : ReactiveEvent<bool> { } public class BoolEvent : ReactiveEvent<bool> { }
} }

View file

@ -3,6 +3,6 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "FloatEvent", menuName = KitsuneCafeMenu.SoapEventMenu + "Float")] [CreateAssetMenu(fileName = "FloatEvent", menuName = KitsuneCafeMenu.SoapEvent + "Float")]
public class FloatEvent : ReactiveEvent<float> { } public class FloatEvent : ReactiveEvent<float> { }
} }

View file

@ -3,6 +3,6 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "IntEvent", menuName = KitsuneCafeMenu.SoapEventMenu + "Int")] [CreateAssetMenu(fileName = "IntEvent", menuName = KitsuneCafeMenu.SoapEvent + "Int")]
public class IntEvent : ReactiveEvent<int> { } public class IntEvent : ReactiveEvent<int> { }
} }

View file

@ -3,6 +3,6 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "StringEvent", menuName = KitsuneCafeMenu.SoapEventMenu + "String")] [CreateAssetMenu(fileName = "StringEvent", menuName = KitsuneCafeMenu.SoapEvent + "String")]
public class StringEvent : ReactiveEvent<string> { } public class StringEvent : ReactiveEvent<string> { }
} }

View file

@ -3,6 +3,6 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "UnitEvent", menuName = KitsuneCafeMenu.SoapEventMenu + "Unit")] [CreateAssetMenu(fileName = "UnitEvent", menuName = KitsuneCafeMenu.SoapEvent + "Unit")]
public class UnitEvent : ReactiveEvent<Unit> { } public class UnitEvent : ReactiveEvent<Unit> { }
} }

View file

@ -3,6 +3,6 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "Vector2Event", menuName = KitsuneCafeMenu.SoapEventMenu + "Vector2")] [CreateAssetMenu(fileName = "Vector2Event", menuName = KitsuneCafeMenu.SoapEvent + "Vector2")]
public class Vector2Event : ReactiveEvent<Vector2> { } public class Vector2Event : ReactiveEvent<Vector2> { }
} }

View file

@ -3,6 +3,6 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "Vector3Event", menuName = KitsuneCafeMenu.SoapEventMenu + "Vector3")] [CreateAssetMenu(fileName = "Vector3Event", menuName = KitsuneCafeMenu.SoapEvent + "Vector3")]
public class Vector3Event : ReactiveEvent<Vector3> { } public class Vector3Event : ReactiveEvent<Vector3> { }
} }

View file

@ -3,6 +3,6 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "BoolInputAction", menuName = KitsuneCafeMenu.SoapInputMenu + "Bool")] [CreateAssetMenu(fileName = "BoolInputAction", menuName = KitsuneCafeMenu.SoapInput + "Bool")]
public class BoolInputAction : ReactiveInputAction<bool> { } public class BoolInputAction : ReactiveInputAction<bool> { }
} }

View file

@ -3,6 +3,6 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "FloatInputAction", menuName = KitsuneCafeMenu.SoapInputMenu + "Float")] [CreateAssetMenu(fileName = "FloatInputAction", menuName = KitsuneCafeMenu.SoapInput + "Float")]
public class FloatInputAction : ReactiveInputAction<float> { } public class FloatInputAction : ReactiveInputAction<float> { }
} }

View file

@ -3,6 +3,6 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "IntInputAction", menuName = KitsuneCafeMenu.SoapInputMenu + "Int")] [CreateAssetMenu(fileName = "IntInputAction", menuName = KitsuneCafeMenu.SoapInput + "Int")]
public class IntInputAction : ReactiveInputAction<int> { } public class IntInputAction : ReactiveInputAction<int> { }
} }

View file

@ -3,6 +3,6 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "UnitInputAction", menuName = KitsuneCafeMenu.SoapInputMenu + "Unit")] [CreateAssetMenu(fileName = "UnitInputAction", menuName = KitsuneCafeMenu.SoapInput + "Unit")]
public class UnitInputAction : ReactiveInputAction<Unit> { } public class UnitInputAction : ReactiveInputAction<Unit> { }
} }

View file

@ -4,6 +4,6 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "FloatInputAction", menuName = KitsuneCafeMenu.SoapInputMenu + "Vector2")] [CreateAssetMenu(fileName = "FloatInputAction", menuName = KitsuneCafeMenu.SoapInput + "Vector2")]
public class Vector2InputAction : ReactiveInputAction<UnityEngine.Vector2> { } public class Vector2InputAction : ReactiveInputAction<UnityEngine.Vector2> { }
} }

View file

@ -3,7 +3,7 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "BoolValue", menuName = KitsuneCafeMenu.SoapValueMenu + "Bool")] [CreateAssetMenu(fileName = "BoolValue", menuName = KitsuneCafeMenu.SoapValue + "Bool")]
public class BoolValue : ReactiveValue<bool> public class BoolValue : ReactiveValue<bool>
{ {

View file

@ -3,7 +3,7 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "FloatValue", menuName = KitsuneCafeMenu.SoapValueMenu + "Float")] [CreateAssetMenu(fileName = "FloatValue", menuName = KitsuneCafeMenu.SoapValue + "Float")]
public class FloatValue : ReactiveValue<float> public class FloatValue : ReactiveValue<float>
{ {

View file

@ -3,7 +3,7 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "IntValue", menuName = KitsuneCafeMenu.SoapValueMenu + "Int")] [CreateAssetMenu(fileName = "IntValue", menuName = KitsuneCafeMenu.SoapValue + "Int")]
public class IntValue : ReactiveValue<int> public class IntValue : ReactiveValue<int>
{ {

View file

@ -3,7 +3,7 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "ItemValue", menuName = KitsuneCafeMenu.SoapValueMenu + "Item")] [CreateAssetMenu(fileName = "ItemValue", menuName = KitsuneCafeMenu.SoapValue + "Item")]
public class ItemValue : ReactiveValue<ItemValue> public class ItemValue : ReactiveValue<ItemValue>
{ {

View file

@ -3,7 +3,7 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "StringValue", menuName = KitsuneCafeMenu.SoapValueMenu + "String")] [CreateAssetMenu(fileName = "StringValue", menuName = KitsuneCafeMenu.SoapValue + "String")]
public class StringValue : ReactiveValue<string> public class StringValue : ReactiveValue<string>
{ {

View file

@ -3,7 +3,7 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "Vector2Value", menuName = KitsuneCafeMenu.SoapValueMenu + "Vector2")] [CreateAssetMenu(fileName = "Vector2Value", menuName = KitsuneCafeMenu.SoapValue + "Vector2")]
public class Vector2Value : ReactiveValue<Vector2> public class Vector2Value : ReactiveValue<Vector2>
{ {

View file

@ -3,7 +3,7 @@ using UnityEngine;
namespace KitsuneCafe.SOAP namespace KitsuneCafe.SOAP
{ {
[CreateAssetMenu(fileName = "Vector3Value", menuName = KitsuneCafeMenu.SoapValueMenu + "Vector3")] [CreateAssetMenu(fileName = "Vector3Value", menuName = KitsuneCafeMenu.SoapValue + "Vector3")]
public class Vector3Value : ReactiveValue<Vector3> public class Vector3Value : ReactiveValue<Vector3>
{ {

View file

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

View file

@ -0,0 +1,41 @@
using System;
using UnityEngine;
namespace KitsuneCafe.Scripting
{
[Serializable]
public class BindingPath
{
[SerializeField]
private string module;
public string Module => module;
[SerializeField]
private string entity;
public string Entity => entity;
public static implicit operator (string, string)(BindingPath path) => (path.Module, path.Entity);
public static implicit operator BindingPath((string, string) path) => new BindingPath(path.Item1, path.Item2);
public BindingPath(string module, string entity)
{
this.module = module;
this.entity = entity;
}
public override bool Equals(object obj)
{
return base.Equals(obj);
}
public override int GetHashCode()
{
return HashCode.Combine(module, entity);
}
public override string ToString()
{
return $"{module}:{entity}";
}
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 38efbecfc805be3c786e4103c80659ae

View file

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

View file

@ -0,0 +1,29 @@
using UnityEngine;
using UnityEditor.AssetImporters;
using System.IO;
using System.Security.Cryptography;
namespace KitsuneCafe.Scripting
{
[ScriptedImporter(1, "wasm")]
public class WasmImporter : ScriptedImporter
{
public override void OnImportAsset(AssetImportContext ctx)
{
byte[] data = File.ReadAllBytes(ctx.assetPath);
WasmAsset wasmAsset = ScriptableObject.CreateInstance<WasmAsset>();
wasmAsset.data = data;
var hash = Hash(data);
ctx.AddObjectToAsset(hash.ToString(), wasmAsset);
ctx.SetMainObject(wasmAsset);
}
private byte[] Hash(byte[] buffer)
{
using var md5 = MD5.Create();
return md5.ComputeHash(buffer);
}
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: e59d983acfd8a9f0b9ab00905bd3a44d

View file

@ -0,0 +1,39 @@
using System.Collections.Generic;
using KitsuneCafe.System;
using UnityEngine;
using Wacs.Core.Runtime;
namespace KitsuneCafe.Scripting
{
public interface IEnvironment
{
void Bind(WasmRuntime runtime, RuntimeState state);
}
public class RuntimeState : Dictionary<BindingPath, IFunctionState> { }
[CreateAssetMenu(menuName = KitsuneCafeMenu.Module + "Environment")]
public class Environment : ScriptableObject, IEnvironment
{
[SerializeField]
private List<FunctionBinding> functions = new();
public void Bind(WasmRuntime runtime, RuntimeState state)
{
BindFunctions(runtime, state);
}
private void BindFunctions(WasmRuntime runtime, RuntimeState state)
{
foreach (var fn in functions)
{
var result = fn.Bind(runtime);
if (result.IsSome)
{
state.Add(fn.BindingPath, result.Unwrap());
}
}
}
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 7fb754f9e0773ecf5b1fe29c163e1ec2

View file

@ -0,0 +1,30 @@
using KitsuneCafe.System;
using UnityEngine;
using Wacs.Core.Runtime;
using Wacs.Core.Types;
using Wacs.Core.Types.Defs;
namespace KitsuneCafe.Scripting
{
[CreateAssetMenu(menuName = KitsuneCafeMenu.ModuleBinding + "Global Value")]
public class GlobalValueBinding : ScriptableObject, IHostBinding
{
[SerializeField]
private BindingPath bindingPath;
public BindingPath BindingPath => bindingPath;
[SerializeField]
private ValType type;
public ValType Type => type;
[SerializeField]
private Mutability mutability = Mutability.Immutable;
public Mutability Mutability => mutability;
public void Bind(WasmRuntime runtime)
{
var globalType = new GlobalType(type, mutability);
//runtime.BindHostGlobal((module, entity), globalType, null);
}
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 5c303c023438bace9a083b7a9d8d799d

View file

@ -0,0 +1,9 @@
using Wacs.Core.Runtime;
namespace KitsuneCafe.Scripting
{
public interface IHostBinding
{
BindingPath BindingPath { get; }
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 2ca6d3de3e9498a5da26fefd79d7ae46

View file

@ -0,0 +1,46 @@
using KitsuneCafe.System;
using UnityEngine;
using Wacs.Core.Runtime;
using Wacs.Core.Runtime.Types;
namespace KitsuneCafe.Scripting
{
public interface IModule
{
string Name { get; }
ModuleInstance Instantiate(WasmRuntime runtime);
}
[CreateAssetMenu(menuName = KitsuneCafeMenu.Module + "Module")]
public class Module : ScriptableObject, IModule
{
[SerializeField]
private string moduleName;
public string Name => moduleName;
[SerializeField]
private WasmAsset wasm;
[SerializeField]
private bool SkipModuleValidation = false;
[SerializeField]
private bool SkipStartFunction = false;
public ModuleInstance Instantiate(WasmRuntime runtime)
{
var module = wasm.CreateModule();
var instance = runtime.InstantiateModule(module, GetRuntimeOptions());
return instance;
}
private RuntimeOptions GetRuntimeOptions()
{
return new RuntimeOptions
{
SkipModuleValidation = SkipModuleValidation,
SkipStartFunction = SkipStartFunction
};
}
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: c278fb50cca0b84469e0af15b5b75ce9

View file

@ -0,0 +1,144 @@
using System;
using System.Collections.Generic;
using KitsuneCafe.System;
using UnityEngine;
using Wacs.Core.Runtime;
using Wacs.Core.Runtime.Types;
namespace KitsuneCafe.Scripting
{
public class RuntimeInstance
{
public const string DefaultStartFunction = "main";
public readonly WasmRuntime Runtime;
public readonly Runtime Asset;
public readonly IDictionary<BindingPath, IFunctionState> State;
public RuntimeInstance(WasmRuntime runtime, Runtime asset, IDictionary<BindingPath, IFunctionState> state)
{
Runtime = runtime;
Asset = asset;
State = state;
}
public IResult<Unit, Exception> Invoke(FuncAddr addr, InvokerOptions options = null)
{
var caller = Runtime.CreateInvokerAction(addr, options);
try
{
caller();
return Result.Ok<Unit, Exception>(default);
}
catch (Exception e)
{
return Result.Err<Unit, Exception>(e);
}
}
public IResult<T, Exception> Invoke<T>(FuncAddr addr, InvokerOptions options = null)
{
var caller = Runtime.CreateInvokerFunc<T>(addr, options);
try
{
T value = caller();
return Result.Ok<T, Exception>(default);
}
catch (Exception e)
{
return Result.Err<T, Exception>(e);
}
}
public IResult<Unit, Exception> Invoke(BindingPath path, InvokerOptions options = null)
{
if (Runtime.TryGetExportedFunction(path, out var addr))
{
return Invoke(addr, options);
}
return Result.Err<Unit, Exception>(new ArgumentException($"No such function \"{path}\""));
}
public IResult<T, Exception> Invoke<T>(BindingPath path, InvokerOptions options = null)
{
if (Runtime.TryGetExportedFunction(path, out var addr))
{
return Invoke<T>(addr, options);
}
return Result.Err<T, Exception>(new ArgumentException($"No such function \"{path}\""));
}
public IResult<Unit, Exception> Start(ModuleInstance module, InvokerOptions options = null)
{
return Invoke(module.StartFunc, options);
}
public IResult<Unit, Exception> Start(string moduleName, InvokerOptions options = null)
{
return Start(Runtime.GetModule(moduleName), options);
}
public IResult<Unit, Exception> Start(Module module, InvokerOptions options = null)
{
return Start(module.Name, options);
}
public IResult<Unit, Exception> Start(InvokerOptions options = null)
{
if (Asset.Modules.Count != 1)
{
return Result.Err<Unit, Exception>(new ArgumentException("Runtime has more than one module registered. Specify the module to start."));
}
return Start(Asset.Modules[0], options);
}
}
[CreateAssetMenu(menuName = KitsuneCafeMenu.Module + "Runtime")]
public class Runtime : ScriptableObject
{
[SerializeField]
private RuntimeAttributes attributes = new();
public RuntimeAttributes Attributes => attributes;
[SerializeField]
private List<Environment> environments = new();
public List<Environment> Environments => environments;
[SerializeField]
private List<Module> modules = new();
public List<Module> Modules => modules;
public RuntimeInstance Instantiate()
{
var runtime = new WasmRuntime(attributes);
var state = BindEnvironments(runtime);
RegisterModules(runtime);
return new RuntimeInstance(runtime, this, state);
}
private RuntimeState BindEnvironments(WasmRuntime runtime)
{
var state = new RuntimeState();
foreach (var env in environments)
{
env.Bind(runtime, state);
}
return state;
}
private void RegisterModules(WasmRuntime runtime)
{
foreach (var module in modules)
{
var instance = module.Instantiate(runtime);
runtime.RegisterModule(module.Name, instance);
}
}
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: e6dc78199a8464287bf7cf7e9e8ff4d3

View file

@ -0,0 +1,47 @@
using System;
using System.Text;
using KitsuneCafe.System;
using UnityEngine;
using Wacs.Core.Runtime;
namespace KitsuneCafe.Scripting
{
public interface IFunctionBinding : IHostBinding
{
IOption<IFunctionState> Bind(WasmRuntime runtime);
}
public interface IFunctionState { }
public abstract class FunctionBinding : ScriptableObject, IFunctionBinding
{
public abstract BindingPath BindingPath { get; }
public abstract IOption<IFunctionState> Bind(WasmRuntime runtime);
}
[CreateAssetMenu(menuName = KitsuneCafeMenu.ModuleFunctionBinding + "SayC")]
public class SayCBinding : FunctionBinding
{
public class State : IFunctionState
{
public StringBuilder Output = new();
}
public static readonly BindingPath SayCBindingPath = new("env", "sayc");
public override BindingPath BindingPath => SayCBindingPath;
public override IOption<IFunctionState> Bind(WasmRuntime runtime)
{
var state = new State();
runtime.BindHostFunction<Action<char>>(BindingPath, c =>
{
state.Output.Append(c);
});
return Option.Some(state as IFunctionState);
}
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: a1d86ab1e1c07c78fbb94a44dbb50503

View file

@ -0,0 +1,37 @@
using UnityEngine;
using Wacs.Core.Runtime;
namespace KitsuneCafe.Scripting
{
public class ScriptRunner : MonoBehaviour
{
[SerializeField]
private Runtime runtime;
private RuntimeInstance instance;
private void Start()
{
instance = runtime.Instantiate();
var options = new InvokerOptions
{
LogGas = false,
LogProgressEvery = 0,
LogInstructionExecution = InstructionLogging.None,
CalculateLineNumbers = false,
CollectStats = StatsDetail.None,
};
var result = instance.Invoke<Value>(("hello", "main"), options);
Debug.Log(result);
if (instance.State.TryGetValue(SayCBinding.SayCBindingPath, out var state))
{
var fs = (SayCBinding.State)state;
Debug.Log(fs.Output.ToString());
}
}
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 5e6501e4bc0241358b4d83a9582abc18

View file

@ -0,0 +1,18 @@
using System.IO;
using UnityEngine;
using Wacs.Core;
namespace KitsuneCafe.Scripting
{
public class WasmAsset : ScriptableObject
{
[HideInInspector]
public byte[] data;
public Wacs.Core.Module CreateModule()
{
var stream = new MemoryStream(data);
return BinaryModuleParser.ParseWasm(stream);
}
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: f53e932dba967987a966cd31ac42e9d6

View file

@ -2,13 +2,20 @@ namespace KitsuneCafe.System
{ {
public static class KitsuneCafeMenu public static class KitsuneCafeMenu
{ {
public const string BaseMenu = "KitsuneCafe/"; public const string Base = "KitsuneCafe/";
public const string ItemMenu = BaseMenu + "Item/"; public const string Item = Base + "Item/";
public const string SoapMenu = BaseMenu + "SOAP/";
public const string SoapConstantMenu = SoapMenu + "Constant/"; public const string Module = Base + "Module/";
public const string SoapValueMenu = SoapMenu + "Value/"; public const string ModuleBinding = Module + "Binding/";
public const string SoapEventMenu = SoapMenu + "Event/"; public const string ModuleFunctionBinding = ModuleBinding + "Function/";
public const string SoapInputMenu = SoapMenu + "Input/";
public const string Soap = Base + "SOAP/";
public const string SoapConstant = Soap + "Constant/";
public const string SoapValue = Soap + "Value/";
public const string SoapEvent = Soap + "Event/";
public const string SoapInput = Soap + "Input/";
public const string Ui = Base + "UI/";
public const string UiElement = Ui + "Element/";
} }
} }

View file

@ -2,6 +2,12 @@ using System;
namespace KitsuneCafe.System namespace KitsuneCafe.System
{ {
public class Option
{
public static IOption<T> Some<T>(T value) => IOption<T>.Some(value);
public static IOption<T> None<T>() => IOption<T>.None();
}
public interface IOption<T> public interface IOption<T>
{ {
private static IOption<T> none = new None<T>(); private static IOption<T> none = new None<T>();

View file

@ -0,0 +1,15 @@
using UnityEngine;
using UnityEngine.Pool;
namespace KitsuneCafe.System
{
public class PooledObject : MonoBehaviour
{
public IObjectPool<GameObject> objectPool;
public void Release()
{
objectPool.Release(gameObject);
}
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: e7e9e49bc72f0c26598faa7e0d34036e

View file

@ -1,37 +0,0 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UIElements;
using UnityEngine.AddressableAssets;
using UnityEngine.ResourceManagement.AsyncOperations;
using System.Threading.Tasks;
using UnityEditor;
using Unity.Rendering;
using System;
using Unity.Multiplayer.Center.Common;
using System.Collections;
// https://docs.unity3d.com/6000.1/Documentation/ScriptReference/UIElements.ListView.html
namespace UnityEngine.UIElements
{
[UxmlElement]
public partial class RecycleView : ListView
{
[UxmlAttribute]
private int bufferedItems = 2;
public RecycleView() : base()
{
Initialize();
}
public RecycleView(IList itemsSource, int itemHeight, Func<VisualElement> makeItem, Action<VisualElement, int> bindItem) : base(itemsSource, itemHeight, makeItem, bindItem)
{
Initialize();
}
public void Initialize()
{
}
}
}

View file

@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 9ed9e942d99434ac0b1088708aceada8

View file

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

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