├── .github └── workflows │ └── publish-release.yml ├── .gitignore ├── Cargo.toml ├── LICENSE ├── README.md ├── pkg ├── codegen │ ├── Cargo.toml │ └── codegen.rs ├── inbuilt │ ├── Cargo.toml │ ├── entity.rs │ ├── guid.rs │ ├── inbuilt.rs │ ├── parent.rs │ └── transform.rs ├── unrust-proc-macro │ ├── Cargo.toml │ └── macro.rs └── unrust │ ├── Cargo.toml │ ├── build.rs │ ├── loader.rs │ ├── logger.rs │ ├── unity.rs │ └── unrust.rs └── unity ├── example ├── .gitignore ├── .vscode │ └── settings.json ├── Assets │ ├── Materials.meta │ ├── Materials │ │ ├── Child.mat │ │ ├── Child.mat.meta │ │ ├── Cube.mat │ │ ├── Cube.mat.meta │ │ ├── Plane.mat │ │ └── Plane.mat.meta │ ├── Prefabs.meta │ ├── Prefabs │ │ ├── Cube.prefab │ │ └── Cube.prefab.meta │ ├── Resources.meta │ ├── Resources │ │ ├── cube.spawn.toml │ │ └── cube.spawn.toml.meta │ ├── SceneDependencyCache.meta │ ├── SceneDependencyCache │ │ ├── 10c62e686247829eb83720d5f2d23e5e.sceneWithBuildSettings │ │ ├── 10c62e686247829eb83720d5f2d23e5e.sceneWithBuildSettings.meta │ │ ├── 15f73afd11965dbcb277a8bc8d8b8885.sceneWithBuildSettings │ │ ├── 15f73afd11965dbcb277a8bc8d8b8885.sceneWithBuildSettings.meta │ │ ├── 2ca213750c0457fec470e7a525b74508.sceneWithBuildSettings │ │ ├── 2ca213750c0457fec470e7a525b74508.sceneWithBuildSettings.meta │ │ ├── 55b724de09ed93dc8e0a79e8d1193a71.sceneWithBuildSettings │ │ ├── 55b724de09ed93dc8e0a79e8d1193a71.sceneWithBuildSettings.meta │ │ ├── a79cc978f0c4e5d6e6ef8659e30ad42f.sceneWithBuildSettings │ │ ├── a79cc978f0c4e5d6e6ef8659e30ad42f.sceneWithBuildSettings.meta │ │ ├── b6abdafbe884057361634cf5fa1aa1fb.sceneWithBuildSettings │ │ └── b6abdafbe884057361634cf5fa1aa1fb.sceneWithBuildSettings.meta │ ├── Scenes.meta │ ├── Scenes │ │ ├── ECS.meta │ │ ├── ECS │ │ │ ├── ECS_HelloCube.unity │ │ │ ├── ECS_HelloCube.unity.meta │ │ │ ├── ECS_HelloCubeEnableable.unity │ │ │ ├── ECS_HelloCubeEnableable.unity.meta │ │ │ ├── ECS_HelloCubeParenting.unity │ │ │ ├── ECS_HelloCubeParenting.unity.meta │ │ │ ├── ECS_HelloCubePrefabs.unity │ │ │ └── ECS_HelloCubePrefabs.unity.meta │ │ ├── HelloCube.unity │ │ ├── HelloCube.unity.meta │ │ ├── HelloCubeEnableable.unity │ │ ├── HelloCubeEnableable.unity.meta │ │ ├── HelloCubeParenting.unity │ │ ├── HelloCubeParenting.unity.meta │ │ ├── HelloCubePrefabs.unity │ │ └── HelloCubePrefabs.unity.meta │ ├── Settings.meta │ ├── Settings │ │ ├── High_PipelineAsset.asset │ │ ├── High_PipelineAsset.asset.meta │ │ ├── High_PipelineAsset_ForwardRenderer.asset │ │ ├── High_PipelineAsset_ForwardRenderer.asset.meta │ │ ├── Low_PipelineAsset.asset │ │ ├── Low_PipelineAsset.asset.meta │ │ ├── Low_PipelineAsset_ForwardRenderer.asset │ │ ├── Low_PipelineAsset_ForwardRenderer.asset.meta │ │ ├── Medium_PipelineAsset.asset │ │ ├── Medium_PipelineAsset.asset.meta │ │ ├── Medium_PipelineAsset_ForwardRenderer.asset │ │ ├── Medium_PipelineAsset_ForwardRenderer.asset.meta │ │ ├── Very High_PipelineAsset.asset │ │ ├── Very High_PipelineAsset.asset.meta │ │ ├── Very High_PipelineAsset_ForwardRenderer.asset │ │ ├── Very High_PipelineAsset_ForwardRenderer.asset.meta │ │ ├── Very Low_PipelineAsset.asset │ │ ├── Very Low_PipelineAsset.asset.meta │ │ ├── Very Low_PipelineAsset_ForwardRenderer.asset │ │ └── Very Low_PipelineAsset_ForwardRenderer.asset.meta │ ├── URPAsset.asset │ ├── URPAsset.asset.meta │ ├── URPAsset_Renderer.asset │ ├── URPAsset_Renderer.asset.meta │ ├── UniversalRenderPipelineGlobalSettings.asset │ ├── UniversalRenderPipelineGlobalSettings.asset.meta │ ├── unrust.meta │ └── unrust │ │ ├── CubePrefabsAuthoring.cs │ │ ├── CubePrefabsAuthoring.cs.meta │ │ ├── DoRotateAuthoring.cs │ │ ├── DoRotateAuthoring.cs.meta │ │ ├── GameStateAuthoring.cs │ │ ├── GameStateAuthoring.cs.meta │ │ ├── UnrustComponent.cs │ │ ├── UnrustComponent.cs.meta │ │ ├── UnrustGame.asmdef │ │ ├── UnrustGame.asmdef.meta │ │ ├── UnrustHooks.cs │ │ ├── UnrustHooks.cs.meta │ │ ├── UnrustState.cs │ │ ├── UnrustState.cs.meta │ │ ├── libgame.so.meta │ │ ├── unrustGameSettings.asset │ │ └── unrustGameSettings.asset.meta ├── Packages │ ├── manifest.json │ └── packages-lock.json ├── ProjectSettings │ ├── AudioManager.asset │ ├── ClusterInputManager.asset │ ├── DynamicsManager.asset │ ├── EditorBuildSettings.asset │ ├── EditorSettings.asset │ ├── EntitiesClientSettings.asset │ ├── GraphicsSettings.asset │ ├── InputManager.asset │ ├── MemorySettings.asset │ ├── NavMeshAreas.asset │ ├── PackageManagerSettings.asset │ ├── Packages │ │ └── com.unity.testtools.codecoverage │ │ │ └── Settings.json │ ├── Physics2DSettings.asset │ ├── PresetManager.asset │ ├── ProjectSettings.asset │ ├── ProjectVersion.txt │ ├── QualitySettings.asset │ ├── SceneTemplateSettings.json │ ├── ShaderGraphSettings.asset │ ├── TagManager.asset │ ├── TimeManager.asset │ ├── URPProjectSettings.asset │ ├── UnityConnectSettings.asset │ ├── VFXManager.asset │ ├── VersionControlSettings.asset │ └── XRSettings.asset └── game │ ├── Cargo.lock │ ├── Cargo.toml │ ├── build.rs │ └── src │ ├── hello_cube_enableable.rs │ ├── hello_cube_parenting.rs │ ├── hello_cube_prefab.rs │ ├── hello_cube_simple.rs │ ├── lib.rs │ └── types.rs └── sdk ├── Editor.meta ├── Editor ├── Build.cs ├── Build.cs.meta ├── UnrustEditor.asmdef └── UnrustEditor.asmdef.meta ├── Runtime.meta ├── Runtime ├── InbuiltGenerated.cs ├── InbuiltGenerated.cs.meta ├── UnrustAuthoring.cs ├── UnrustAuthoring.cs.meta ├── UnrustBaker.cs ├── UnrustBaker.cs.meta ├── UnrustLoader.cs ├── UnrustLoader.cs.meta ├── UnrustNative.cs ├── UnrustNative.cs.meta ├── UnrustPrefabs.cs ├── UnrustPrefabs.cs.meta ├── UnrustRuntime.asmdef ├── UnrustRuntime.asmdef.meta ├── UnrustSettings.cs ├── UnrustSettings.cs.meta ├── UnrustSystem.cs └── UnrustSystem.cs.meta ├── package.json ├── package.json.meta └── template~ ├── Cargo.toml.template ├── UnrustGame.asmdef ├── build.rs.template ├── src ├── lib.rs.template └── types.rs.template └── unrustGameSettings.asset /.github/workflows/publish-release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | on: 3 | workflow_dispatch: 4 | inputs: 5 | release_tag: 6 | required: true 7 | 8 | jobs: 9 | cargo-publish: 10 | permissions: write-all 11 | name: Publish Cargo 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Check out the code 15 | uses: actions/checkout@v3 16 | 17 | - uses: actions/cache@v3 18 | with: 19 | path: | 20 | ~/.cargo/bin/ 21 | ~/.cargo/registry/index/ 22 | ~/.cargo/registry/cache/ 23 | ~/.cargo/git/db/ 24 | target/ 25 | key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} 26 | 27 | - name: Install latest nightly 28 | uses: actions-rs/toolchain@v1 29 | with: 30 | toolchain: nightly 31 | override: true 32 | 33 | - name: Update version strings and check if it builds 34 | run: | 35 | export VERSION=${{ github.event.inputs.release_tag }} 36 | sed -i "s/0.0.0/$VERSION/g" ./pkg/unrust/Cargo.toml 37 | sed -i "s/0.0.0/$VERSION/g" ./pkg/unrust-proc-macro/Cargo.toml 38 | sed -i "s/0.0.0/$VERSION/g" ./pkg/inbuilt/Cargo.toml 39 | sed -i "s/0.0.0/$VERSION/g" ./pkg/codegen/Cargo.toml 40 | cargo build -p unrust 41 | 42 | - name: Publish to crates! 43 | env: 44 | CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }} 45 | run: | 46 | cargo publish -p unrust-proc-macro --allow-dirty --token $CRATES_TOKEN 47 | cargo publish -p unrust-inbuilt --allow-dirty --token $CRATES_TOKEN 48 | cargo publish -p unrust-codegen --allow-dirty --token $CRATES_TOKEN 49 | cargo publish -p unrust --allow-dirty --token $CRATES_TOKEN 50 | 51 | - name: Unity sdk template update 52 | run: | 53 | export VERSION=${{ github.event.inputs.release_tag }} 54 | sed -i "s/0.0.0/$VERSION/g" ./unity/sdk/template~/Cargo.toml.template 55 | sed -i "s/0.0.0/$VERSION/g" ./unity/sdk/package.json 56 | 57 | - name: Setup node 58 | uses: actions/setup-node@v3 59 | with: 60 | node-version: 18 61 | 62 | - name: Unity sdk tarball 63 | run: | 64 | npm pack ./unity/sdk 65 | 66 | - name: Upload sdk 67 | uses: actions/upload-artifact@v3 68 | with: 69 | name: unrust-sdk-${{ github.event.inputs.release_tag }} 70 | path: com.wavefunk.unrust-${{ github.event.inputs.release_tag }}.tgz 71 | 72 | - uses: actions/github-script@v6 73 | with: 74 | script: | 75 | github.rest.git.createRef({ 76 | owner: context.repo.owner, 77 | repo: context.repo.repo, 78 | ref: 'refs/tags/release-v${{ github.event.inputs.release_tag }}', 79 | sha: context.sha 80 | }) 81 | 82 | - name: Release 83 | uses: softprops/action-gh-release@v1 84 | with: 85 | draft: true 86 | name: unrust-sdk-${{ github.event.inputs.release_tag }} 87 | tag_name: release-v${{ github.event.inputs.release_tag }} 88 | fail_on_unmatched_files: true 89 | files: com.wavefunk.unrust-${{ github.event.inputs.release_tag }}.tgz 90 | 91 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /Cargo.lock 3 | *.so 4 | x64/ 5 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | resolver = "2" 3 | 4 | members = [ 5 | "pkg/*" 6 | ] 7 | 8 | [workspace.dependencies] 9 | parking_lot = "0.12" 10 | tracing = "0.1" 11 | tracing-subscriber = "0.3" 12 | anyhow = "1" 13 | thiserror = "1.0" 14 | bevy = { version = "0.11.0", default-features = false , features = ["multi-threaded", "trace", "bevy_asset", "filesystem_watcher" ]} 15 | 16 | [patch.crates-io] 17 | genco = { git = "https://github.com/udoprog/genco", branch = "proc-macro2-fork" } 18 | proc-macro2 = { git = "https://github.com/udoprog/proc-macro2", branch = "span-locations" } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Sandeep Nambiar 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ![Crates.io](https://img.shields.io/crates/v/unrust?link=https%3A%2F%2Fcrates.io%2Fcrates%2Funrust) 3 | # Unrust - Rust + Bevy + Unity to make games! 4 | ![Peek 2023-08-27 18-20](https://github.com/gamedolphin/unrust/assets/7590634/17b9e2a9-e0a1-4891-82a3-133fa32e86ec) 5 | 6 | You want to use Rust + Bevy to make your games. But you miss a good editor to go with it? 7 | 8 | Well this is a zero level attempt to use Unity as the editor. You setup your scenes and prefabs using unity. 9 | 10 | And then everything else is done in your rust codebase. GG EZ. 11 | 12 | (only works on Unity 2022, LINUX . windows and mac soon) 13 | 14 | Also requires entities + entities graphics packages. Maps unity entities to bevy entities. Does not work with gameobjects yet. 15 | 16 | This is VERY VERY VERY experimental. There's a ton of work to add more component syncronization and improved devx. 17 | 18 | I'll be adding docs soon, but if you do not mind wading into some undocumented rust + c# code, you're welcome to contribute! 19 | 20 | ## Documentation 21 | 22 | TODO! 23 | 24 | 25 | ## Installation 26 | 27 | Download the tarball from releases on the left, and it to a unity project. 28 | It would/should create a `game` folder besides the Asset folder with a basic project. 29 | Hit unrust -> Compile in the unity project menu, and press play. 30 | 31 | Requires rust nightly (to properly place the output library path and for codegen) 32 | 33 | ## Usage/Examples 34 | 35 | Defining a new struct with `unity_authoring` attribute in the `types.rs` file would also generate a corresponding Authoring component in the unity Assets/unrust folder. You can then attach this to an entity to have it be created in the bevy world too on play. 36 | 37 | ```rust 38 | #[unity_authoring] 39 | pub struct SampleComponent { 40 | pub val: f32, 41 | } 42 | ``` 43 | 44 | ```csharp 45 | using System.Runtime.InteropServices; 46 | using Unity.Entities; 47 | using UnityEngine; 48 | 49 | namespace unrust.userland 50 | { 51 | [StructLayout(LayoutKind.Sequential)] 52 | public struct SampleComponent : IComponentData 53 | { 54 | public float speed; 55 | } 56 | 57 | public class SampleComponentAuthoring : MonoBehaviour 58 | { 59 | public float speed; 60 | 61 | class Baker : Baker 62 | { 63 | public override void Bake(SampleComponentAuthoring authoring) 64 | { 65 | var entity = GetEntity(TransformUsageFlags.Dynamic); 66 | AddComponent(entity, new SampleComponent 67 | { 68 | speed = authoring.speed, 69 | }); 70 | } 71 | } 72 | } 73 | } 74 | 75 | ``` 76 | ## TODOS 77 | 78 | - Additional platform support 79 | 80 | - Add more built-in types. (Only transform and parents are synced right now) 81 | 82 | - Handle inputs 83 | 84 | - Handle camera / other non-ecs gameobjects. 85 | 86 | - Wasm?! 87 | 88 | 89 | ## License 90 | 91 | [MIT](https://choosealicense.com/licenses/mit/) 92 | 93 | -------------------------------------------------------------------------------- /pkg/codegen/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "unrust-codegen" 3 | description = "The csharp codegenerator used by unrust." 4 | version = "0.0.0" 5 | edition = "2021" 6 | license = "MIT" 7 | 8 | [lib] 9 | path = "codegen.rs" 10 | 11 | [dependencies] 12 | anyhow.workspace = true 13 | syn = { version = "2", features = ["full"] } 14 | inbuilt = { path = "../inbuilt", package = "unrust-inbuilt" , version = "0.0.0" } 15 | genco = "0.17.5" -------------------------------------------------------------------------------- /pkg/inbuilt/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "unrust-inbuilt" 3 | description = "Inbuilt types common between unity and bevy used by unrust." 4 | version = "0.0.0" 5 | edition = "2021" 6 | license = "MIT" 7 | 8 | [lib] 9 | path = "inbuilt.rs" 10 | 11 | [build-dependencies] 12 | anyhow.workspace = true 13 | syn = { version = "2.0", features = ["full"] } 14 | quote = "1" 15 | proc-macro2 = "1" 16 | genco = "0.17.5" 17 | 18 | [dependencies] 19 | bevy.workspace = true 20 | parking_lot.workspace = true 21 | tracing.workspace = true 22 | anyhow.workspace = true 23 | thiserror.workspace = true 24 | unrust-proc-macro = { path = "../unrust-proc-macro" , version = "0.0.0" } 25 | genco = "0.17.5" -------------------------------------------------------------------------------- /pkg/inbuilt/entity.rs: -------------------------------------------------------------------------------- 1 | use genco::prelude::*; 2 | use unrust_proc_macro::unity_authoring; 3 | 4 | #[unity_authoring] 5 | pub struct UnityEntity { 6 | pub index: i32, 7 | pub version: i32, 8 | } 9 | 10 | #[allow(non_snake_case)] 11 | pub fn UnityEntity_ingest_component(_entity: &mut bevy::ecs::world::EntityMut, _val: &UnityEntity) { 12 | } 13 | 14 | #[allow(non_snake_case)] 15 | pub fn UnityEntity_CSHARP_TOKEN() -> csharp::Tokens { 16 | quote! { 17 | [StructLayout(LayoutKind.Sequential)] 18 | public struct UnityEntity 19 | { 20 | public int Index; 21 | public int Version; 22 | 23 | public static implicit operator Unity.Entities.Entity(UnityEntity val) => new Unity.Entities.Entity 24 | { 25 | Index = val.Index, 26 | Version = val.Version, 27 | }; 28 | 29 | public static implicit operator UnityEntity(Unity.Entities.Entity val) => new UnityEntity 30 | { 31 | Index = val.Index, 32 | Version = val.Version, 33 | }; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /pkg/inbuilt/guid.rs: -------------------------------------------------------------------------------- 1 | use genco::prelude::*; 2 | use unrust_proc_macro::unity_authoring; 3 | 4 | #[unity_authoring] 5 | pub struct UnityGUID { 6 | pub hash: [u32; 4], 7 | } 8 | 9 | #[allow(non_snake_case)] 10 | pub fn UnityGUID_ingest_component(entity: &mut bevy::ecs::world::EntityMut, val: &UnityGUID) { 11 | entity.insert(*val); 12 | } 13 | 14 | #[allow(non_snake_case)] 15 | pub fn UnityGUID_CSHARP_TOKEN() -> csharp::Tokens { 16 | quote! { 17 | [StructLayout(LayoutKind.Sequential)] 18 | public unsafe struct UnityGUID 19 | { 20 | public fixed uint hash[4]; 21 | 22 | public static implicit operator Unity.Entities.Serialization.EntityPrefabReference(UnityGUID val) => new Unity.Entities.Serialization.EntityPrefabReference(new Unity.Entities.Hash128(val.hash[0], val.hash[1], val.hash[2], val.hash[3])); 23 | 24 | public static implicit operator UnityGUID(Unity.Entities.Serialization.EntityPrefabReference val) 25 | { 26 | var guid = new UnityGUID(); 27 | var hashes = val.AssetGUID.Value; 28 | guid.hash[0] = hashes[0]; 29 | guid.hash[1] = hashes[1]; 30 | guid.hash[2] = hashes[2]; 31 | guid.hash[3] = hashes[3]; 32 | return guid; 33 | } 34 | } 35 | 36 | [StructLayout(LayoutKind.Sequential)] 37 | public unsafe struct UnityPrefab 38 | { 39 | public int ResourceID; 40 | public UnityEntity* Guid; 41 | public nuint Length; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /pkg/inbuilt/inbuilt.rs: -------------------------------------------------------------------------------- 1 | mod entity; 2 | mod guid; 3 | mod parent; 4 | mod transform; 5 | use genco::fmt; 6 | use genco::prelude::*; 7 | use std::fs::File; 8 | 9 | use bevy::ecs::world::EntityMut; 10 | pub use entity::*; 11 | pub use guid::*; 12 | pub use parent::*; 13 | pub use transform::*; 14 | use unrust_proc_macro::generate_inbuilt; 15 | 16 | generate_inbuilt!((UnityParent, UnityEntity, UnityGUID, UnityTransform)); 17 | 18 | pub fn write_csharp_inbuilt(path: &str) -> anyhow::Result<()> { 19 | let struct_layout = &csharp::import("System.Runtime.InteropServices", "StructLayout"); 20 | let layout_kind = &csharp::import("System.Runtime.InteropServices", "LayoutKind"); 21 | let unity_types = UNITY_TYPES; 22 | let unity_union = UNITY_UNION; 23 | let unity_count = UNITY_COUNT; 24 | let inbuilt_tokens = get_inbuilt_csharp_tokens(); 25 | let output: csharp::Tokens = genco::prelude::quote! { 26 | namespace unrust.runtime 27 | { 28 | $(for n in inbuilt_tokens => $n) 29 | 30 | [$struct_layout($layout_kind.Sequential)] 31 | public struct UnityData 32 | { 33 | public UnityTypes ty; 34 | public UnityComponents value; 35 | } 36 | 37 | public enum UnityTypes : sbyte 38 | { 39 | $(unity_types) 40 | } 41 | 42 | [$struct_layout($layout_kind.Explicit)] 43 | public unsafe struct UnityComponents 44 | { 45 | public const int ComponentCount = $unity_count; 46 | 47 | $(unity_union) 48 | } 49 | 50 | [$struct_layout($layout_kind.Sequential)] 51 | public unsafe struct EntityData 52 | { 53 | public UnityEntity entity; 54 | public UnityData* data; 55 | public nuint len; 56 | } 57 | } 58 | }; 59 | 60 | let fmt = fmt::Config::from_lang::().with_indentation(fmt::Indentation::Space(4)); 61 | let config = csharp::Config::default(); 62 | 63 | let file = File::create(path)?; 64 | let mut w = fmt::IoWriter::new(file); 65 | output.format_file(&mut w.as_formatter(&fmt), &config)?; 66 | 67 | Ok(()) 68 | } 69 | -------------------------------------------------------------------------------- /pkg/inbuilt/parent.rs: -------------------------------------------------------------------------------- 1 | use bevy::prelude::*; 2 | use genco::prelude::*; 3 | use unrust_proc_macro::unity_authoring; 4 | 5 | #[unity_authoring] 6 | pub struct UnityParent { 7 | pub entity: u64, 8 | } 9 | 10 | impl From for UnityParent { 11 | fn from(value: Entity) -> Self { 12 | UnityParent { 13 | entity: value.to_bits(), 14 | } 15 | } 16 | } 17 | 18 | impl From<&UnityParent> for Entity { 19 | fn from(value: &UnityParent) -> Self { 20 | Self::from_bits(value.entity) 21 | } 22 | } 23 | 24 | impl From for Entity { 25 | fn from(value: UnityParent) -> Self { 26 | Self::from_bits(value.entity) 27 | } 28 | } 29 | 30 | #[allow(non_snake_case)] 31 | pub fn UnityParent_ingest_component(entity: &mut bevy::ecs::world::EntityMut, val: &UnityParent) { 32 | entity.set_parent(val.into()); 33 | entity.insert(*val); 34 | } 35 | 36 | #[allow(non_snake_case)] 37 | pub fn UnityParent_CSHARP_TOKEN() -> csharp::Tokens { 38 | quote! { 39 | [StructLayout(LayoutKind.Sequential)] 40 | public unsafe struct UnityParent 41 | { 42 | public ulong parent; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /pkg/inbuilt/transform.rs: -------------------------------------------------------------------------------- 1 | use bevy::prelude::*; 2 | use genco::prelude::*; 3 | use unrust_proc_macro::unity_authoring; 4 | 5 | #[unity_authoring] 6 | pub struct UnityTransform { 7 | pub mat: [f32; 16], 8 | } 9 | 10 | #[allow(non_snake_case)] 11 | pub fn UnityTransform_ingest_component( 12 | entity: &mut bevy::ecs::world::EntityMut, 13 | val: &UnityTransform, 14 | ) { 15 | let bundle = 16 | TransformBundle::from_transform(Transform::from_matrix(Mat4::from_cols_array(&val.mat))); 17 | entity.insert(bundle); 18 | } 19 | 20 | impl From for Transform { 21 | fn from(value: UnityTransform) -> Self { 22 | Transform::from_matrix(Mat4::from_cols_array(&value.mat)) 23 | } 24 | } 25 | 26 | impl From for UnityTransform { 27 | fn from(value: Transform) -> Self { 28 | UnityTransform { 29 | mat: value.compute_matrix().to_cols_array(), 30 | } 31 | } 32 | } 33 | 34 | impl From<&Transform> for UnityTransform { 35 | fn from(value: &Transform) -> Self { 36 | UnityTransform { 37 | mat: value.compute_matrix().to_cols_array(), 38 | } 39 | } 40 | } 41 | 42 | impl From<&GlobalTransform> for UnityTransform { 43 | fn from(value: &GlobalTransform) -> Self { 44 | UnityTransform { 45 | mat: value.compute_matrix().to_cols_array(), 46 | } 47 | } 48 | } 49 | 50 | #[allow(non_snake_case)] 51 | pub fn UnityTransform_CSHARP_TOKEN() -> csharp::Tokens { 52 | quote! { 53 | [StructLayout(LayoutKind.Sequential)] 54 | public unsafe struct UnityTransform 55 | { 56 | public fixed float matrix[16]; 57 | 58 | public static implicit operator Unity.Transforms.LocalTransform(UnityTransform val) => Unity.Transforms.LocalTransform.FromMatrix(new Unity.Mathematics.float4x4( 59 | val.matrix[0], val.matrix[4], val.matrix[8], val.matrix[12], 60 | val.matrix[1], val.matrix[5], val.matrix[9], val.matrix[13], 61 | val.matrix[2], val.matrix[6], val.matrix[10], val.matrix[14], 62 | val.matrix[3], val.matrix[7], val.matrix[11], val.matrix[15] 63 | )); 64 | 65 | public static implicit operator Unity.Transforms.LocalToWorld(UnityTransform val) => new Unity.Transforms.LocalToWorld 66 | { 67 | Value = new Unity.Mathematics.float4x4( 68 | val.matrix[0], val.matrix[4], val.matrix[8], val.matrix[12], 69 | val.matrix[1], val.matrix[5], val.matrix[9], val.matrix[13], 70 | val.matrix[2], val.matrix[6], val.matrix[10], val.matrix[14], 71 | val.matrix[3], val.matrix[7], val.matrix[11], val.matrix[15] 72 | ) 73 | }; 74 | 75 | 76 | public static implicit operator UnityTransform(Unity.Transforms.LocalTransform output) 77 | { 78 | var transform = new UnityTransform(); 79 | var val = output.ToMatrix(); 80 | transform.matrix[0] = val.c0[0]; 81 | transform.matrix[1] = val.c0[1]; 82 | transform.matrix[2] = val.c0[2]; 83 | transform.matrix[3] = val.c0[3]; 84 | transform.matrix[4] = val.c1[0]; 85 | transform.matrix[5] = val.c1[1]; 86 | transform.matrix[6] = val.c1[2]; 87 | transform.matrix[7] = val.c1[3]; 88 | transform.matrix[8] = val.c2[0]; 89 | transform.matrix[9] = val.c2[1]; 90 | transform.matrix[10] = val.c2[2]; 91 | transform.matrix[11] = val.c2[3]; 92 | transform.matrix[12] = val.c3[0]; 93 | transform.matrix[13] = val.c3[1]; 94 | transform.matrix[14] = val.c3[2]; 95 | transform.matrix[15] = val.c3[3]; 96 | 97 | return transform; 98 | } 99 | } 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /pkg/unrust-proc-macro/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "unrust-proc-macro" 3 | description = "The unrust proc macro crate." 4 | version = "0.0.0" 5 | edition = "2021" 6 | license = "MIT" 7 | 8 | [lib] 9 | proc-macro = true 10 | path = "macro.rs" 11 | 12 | [dependencies] 13 | quote = "1" 14 | syn = { version = "2.0", features = ["full"] } 15 | proc-macro2 = "1" -------------------------------------------------------------------------------- /pkg/unrust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "unrust" 3 | description = "The rust side of the unity package to work with rust + bevy in unity!" 4 | version = "0.0.0" 5 | edition = "2021" 6 | license = "MIT" 7 | homepage = "https://github.com/gamedolphin/unrust" 8 | repository = "https://github.com/gamedolphin/unrust" 9 | readme = false 10 | 11 | [lib] 12 | path = "unrust.rs" 13 | 14 | [build-dependencies] 15 | inbuilt = { path = "../inbuilt" , package = "unrust-inbuilt" , version = "0.0.0" } 16 | anyhow.workspace = true 17 | 18 | [dependencies] 19 | bevy.workspace = true 20 | parking_lot.workspace = true 21 | tracing.workspace = true 22 | tracing-subscriber.workspace = true 23 | anyhow.workspace = true 24 | thiserror.workspace = true 25 | unrust-proc-macro = { path = "../unrust-proc-macro" , version = "0.0.0" } 26 | codegen = { path = "../codegen" , package = "unrust-codegen" , version = "0.0.0" } 27 | inbuilt = { path = "../inbuilt" , package = "unrust-inbuilt" , version = "0.0.0" } -------------------------------------------------------------------------------- /pkg/unrust/build.rs: -------------------------------------------------------------------------------- 1 | fn main() -> anyhow::Result<()> { 2 | if std::env::var_os("UNRUST_DEV").is_none() { 3 | return Ok(()); 4 | } 5 | 6 | inbuilt::write_csharp_inbuilt("../../unity/sdk/Runtime/InbuiltGenerated.cs")?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /pkg/unrust/loader.rs: -------------------------------------------------------------------------------- 1 | use bevy::{ecs::world::EntityMut, prelude::*}; 2 | 3 | use crate::PrefabData; 4 | 5 | pub trait GamePlugin { 6 | fn initialize(&self, app: &mut App); 7 | fn register(&self, world: &mut World, prefabs: PrefabData); 8 | 9 | #[allow(clippy::missing_safety_doc)] 10 | unsafe fn spawn_custom( 11 | &self, 12 | entity: &mut EntityMut, 13 | custom: *const u8, 14 | custom_len: usize, 15 | custom_state: *const u8, 16 | custom_state_len: usize, 17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /pkg/unrust/logger.rs: -------------------------------------------------------------------------------- 1 | use std::{ffi::c_char, io::Write}; 2 | 3 | use parking_lot::Once; 4 | use tracing::{Level, Metadata}; 5 | use tracing_subscriber::{ 6 | fmt::{ 7 | self, 8 | format::{Compact, DefaultFields, Format}, 9 | Layer, MakeWriter, 10 | }, 11 | prelude::*, 12 | reload, Registry, 13 | }; 14 | 15 | type Reloader = 16 | reload::Handle, MakeLogger>, Registry>; 17 | 18 | static mut RELOAD: Option = None; 19 | static INIT: Once = Once::new(); 20 | 21 | #[repr(u8)] 22 | #[derive(Clone, Copy)] 23 | pub enum LogLevel { 24 | Error = 0, 25 | Warning = 1, 26 | Info = 2, 27 | Debug = 3, 28 | } 29 | 30 | pub type LoggerFunc = extern "C" fn(level: LogLevel, str: *mut c_char, len: usize); 31 | 32 | type LogFn = dyn Fn(LogLevel, String) + Send + Sync + 'static; 33 | 34 | type LogCallback = Option>; 35 | 36 | fn get_cached_reloader() -> &'static Reloader { 37 | unsafe { 38 | INIT.call_once(|| { 39 | let layer = fmt::layer() 40 | .without_time() 41 | .with_ansi(false) 42 | .compact() 43 | .with_writer(MakeLogger { logger: None }); 44 | let (layer, reload_handle) = reload::Layer::new(layer); 45 | tracing_subscriber::registry().with(layer).init(); 46 | 47 | RELOAD = Some(reload_handle); 48 | }); 49 | 50 | if let Some(val) = &RELOAD { 51 | val 52 | } else { 53 | panic!("reload not set") 54 | } 55 | } 56 | } 57 | 58 | pub(crate) fn setup_logging(logger: Box) { 59 | let reloader = get_cached_reloader(); 60 | let _ = reloader.modify(|layer| { 61 | *layer.writer_mut() = MakeLogger { 62 | logger: Some(logger), 63 | }; 64 | }); 65 | } 66 | 67 | pub(crate) fn teardown_logging() { 68 | let reloader = get_cached_reloader(); 69 | let _ = reloader.modify(|layer| { 70 | *layer.writer_mut() = MakeLogger { 71 | logger: LogCallback::default(), 72 | }; 73 | }); 74 | } 75 | 76 | struct MakeLogger { 77 | logger: LogCallback, 78 | } 79 | 80 | enum UnityLogger<'a> { 81 | Error(&'a LogCallback), 82 | Warning(&'a LogCallback), 83 | Info(&'a LogCallback), 84 | Debug(&'a LogCallback), 85 | } 86 | 87 | impl<'a> Write for UnityLogger<'a> { 88 | fn write(&mut self, buf: &[u8]) -> std::io::Result { 89 | let str = String::from_utf8_lossy(buf).to_string(); 90 | 91 | let (level, log) = match self { 92 | UnityLogger::Error(log) => (LogLevel::Error, log), 93 | UnityLogger::Warning(log) => (LogLevel::Warning, log), 94 | UnityLogger::Info(log) => (LogLevel::Info, log), 95 | UnityLogger::Debug(log) => (LogLevel::Debug, log), 96 | }; 97 | 98 | if let Some(logger) = log { 99 | (logger)(level, str) 100 | } 101 | 102 | Ok(buf.len()) 103 | } 104 | 105 | fn flush(&mut self) -> std::io::Result<()> { 106 | Ok(()) 107 | } 108 | } 109 | 110 | impl<'a> MakeWriter<'a> for MakeLogger { 111 | type Writer = UnityLogger<'a>; 112 | 113 | fn make_writer(&'a self) -> Self::Writer { 114 | // We must have an implementation of `make_writer` that makes 115 | // a "default" writer without any configuring metadata. Let's 116 | // just return stdout in that case. 117 | UnityLogger::Info(&self.logger) 118 | } 119 | 120 | fn make_writer_for(&'a self, meta: &Metadata<'_>) -> Self::Writer { 121 | match *meta.level() { 122 | Level::DEBUG => UnityLogger::Debug(&self.logger), 123 | Level::ERROR => UnityLogger::Error(&self.logger), 124 | Level::INFO => UnityLogger::Info(&self.logger), 125 | Level::WARN => UnityLogger::Warning(&self.logger), 126 | Level::TRACE => UnityLogger::Info(&self.logger), 127 | } 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /pkg/unrust/unity.rs: -------------------------------------------------------------------------------- 1 | use std::{sync::Arc, time::Duration}; 2 | 3 | use bevy::{ 4 | app::PluginGroupBuilder, 5 | asset::{AssetPlugin, ChangeWatcher}, 6 | prelude::*, 7 | tasks::tick_global_task_pools_on_main_thread, 8 | time::TimePlugin, 9 | }; 10 | use inbuilt::*; 11 | 12 | pub type UpdateFn = extern "C" fn(data: *const InbuiltEntityData, len: usize); 13 | pub type CreateFn = extern "C" fn(data: *const InbuiltEntityData, len: usize); 14 | pub type DestroyFn = extern "C" fn(entity: *const UnityEntity, len: usize); 15 | 16 | #[derive(Component, Copy, Clone)] 17 | pub struct InstantiateEntity { 18 | pub entity: UnityEntity, 19 | } 20 | 21 | #[derive(Component, Copy, Clone)] 22 | pub struct DestroyEntity { 23 | pub entity: UnityEntity, 24 | } 25 | 26 | #[derive(Component)] 27 | pub struct PrefabComponent { 28 | pub ref_id: i32, 29 | pub guid: UnityEntity, 30 | } 31 | 32 | #[repr(C)] 33 | pub struct PrefabData { 34 | pub ref_id: i32, 35 | pub guids: *mut UnityEntity, 36 | pub len: usize, 37 | } 38 | 39 | #[derive(Resource)] 40 | pub struct CallbacksNonSend { 41 | create_fn: Arc, 42 | update_fn: Arc, 43 | destroy_fn: Arc, 44 | } 45 | 46 | pub(crate) struct UnityPlugins { 47 | base_path: String, 48 | update_fn: Arc, 49 | create_fn: Arc, 50 | destroy_fn: Arc, 51 | } 52 | 53 | impl UnityPlugins { 54 | pub(crate) fn new( 55 | base_path: String, 56 | create_fn: CreateFn, 57 | update_fn: UpdateFn, 58 | destroy_fn: DestroyFn, 59 | ) -> UnityPlugins { 60 | UnityPlugins { 61 | base_path, 62 | update_fn: Arc::new(update_fn), 63 | create_fn: Arc::new(create_fn), 64 | destroy_fn: Arc::new(destroy_fn), 65 | } 66 | } 67 | } 68 | 69 | impl Plugin for UnityPlugins { 70 | fn build(&self, app: &mut App) { 71 | let update_fn = self.update_fn.clone(); 72 | let create_fn = self.create_fn.clone(); 73 | let destroy_fn = self.destroy_fn.clone(); 74 | app.add_plugins(BasePlugins) 75 | .add_plugins(AssetPlugin { 76 | asset_folder: self.base_path.clone(), 77 | watch_for_changes: ChangeWatcher::with_delay(Duration::from_millis(200)), 78 | }) 79 | .insert_non_send_resource(CallbacksNonSend { 80 | create_fn, 81 | update_fn, 82 | destroy_fn, 83 | }) 84 | .add_systems( 85 | PostUpdate, 86 | ( 87 | create_unity_system, 88 | update_unity_system, 89 | destroy_unity_system, 90 | ), 91 | ); 92 | } 93 | } 94 | 95 | fn create_unity_system( 96 | callbacks_res: NonSend, 97 | mut commands: Commands, 98 | created: Query<(Entity, &InstantiateEntity, &Transform)>, 99 | ) { 100 | let mut creates = vec![]; 101 | let mut counts = vec![]; 102 | created.iter().for_each(|(_, _, transform)| { 103 | let mut count = 0; 104 | creates.push(InbuiltData { 105 | ty: InbuiltTypes::UnityTransform, 106 | value: InbuiltComponents { 107 | UnityTransform: transform.into(), 108 | }, 109 | }); 110 | 111 | count += 1; 112 | counts.push(count); 113 | }); 114 | 115 | let mut count = 0; 116 | let creates = created 117 | .iter() 118 | .enumerate() 119 | .map(|(index, (entity, guid, _))| { 120 | let comp_count = counts[index]; 121 | let ptr = creates[count..(count + comp_count)].as_ptr(); 122 | count += comp_count; 123 | 124 | let mut comm = commands.entity(entity); 125 | comm.despawn(); 126 | 127 | InbuiltEntityData { 128 | entity: guid.entity, 129 | data: ptr, 130 | len: comp_count, 131 | } 132 | }) 133 | .collect::>(); 134 | 135 | let ptr = creates.as_ptr(); 136 | 137 | (callbacks_res.create_fn)(ptr, creates.len()); 138 | } 139 | 140 | fn update_unity_system( 141 | callbacks_res: NonSend, 142 | entities: Query<(&UnityEntity, &GlobalTransform), Changed>, // add more inbuilt components here 143 | ) { 144 | let mut updates = vec![]; 145 | let mut counts = vec![]; 146 | entities.iter().for_each(|(_, transform)| { 147 | let mut count = 0; 148 | updates.push(InbuiltData { 149 | ty: InbuiltTypes::UnityTransform, 150 | value: InbuiltComponents { 151 | UnityTransform: transform.into(), 152 | }, 153 | }); 154 | 155 | count += 1; 156 | counts.push(count); 157 | }); 158 | 159 | let mut count = 0; 160 | let updates = entities 161 | .iter() 162 | .enumerate() 163 | .map(|(index, (unity_entity, _))| { 164 | let comp_count = counts[index]; 165 | let ptr = updates[count..(count + comp_count)].as_ptr(); 166 | count += comp_count; 167 | 168 | InbuiltEntityData { 169 | entity: *unity_entity, 170 | data: ptr, 171 | len: comp_count, 172 | } 173 | }) 174 | .collect::>(); 175 | 176 | let ptr = updates.as_ptr(); 177 | (callbacks_res.update_fn)(ptr, updates.len()); 178 | } 179 | 180 | fn destroy_unity_system( 181 | mut commands: Commands, 182 | callbacks_res: NonSend, 183 | destroyed: Query<(Entity, &DestroyEntity)>, 184 | ) { 185 | let destroyed_entities = destroyed 186 | .iter() 187 | .map(|(entity, v)| { 188 | let mut comm = commands.entity(entity); 189 | comm.despawn(); 190 | 191 | v.entity 192 | }) 193 | .collect::>(); 194 | 195 | (callbacks_res.destroy_fn)(destroyed_entities.as_ptr(), destroyed_entities.len()); 196 | } 197 | 198 | pub(crate) fn start_app(app: &mut App) { 199 | // copy of schedule 200 | while !app.ready() { 201 | #[cfg(not(target_arch = "wasm32"))] 202 | tick_global_task_pools_on_main_thread(); 203 | } 204 | app.finish(); 205 | app.cleanup(); 206 | } 207 | 208 | struct BasePlugins; 209 | 210 | impl PluginGroup for BasePlugins { 211 | fn build(self) -> PluginGroupBuilder { 212 | PluginGroupBuilder::start::() 213 | .add(TaskPoolPlugin::default()) 214 | .add(TypeRegistrationPlugin) 215 | .add(FrameCountPlugin) 216 | .add(TransformPlugin) 217 | .add(HierarchyPlugin) 218 | .add(TimePlugin) 219 | } 220 | } 221 | -------------------------------------------------------------------------------- /pkg/unrust/unrust.rs: -------------------------------------------------------------------------------- 1 | use std::ffi::{c_char, CStr, CString}; 2 | 3 | mod loader; 4 | mod logger; 5 | mod unity; 6 | 7 | pub use bevy; 8 | 9 | use bevy::prelude::*; 10 | pub use codegen::generate_csharp; 11 | pub use inbuilt::*; 12 | pub use loader::GamePlugin; 13 | pub use tracing; 14 | 15 | pub use unity::{CreateFn, DestroyEntity, DestroyFn, InstantiateEntity, PrefabData, UpdateFn}; 16 | pub use unrust_proc_macro::*; 17 | 18 | use crate::{ 19 | logger::{setup_logging, teardown_logging, LoggerFunc}, 20 | unity::{start_app, UnityPlugins}, 21 | }; 22 | 23 | #[repr(C)] 24 | pub struct UnrustContextWrapper; 25 | 26 | pub struct UnrustContext { 27 | pub app: App, 28 | } 29 | 30 | static mut GAMEPLUGIN: Option> = None; 31 | 32 | #[allow(clippy::missing_safety_doc)] 33 | pub unsafe fn setup_game(game: Box) { 34 | GAMEPLUGIN = Some(game); 35 | } 36 | 37 | #[no_mangle] 38 | #[allow(clippy::missing_safety_doc)] 39 | pub unsafe extern "C" fn load(logger: LoggerFunc) -> *mut UnrustContextWrapper { 40 | setup_logging(Box::new(move |level, str| { 41 | let len = str.len(); 42 | let out_str = CString::new(str).unwrap(); 43 | let out_str = out_str.into_raw(); 44 | (logger)(level, out_str, len); 45 | unsafe { 46 | let _ = CString::from_raw(out_str); // drop the string 47 | } 48 | })); 49 | 50 | let app = App::new(); 51 | 52 | tracing::info!("setting up!"); 53 | 54 | let ctx = Box::new(UnrustContext { app }); 55 | 56 | Box::into_raw(ctx) as *mut UnrustContextWrapper 57 | } 58 | 59 | #[no_mangle] 60 | #[allow(clippy::missing_safety_doc)] 61 | pub unsafe extern "C" fn init( 62 | ctx: *mut UnrustContextWrapper, 63 | base_path: *const c_char, 64 | create: CreateFn, 65 | update: UpdateFn, 66 | destroy: DestroyFn, 67 | ) { 68 | let ctx = unsafe { Box::leak(Box::from_raw(ctx as *mut UnrustContext)) }; 69 | let base_path = unsafe { get_string(base_path) }; 70 | ctx.app 71 | .add_plugins(UnityPlugins::new(base_path, create, update, destroy)); 72 | 73 | unsafe { 74 | if let Some(game) = &GAMEPLUGIN { 75 | game.initialize(&mut ctx.app); 76 | } else { 77 | tracing::info!("game not setup!"); 78 | } 79 | } 80 | 81 | start_app(&mut ctx.app); 82 | } 83 | 84 | #[no_mangle] 85 | pub extern "C" fn register_prefabs(ctx: *mut UnrustContextWrapper, prefabs: PrefabData) { 86 | let ctx = unsafe { Box::leak(Box::from_raw(ctx as *mut UnrustContext)) }; 87 | unsafe { 88 | if let Some(game) = &GAMEPLUGIN { 89 | game.register(&mut ctx.app.world, prefabs); 90 | } 91 | } 92 | } 93 | 94 | #[allow(clippy::missing_safety_doc)] 95 | #[no_mangle] 96 | pub unsafe extern "C" fn spawn( 97 | ctx: *mut UnrustContextWrapper, 98 | unity_entity: UnityEntity, 99 | inbuilt: *const InbuiltData, 100 | len: usize, 101 | custom: *const u8, 102 | custom_len: usize, 103 | custom_state: *const u8, 104 | custom_state_len: usize, 105 | ) -> u64 { 106 | let components = unsafe { std::slice::from_raw_parts(inbuilt, len) }; 107 | let ctx = unsafe { Box::leak(Box::from_raw(ctx as *mut UnrustContext)) }; 108 | let mut entity = ctx.app.world.spawn_empty(); 109 | entity.insert(unity_entity); 110 | ingest_component(&mut entity, components); 111 | 112 | unsafe { 113 | if let Some(game) = &GAMEPLUGIN { 114 | game.spawn_custom( 115 | &mut entity, 116 | custom, 117 | custom_len, 118 | custom_state, 119 | custom_state_len, 120 | ); 121 | } 122 | } 123 | 124 | entity.id().to_bits() 125 | } 126 | 127 | #[no_mangle] 128 | pub extern "C" fn tick(ctx: *mut UnrustContextWrapper) { 129 | let ctx = unsafe { Box::leak(Box::from_raw(ctx as *mut UnrustContext)) }; 130 | ctx.app.update(); 131 | } 132 | 133 | #[no_mangle] 134 | pub extern "C" fn unload(ctx: *mut UnrustContextWrapper) { 135 | teardown_logging(); 136 | let _ = unsafe { Box::from_raw(ctx as *mut UnrustContext) }; 137 | unsafe { GAMEPLUGIN = None }; 138 | } 139 | 140 | unsafe fn get_string(base_path: *const i8) -> String { 141 | CStr::from_ptr(base_path).to_string_lossy().to_string() 142 | } 143 | -------------------------------------------------------------------------------- /unity/example/.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Uu]ser[Ss]ettings/ 12 | 13 | # MemoryCaptures can get excessive in size. 14 | # They also could contain extremely sensitive data 15 | /[Mm]emoryCaptures/ 16 | 17 | # Recordings can get excessive in size 18 | /[Rr]ecordings/ 19 | 20 | # Uncomment this line if you wish to ignore the asset store tools plugin 21 | # /[Aa]ssets/AssetStoreTools* 22 | 23 | # Autogenerated Jetbrains Rider plugin 24 | /[Aa]ssets/Plugins/Editor/JetBrains* 25 | 26 | # Visual Studio cache directory 27 | .vs/ 28 | 29 | # Gradle cache directory 30 | .gradle/ 31 | 32 | # Autogenerated VS/MD/Consulo solution and project files 33 | ExportedObj/ 34 | .consulo/ 35 | *.csproj 36 | *.unityproj 37 | *.sln 38 | *.suo 39 | *.tmp 40 | *.user 41 | *.userprefs 42 | *.pidb 43 | *.booproj 44 | *.svd 45 | *.pdb 46 | *.mdb 47 | *.opendb 48 | *.VC.db 49 | 50 | # Unity3D generated meta files 51 | *.pidb.meta 52 | *.pdb.meta 53 | *.mdb.meta 54 | 55 | # Unity3D generated file on crash reports 56 | sysinfo.txt 57 | 58 | # Builds 59 | *.apk 60 | *.aab 61 | *.unitypackage 62 | *.app 63 | 64 | # Crashlytics generated file 65 | crashlytics-build.properties 66 | 67 | # Packed Addressables 68 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* 69 | 70 | # Temporary auto-generated Android Assets 71 | /[Aa]ssets/[Ss]treamingAssets/aa.meta 72 | /[Aa]ssets/[Ss]treamingAssets/aa/* -------------------------------------------------------------------------------- /unity/example/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.exclude": 3 | { 4 | "**/.DS_Store":true, 5 | "**/.git":true, 6 | "**/.gitmodules":true, 7 | "**/*.booproj":true, 8 | "**/*.pidb":true, 9 | "**/*.suo":true, 10 | "**/*.user":true, 11 | "**/*.userprefs":true, 12 | "**/*.unityproj":true, 13 | "**/*.dll":true, 14 | "**/*.exe":true, 15 | "**/*.pdf":true, 16 | "**/*.mid":true, 17 | "**/*.midi":true, 18 | "**/*.wav":true, 19 | "**/*.gif":true, 20 | "**/*.ico":true, 21 | "**/*.jpg":true, 22 | "**/*.jpeg":true, 23 | "**/*.png":true, 24 | "**/*.psd":true, 25 | "**/*.tga":true, 26 | "**/*.tif":true, 27 | "**/*.tiff":true, 28 | "**/*.3ds":true, 29 | "**/*.3DS":true, 30 | "**/*.fbx":true, 31 | "**/*.FBX":true, 32 | "**/*.lxo":true, 33 | "**/*.LXO":true, 34 | "**/*.ma":true, 35 | "**/*.MA":true, 36 | "**/*.obj":true, 37 | "**/*.OBJ":true, 38 | "**/*.asset":true, 39 | "**/*.cubemap":true, 40 | "**/*.flare":true, 41 | "**/*.mat":true, 42 | "**/*.meta":true, 43 | "**/*.prefab":true, 44 | "**/*.unity":true, 45 | "build/":true, 46 | "Build/":true, 47 | "Library/":true, 48 | "library/":true, 49 | "obj/":true, 50 | "Obj/":true, 51 | "ProjectSettings/":true, 52 | "temp/":true, 53 | "Temp/":true 54 | } 55 | } -------------------------------------------------------------------------------- /unity/example/Assets/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1a57f0b26619eaa54a3c53d9d4512e10 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/Materials/Child.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Child 11 | m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: [] 15 | m_InvalidKeywords: [] 16 | m_LightmapFlags: 4 17 | m_EnableInstancingVariants: 0 18 | m_DoubleSidedGI: 0 19 | m_CustomRenderQueue: -1 20 | stringTagMap: 21 | RenderType: Opaque 22 | disabledShaderPasses: [] 23 | m_LockedProperties: 24 | m_SavedProperties: 25 | serializedVersion: 3 26 | m_TexEnvs: 27 | - _BaseMap: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _BumpMap: 32 | m_Texture: {fileID: 0} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _DetailAlbedoMap: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _DetailMask: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _DetailNormalMap: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _EmissionMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _MainTex: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _MetallicGlossMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _OcclusionMap: 60 | m_Texture: {fileID: 0} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | - _ParallaxMap: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - _SpecGlossMap: 68 | m_Texture: {fileID: 0} 69 | m_Scale: {x: 1, y: 1} 70 | m_Offset: {x: 0, y: 0} 71 | - unity_Lightmaps: 72 | m_Texture: {fileID: 0} 73 | m_Scale: {x: 1, y: 1} 74 | m_Offset: {x: 0, y: 0} 75 | - unity_LightmapsInd: 76 | m_Texture: {fileID: 0} 77 | m_Scale: {x: 1, y: 1} 78 | m_Offset: {x: 0, y: 0} 79 | - unity_ShadowMasks: 80 | m_Texture: {fileID: 0} 81 | m_Scale: {x: 1, y: 1} 82 | m_Offset: {x: 0, y: 0} 83 | m_Ints: [] 84 | m_Floats: 85 | - _AlphaClip: 0 86 | - _AlphaToMask: 0 87 | - _Blend: 0 88 | - _BlendModePreserveSpecular: 1 89 | - _BumpScale: 1 90 | - _ClearCoatMask: 0 91 | - _ClearCoatSmoothness: 0 92 | - _Cull: 2 93 | - _Cutoff: 0.5 94 | - _DetailAlbedoMapScale: 1 95 | - _DetailNormalMapScale: 1 96 | - _DstBlend: 0 97 | - _DstBlendAlpha: 0 98 | - _EnvironmentReflections: 1 99 | - _GlossMapScale: 0 100 | - _Glossiness: 0 101 | - _GlossyReflections: 0 102 | - _Metallic: 0 103 | - _OcclusionStrength: 1 104 | - _Parallax: 0.005 105 | - _QueueOffset: 0 106 | - _ReceiveShadows: 1 107 | - _Smoothness: 0 108 | - _SmoothnessTextureChannel: 0 109 | - _SpecularHighlights: 1 110 | - _SrcBlend: 1 111 | - _SrcBlendAlpha: 1 112 | - _Surface: 0 113 | - _WorkflowMode: 1 114 | - _ZWrite: 1 115 | m_Colors: 116 | - _BaseColor: {r: 0.48720425, g: 0.72523916, b: 0.44232878, a: 1} 117 | - _Color: {r: 0.48720425, g: 0.72523916, b: 0.44232878, a: 1} 118 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 119 | - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} 120 | m_BuildTextureStacks: [] 121 | --- !u!114 &2759619554770639673 122 | MonoBehaviour: 123 | m_ObjectHideFlags: 11 124 | m_CorrespondingSourceObject: {fileID: 0} 125 | m_PrefabInstance: {fileID: 0} 126 | m_PrefabAsset: {fileID: 0} 127 | m_GameObject: {fileID: 0} 128 | m_Enabled: 1 129 | m_EditorHideFlags: 0 130 | m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} 131 | m_Name: 132 | m_EditorClassIdentifier: 133 | version: 7 134 | -------------------------------------------------------------------------------- /unity/example/Assets/Materials/Child.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cfc5c697b336795c49fad04a7a4ee041 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/Materials/Cube.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Cube 11 | m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: [] 15 | m_InvalidKeywords: [] 16 | m_LightmapFlags: 4 17 | m_EnableInstancingVariants: 0 18 | m_DoubleSidedGI: 0 19 | m_CustomRenderQueue: -1 20 | stringTagMap: 21 | RenderType: Opaque 22 | disabledShaderPasses: [] 23 | m_LockedProperties: 24 | m_SavedProperties: 25 | serializedVersion: 3 26 | m_TexEnvs: 27 | - _BaseMap: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _BumpMap: 32 | m_Texture: {fileID: 0} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _DetailAlbedoMap: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _DetailMask: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _DetailNormalMap: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _EmissionMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _MainTex: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _MetallicGlossMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _OcclusionMap: 60 | m_Texture: {fileID: 0} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | - _ParallaxMap: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - _SpecGlossMap: 68 | m_Texture: {fileID: 0} 69 | m_Scale: {x: 1, y: 1} 70 | m_Offset: {x: 0, y: 0} 71 | - unity_Lightmaps: 72 | m_Texture: {fileID: 0} 73 | m_Scale: {x: 1, y: 1} 74 | m_Offset: {x: 0, y: 0} 75 | - unity_LightmapsInd: 76 | m_Texture: {fileID: 0} 77 | m_Scale: {x: 1, y: 1} 78 | m_Offset: {x: 0, y: 0} 79 | - unity_ShadowMasks: 80 | m_Texture: {fileID: 0} 81 | m_Scale: {x: 1, y: 1} 82 | m_Offset: {x: 0, y: 0} 83 | m_Ints: [] 84 | m_Floats: 85 | - _AlphaClip: 0 86 | - _AlphaToMask: 0 87 | - _Blend: 0 88 | - _BlendModePreserveSpecular: 1 89 | - _BumpScale: 1 90 | - _ClearCoatMask: 0 91 | - _ClearCoatSmoothness: 0 92 | - _Cull: 2 93 | - _Cutoff: 0.5 94 | - _DetailAlbedoMapScale: 1 95 | - _DetailNormalMapScale: 1 96 | - _DstBlend: 0 97 | - _DstBlendAlpha: 0 98 | - _EnvironmentReflections: 1 99 | - _GlossMapScale: 0 100 | - _Glossiness: 0 101 | - _GlossyReflections: 0 102 | - _Metallic: 0 103 | - _OcclusionStrength: 1 104 | - _Parallax: 0.005 105 | - _QueueOffset: 0 106 | - _ReceiveShadows: 1 107 | - _Smoothness: 0 108 | - _SmoothnessTextureChannel: 0 109 | - _SpecularHighlights: 1 110 | - _SrcBlend: 1 111 | - _SrcBlendAlpha: 1 112 | - _Surface: 0 113 | - _WorkflowMode: 1 114 | - _ZWrite: 1 115 | m_Colors: 116 | - _BaseColor: {r: 0.3652558, g: 0.27062935, b: 0.7035963, a: 1} 117 | - _Color: {r: 0.3652558, g: 0.27062935, b: 0.7035963, a: 1} 118 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 119 | - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} 120 | m_BuildTextureStacks: [] 121 | --- !u!114 &2759619554770639673 122 | MonoBehaviour: 123 | m_ObjectHideFlags: 11 124 | m_CorrespondingSourceObject: {fileID: 0} 125 | m_PrefabInstance: {fileID: 0} 126 | m_PrefabAsset: {fileID: 0} 127 | m_GameObject: {fileID: 0} 128 | m_Enabled: 1 129 | m_EditorHideFlags: 0 130 | m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} 131 | m_Name: 132 | m_EditorClassIdentifier: 133 | version: 7 134 | -------------------------------------------------------------------------------- /unity/example/Assets/Materials/Cube.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02b1acfdb8e25329ca3dcfb9f28a7fda 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/Materials/Plane.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Plane 11 | m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: [] 15 | m_InvalidKeywords: [] 16 | m_LightmapFlags: 4 17 | m_EnableInstancingVariants: 0 18 | m_DoubleSidedGI: 0 19 | m_CustomRenderQueue: -1 20 | stringTagMap: 21 | RenderType: Opaque 22 | disabledShaderPasses: [] 23 | m_LockedProperties: 24 | m_SavedProperties: 25 | serializedVersion: 3 26 | m_TexEnvs: 27 | - _BaseMap: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _BumpMap: 32 | m_Texture: {fileID: 0} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _DetailAlbedoMap: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _DetailMask: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _DetailNormalMap: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _EmissionMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _MainTex: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _MetallicGlossMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _OcclusionMap: 60 | m_Texture: {fileID: 0} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | - _ParallaxMap: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - _SpecGlossMap: 68 | m_Texture: {fileID: 0} 69 | m_Scale: {x: 1, y: 1} 70 | m_Offset: {x: 0, y: 0} 71 | - unity_Lightmaps: 72 | m_Texture: {fileID: 0} 73 | m_Scale: {x: 1, y: 1} 74 | m_Offset: {x: 0, y: 0} 75 | - unity_LightmapsInd: 76 | m_Texture: {fileID: 0} 77 | m_Scale: {x: 1, y: 1} 78 | m_Offset: {x: 0, y: 0} 79 | - unity_ShadowMasks: 80 | m_Texture: {fileID: 0} 81 | m_Scale: {x: 1, y: 1} 82 | m_Offset: {x: 0, y: 0} 83 | m_Ints: [] 84 | m_Floats: 85 | - _AlphaClip: 0 86 | - _AlphaToMask: 0 87 | - _Blend: 0 88 | - _BlendModePreserveSpecular: 1 89 | - _BumpScale: 1 90 | - _ClearCoatMask: 0 91 | - _ClearCoatSmoothness: 0 92 | - _Cull: 2 93 | - _Cutoff: 0.5 94 | - _DetailAlbedoMapScale: 1 95 | - _DetailNormalMapScale: 1 96 | - _DstBlend: 0 97 | - _DstBlendAlpha: 0 98 | - _EnvironmentReflections: 1 99 | - _GlossMapScale: 0 100 | - _Glossiness: 0 101 | - _GlossyReflections: 0 102 | - _Metallic: 0 103 | - _OcclusionStrength: 1 104 | - _Parallax: 0.005 105 | - _QueueOffset: 0 106 | - _ReceiveShadows: 1 107 | - _Smoothness: 0.5 108 | - _SmoothnessTextureChannel: 0 109 | - _SpecularHighlights: 1 110 | - _SrcBlend: 1 111 | - _SrcBlendAlpha: 1 112 | - _Surface: 0 113 | - _WorkflowMode: 1 114 | - _ZWrite: 1 115 | m_Colors: 116 | - _BaseColor: {r: 0.14590812, g: 0.14590812, b: 0.14590812, a: 1} 117 | - _Color: {r: 0.14590812, g: 0.14590812, b: 0.14590812, a: 1} 118 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 119 | - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} 120 | m_BuildTextureStacks: [] 121 | --- !u!114 &2759619554770639673 122 | MonoBehaviour: 123 | m_ObjectHideFlags: 11 124 | m_CorrespondingSourceObject: {fileID: 0} 125 | m_PrefabInstance: {fileID: 0} 126 | m_PrefabAsset: {fileID: 0} 127 | m_GameObject: {fileID: 0} 128 | m_Enabled: 1 129 | m_EditorHideFlags: 0 130 | m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} 131 | m_Name: 132 | m_EditorClassIdentifier: 133 | version: 7 134 | -------------------------------------------------------------------------------- /unity/example/Assets/Materials/Plane.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9c5bfe7ad7c1051a08b8d496d200398b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 46632f7e8362654f1828470916789f05 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/Prefabs/Cube.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &3111494636856780050 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 9203637124288179998} 12 | - component: {fileID: 4749092835316221125} 13 | - component: {fileID: 3226660776436602714} 14 | - component: {fileID: 6972363548306380028} 15 | - component: {fileID: 9002836679646037849} 16 | - component: {fileID: 7593087731519675482} 17 | m_Layer: 0 18 | m_Name: Cube 19 | m_TagString: Untagged 20 | m_Icon: {fileID: 0} 21 | m_NavMeshLayer: 0 22 | m_StaticEditorFlags: 0 23 | m_IsActive: 1 24 | --- !u!4 &9203637124288179998 25 | Transform: 26 | m_ObjectHideFlags: 0 27 | m_CorrespondingSourceObject: {fileID: 0} 28 | m_PrefabInstance: {fileID: 0} 29 | m_PrefabAsset: {fileID: 0} 30 | m_GameObject: {fileID: 3111494636856780050} 31 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 32 | m_LocalPosition: {x: 0, y: 2, z: 0} 33 | m_LocalScale: {x: 1, y: 1, z: 1} 34 | m_ConstrainProportionsScale: 0 35 | m_Children: 36 | - {fileID: 6061962016649467718} 37 | m_Father: {fileID: 0} 38 | m_RootOrder: 2 39 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 40 | --- !u!33 &4749092835316221125 41 | MeshFilter: 42 | m_ObjectHideFlags: 0 43 | m_CorrespondingSourceObject: {fileID: 0} 44 | m_PrefabInstance: {fileID: 0} 45 | m_PrefabAsset: {fileID: 0} 46 | m_GameObject: {fileID: 3111494636856780050} 47 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 48 | --- !u!23 &3226660776436602714 49 | MeshRenderer: 50 | m_ObjectHideFlags: 0 51 | m_CorrespondingSourceObject: {fileID: 0} 52 | m_PrefabInstance: {fileID: 0} 53 | m_PrefabAsset: {fileID: 0} 54 | m_GameObject: {fileID: 3111494636856780050} 55 | m_Enabled: 1 56 | m_CastShadows: 1 57 | m_ReceiveShadows: 1 58 | m_DynamicOccludee: 1 59 | m_StaticShadowCaster: 0 60 | m_MotionVectors: 1 61 | m_LightProbeUsage: 1 62 | m_ReflectionProbeUsage: 1 63 | m_RayTracingMode: 2 64 | m_RayTraceProcedural: 0 65 | m_RenderingLayerMask: 1 66 | m_RendererPriority: 0 67 | m_Materials: 68 | - {fileID: 2100000, guid: 02b1acfdb8e25329ca3dcfb9f28a7fda, type: 2} 69 | m_StaticBatchInfo: 70 | firstSubMesh: 0 71 | subMeshCount: 0 72 | m_StaticBatchRoot: {fileID: 0} 73 | m_ProbeAnchor: {fileID: 0} 74 | m_LightProbeVolumeOverride: {fileID: 0} 75 | m_ScaleInLightmap: 1 76 | m_ReceiveGI: 1 77 | m_PreserveUVs: 0 78 | m_IgnoreNormalsForChartDetection: 0 79 | m_ImportantGI: 0 80 | m_StitchLightmapSeams: 1 81 | m_SelectedEditorRenderState: 3 82 | m_MinimumChartSize: 4 83 | m_AutoUVMaxDistance: 0.5 84 | m_AutoUVMaxAngle: 89 85 | m_LightmapParameters: {fileID: 0} 86 | m_SortingLayerID: 0 87 | m_SortingLayer: 0 88 | m_SortingOrder: 0 89 | m_AdditionalVertexStreams: {fileID: 0} 90 | --- !u!65 &6972363548306380028 91 | BoxCollider: 92 | m_ObjectHideFlags: 0 93 | m_CorrespondingSourceObject: {fileID: 0} 94 | m_PrefabInstance: {fileID: 0} 95 | m_PrefabAsset: {fileID: 0} 96 | m_GameObject: {fileID: 3111494636856780050} 97 | m_Material: {fileID: 0} 98 | m_IncludeLayers: 99 | serializedVersion: 2 100 | m_Bits: 0 101 | m_ExcludeLayers: 102 | serializedVersion: 2 103 | m_Bits: 0 104 | m_LayerOverridePriority: 0 105 | m_IsTrigger: 0 106 | m_ProvidesContacts: 0 107 | m_Enabled: 1 108 | serializedVersion: 3 109 | m_Size: {x: 1, y: 1, z: 1} 110 | m_Center: {x: 0, y: 0, z: 0} 111 | --- !u!114 &9002836679646037849 112 | MonoBehaviour: 113 | m_ObjectHideFlags: 0 114 | m_CorrespondingSourceObject: {fileID: 0} 115 | m_PrefabInstance: {fileID: 0} 116 | m_PrefabAsset: {fileID: 0} 117 | m_GameObject: {fileID: 3111494636856780050} 118 | m_Enabled: 1 119 | m_EditorHideFlags: 0 120 | m_Script: {fileID: 11500000, guid: 9e5cf01d6d01b14a69681a8855e10074, type: 3} 121 | m_Name: 122 | m_EditorClassIdentifier: 123 | --- !u!114 &7593087731519675482 124 | MonoBehaviour: 125 | m_ObjectHideFlags: 0 126 | m_CorrespondingSourceObject: {fileID: 0} 127 | m_PrefabInstance: {fileID: 0} 128 | m_PrefabAsset: {fileID: 0} 129 | m_GameObject: {fileID: 3111494636856780050} 130 | m_Enabled: 1 131 | m_EditorHideFlags: 0 132 | m_Script: {fileID: 11500000, guid: a455bbecf3a6afa65a77e3e94799392a, type: 3} 133 | m_Name: 134 | m_EditorClassIdentifier: 135 | speed: 0.3 136 | --- !u!1 &4693391900097038547 137 | GameObject: 138 | m_ObjectHideFlags: 0 139 | m_CorrespondingSourceObject: {fileID: 0} 140 | m_PrefabInstance: {fileID: 0} 141 | m_PrefabAsset: {fileID: 0} 142 | serializedVersion: 6 143 | m_Component: 144 | - component: {fileID: 6061962016649467718} 145 | - component: {fileID: 7649632900087352378} 146 | - component: {fileID: 2184048084423061623} 147 | - component: {fileID: 8309821828499323713} 148 | - component: {fileID: 1823231374612780359} 149 | - component: {fileID: 1907439062041670762} 150 | m_Layer: 0 151 | m_Name: Child 152 | m_TagString: Untagged 153 | m_Icon: {fileID: 0} 154 | m_NavMeshLayer: 0 155 | m_StaticEditorFlags: 0 156 | m_IsActive: 1 157 | --- !u!4 &6061962016649467718 158 | Transform: 159 | m_ObjectHideFlags: 0 160 | m_CorrespondingSourceObject: {fileID: 0} 161 | m_PrefabInstance: {fileID: 0} 162 | m_PrefabAsset: {fileID: 0} 163 | m_GameObject: {fileID: 4693391900097038547} 164 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 165 | m_LocalPosition: {x: 2, y: 0, z: 0} 166 | m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} 167 | m_ConstrainProportionsScale: 0 168 | m_Children: [] 169 | m_Father: {fileID: 9203637124288179998} 170 | m_RootOrder: -1 171 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 172 | --- !u!33 &7649632900087352378 173 | MeshFilter: 174 | m_ObjectHideFlags: 0 175 | m_CorrespondingSourceObject: {fileID: 0} 176 | m_PrefabInstance: {fileID: 0} 177 | m_PrefabAsset: {fileID: 0} 178 | m_GameObject: {fileID: 4693391900097038547} 179 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 180 | --- !u!23 &2184048084423061623 181 | MeshRenderer: 182 | m_ObjectHideFlags: 0 183 | m_CorrespondingSourceObject: {fileID: 0} 184 | m_PrefabInstance: {fileID: 0} 185 | m_PrefabAsset: {fileID: 0} 186 | m_GameObject: {fileID: 4693391900097038547} 187 | m_Enabled: 1 188 | m_CastShadows: 1 189 | m_ReceiveShadows: 1 190 | m_DynamicOccludee: 1 191 | m_StaticShadowCaster: 0 192 | m_MotionVectors: 1 193 | m_LightProbeUsage: 1 194 | m_ReflectionProbeUsage: 1 195 | m_RayTracingMode: 2 196 | m_RayTraceProcedural: 0 197 | m_RenderingLayerMask: 1 198 | m_RendererPriority: 0 199 | m_Materials: 200 | - {fileID: 2100000, guid: cfc5c697b336795c49fad04a7a4ee041, type: 2} 201 | m_StaticBatchInfo: 202 | firstSubMesh: 0 203 | subMeshCount: 0 204 | m_StaticBatchRoot: {fileID: 0} 205 | m_ProbeAnchor: {fileID: 0} 206 | m_LightProbeVolumeOverride: {fileID: 0} 207 | m_ScaleInLightmap: 1 208 | m_ReceiveGI: 1 209 | m_PreserveUVs: 0 210 | m_IgnoreNormalsForChartDetection: 0 211 | m_ImportantGI: 0 212 | m_StitchLightmapSeams: 1 213 | m_SelectedEditorRenderState: 3 214 | m_MinimumChartSize: 4 215 | m_AutoUVMaxDistance: 0.5 216 | m_AutoUVMaxAngle: 89 217 | m_LightmapParameters: {fileID: 0} 218 | m_SortingLayerID: 0 219 | m_SortingLayer: 0 220 | m_SortingOrder: 0 221 | m_AdditionalVertexStreams: {fileID: 0} 222 | --- !u!65 &8309821828499323713 223 | BoxCollider: 224 | m_ObjectHideFlags: 0 225 | m_CorrespondingSourceObject: {fileID: 0} 226 | m_PrefabInstance: {fileID: 0} 227 | m_PrefabAsset: {fileID: 0} 228 | m_GameObject: {fileID: 4693391900097038547} 229 | m_Material: {fileID: 0} 230 | m_IncludeLayers: 231 | serializedVersion: 2 232 | m_Bits: 0 233 | m_ExcludeLayers: 234 | serializedVersion: 2 235 | m_Bits: 0 236 | m_LayerOverridePriority: 0 237 | m_IsTrigger: 0 238 | m_ProvidesContacts: 0 239 | m_Enabled: 1 240 | serializedVersion: 3 241 | m_Size: {x: 1, y: 1, z: 1} 242 | m_Center: {x: 0, y: 0, z: 0} 243 | --- !u!114 &1823231374612780359 244 | MonoBehaviour: 245 | m_ObjectHideFlags: 0 246 | m_CorrespondingSourceObject: {fileID: 0} 247 | m_PrefabInstance: {fileID: 0} 248 | m_PrefabAsset: {fileID: 0} 249 | m_GameObject: {fileID: 4693391900097038547} 250 | m_Enabled: 1 251 | m_EditorHideFlags: 0 252 | m_Script: {fileID: 11500000, guid: 9e5cf01d6d01b14a69681a8855e10074, type: 3} 253 | m_Name: 254 | m_EditorClassIdentifier: 255 | --- !u!114 &1907439062041670762 256 | MonoBehaviour: 257 | m_ObjectHideFlags: 0 258 | m_CorrespondingSourceObject: {fileID: 0} 259 | m_PrefabInstance: {fileID: 0} 260 | m_PrefabAsset: {fileID: 0} 261 | m_GameObject: {fileID: 4693391900097038547} 262 | m_Enabled: 1 263 | m_EditorHideFlags: 0 264 | m_Script: {fileID: 11500000, guid: a455bbecf3a6afa65a77e3e94799392a, type: 3} 265 | m_Name: 266 | m_EditorClassIdentifier: 267 | speed: 0.5 268 | -------------------------------------------------------------------------------- /unity/example/Assets/Prefabs/Cube.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff2a6f8f24bef6774ae11c3b74f82424 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/example/Assets/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 77f9c03afa727e8d1826e9e2192c0943 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/Resources/cube.spawn.toml: -------------------------------------------------------------------------------- 1 | spawn_count = 10 -------------------------------------------------------------------------------- /unity/example/Assets/Resources/cube.spawn.toml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 35410a3f7df8b921fab6acfcd8cbcfd7 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/example/Assets/SceneDependencyCache.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 60ae0795e15bf4891b0f5f715ef239a9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/SceneDependencyCache/10c62e686247829eb83720d5f2d23e5e.sceneWithBuildSettings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedolphin/unrust/b8a2ecb786a71ff6831c59cd1773252a81b01f0a/unity/example/Assets/SceneDependencyCache/10c62e686247829eb83720d5f2d23e5e.sceneWithBuildSettings -------------------------------------------------------------------------------- /unity/example/Assets/SceneDependencyCache/10c62e686247829eb83720d5f2d23e5e.sceneWithBuildSettings.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 10c62e686247829eb83720d5f2d23e5e 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/example/Assets/SceneDependencyCache/15f73afd11965dbcb277a8bc8d8b8885.sceneWithBuildSettings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedolphin/unrust/b8a2ecb786a71ff6831c59cd1773252a81b01f0a/unity/example/Assets/SceneDependencyCache/15f73afd11965dbcb277a8bc8d8b8885.sceneWithBuildSettings -------------------------------------------------------------------------------- /unity/example/Assets/SceneDependencyCache/15f73afd11965dbcb277a8bc8d8b8885.sceneWithBuildSettings.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15f73afd11965dbcb277a8bc8d8b8885 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/example/Assets/SceneDependencyCache/2ca213750c0457fec470e7a525b74508.sceneWithBuildSettings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedolphin/unrust/b8a2ecb786a71ff6831c59cd1773252a81b01f0a/unity/example/Assets/SceneDependencyCache/2ca213750c0457fec470e7a525b74508.sceneWithBuildSettings -------------------------------------------------------------------------------- /unity/example/Assets/SceneDependencyCache/2ca213750c0457fec470e7a525b74508.sceneWithBuildSettings.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2ca213750c0457fec470e7a525b74508 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/example/Assets/SceneDependencyCache/55b724de09ed93dc8e0a79e8d1193a71.sceneWithBuildSettings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedolphin/unrust/b8a2ecb786a71ff6831c59cd1773252a81b01f0a/unity/example/Assets/SceneDependencyCache/55b724de09ed93dc8e0a79e8d1193a71.sceneWithBuildSettings -------------------------------------------------------------------------------- /unity/example/Assets/SceneDependencyCache/55b724de09ed93dc8e0a79e8d1193a71.sceneWithBuildSettings.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 55b724de09ed93dc8e0a79e8d1193a71 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/example/Assets/SceneDependencyCache/a79cc978f0c4e5d6e6ef8659e30ad42f.sceneWithBuildSettings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedolphin/unrust/b8a2ecb786a71ff6831c59cd1773252a81b01f0a/unity/example/Assets/SceneDependencyCache/a79cc978f0c4e5d6e6ef8659e30ad42f.sceneWithBuildSettings -------------------------------------------------------------------------------- /unity/example/Assets/SceneDependencyCache/a79cc978f0c4e5d6e6ef8659e30ad42f.sceneWithBuildSettings.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a79cc978f0c4e5d6e6ef8659e30ad42f 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/example/Assets/SceneDependencyCache/b6abdafbe884057361634cf5fa1aa1fb.sceneWithBuildSettings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamedolphin/unrust/b8a2ecb786a71ff6831c59cd1773252a81b01f0a/unity/example/Assets/SceneDependencyCache/b6abdafbe884057361634cf5fa1aa1fb.sceneWithBuildSettings -------------------------------------------------------------------------------- /unity/example/Assets/SceneDependencyCache/b6abdafbe884057361634cf5fa1aa1fb.sceneWithBuildSettings.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b6abdafbe884057361634cf5fa1aa1fb 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/example/Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d42eac276ec9e684d8562afa59ff0024 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/Scenes/ECS.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fedf2a7d7ab1eeed3a3b65f304d60990 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/Scenes/ECS/ECS_HelloCube.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a292100a96b43a64daa806fee357c02c 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/example/Assets/Scenes/ECS/ECS_HelloCubeEnableable.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 195f8ac1ab8e0e1ea887168280941bf5 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/example/Assets/Scenes/ECS/ECS_HelloCubeParenting.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fff5fdadab2d3b635bfde11608436599 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/example/Assets/Scenes/ECS/ECS_HelloCubePrefabs.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cc1996af92d5d1b669fb9a90e9668afa 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/example/Assets/Scenes/HelloCube.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2f0b3976b388fd2eb3a086d0f758419 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/example/Assets/Scenes/HelloCubeEnableable.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 777fa93102f69b8d0851db630339e280 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/example/Assets/Scenes/HelloCubeParenting.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 849bc4d44d8abc460abd191ac507c625 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/example/Assets/Scenes/HelloCubePrefabs.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f1a27f0d9425108e7a3811389c187d3e 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/example/Assets/Settings.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ea26f36649573d6e9346310ee1216cf 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/Settings/High_PipelineAsset.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} 13 | m_Name: High_PipelineAsset 14 | m_EditorClassIdentifier: 15 | k_AssetVersion: 11 16 | k_AssetPreviousVersion: 11 17 | m_RendererType: 1 18 | m_RendererData: {fileID: 0} 19 | m_RendererDataList: 20 | - {fileID: 11400000, guid: 1118b1399981bb2b08fc1b622369b71a, type: 2} 21 | m_DefaultRendererIndex: 0 22 | m_RequireDepthTexture: 0 23 | m_RequireOpaqueTexture: 0 24 | m_OpaqueDownsampling: 1 25 | m_SupportsTerrainHoles: 1 26 | m_SupportsHDR: 1 27 | m_HDRColorBufferPrecision: 0 28 | m_MSAA: 1 29 | m_RenderScale: 1 30 | m_UpscalingFilter: 0 31 | m_FsrOverrideSharpness: 0 32 | m_FsrSharpness: 0.92 33 | m_EnableLODCrossFade: 1 34 | m_LODCrossFadeDitheringType: 1 35 | m_ShEvalMode: 0 36 | m_MainLightRenderingMode: 1 37 | m_MainLightShadowsSupported: 1 38 | m_MainLightShadowmapResolution: 2048 39 | m_AdditionalLightsRenderingMode: 1 40 | m_AdditionalLightsPerObjectLimit: 2 41 | m_AdditionalLightShadowsSupported: 1 42 | m_AdditionalLightsShadowmapResolution: 2048 43 | m_AdditionalLightsShadowResolutionTierLow: 256 44 | m_AdditionalLightsShadowResolutionTierMedium: 512 45 | m_AdditionalLightsShadowResolutionTierHigh: 1024 46 | m_ReflectionProbeBlending: 1 47 | m_ReflectionProbeBoxProjection: 1 48 | m_ShadowDistance: 40 49 | m_ShadowCascadeCount: 2 50 | m_Cascade2Split: 0.33333334 51 | m_Cascade3Split: {x: 0.1, y: 0.3} 52 | m_Cascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 53 | m_CascadeBorder: 0.2 54 | m_ShadowDepthBias: 1 55 | m_ShadowNormalBias: 1 56 | m_AnyShadowsSupported: 1 57 | m_SoftShadowsSupported: 1 58 | m_ConservativeEnclosingSphere: 0 59 | m_NumIterationsEnclosingSphere: 64 60 | m_SoftShadowQuality: 2 61 | m_AdditionalLightsCookieResolution: 2048 62 | m_AdditionalLightsCookieFormat: 3 63 | m_UseSRPBatcher: 1 64 | m_SupportsDynamicBatching: 0 65 | m_MixedLightingSupported: 1 66 | m_SupportsLightCookies: 1 67 | m_SupportsLightLayers: 0 68 | m_DebugLevel: 0 69 | m_StoreActionsOptimization: 0 70 | m_EnableRenderGraph: 0 71 | m_UseAdaptivePerformance: 1 72 | m_ColorGradingMode: 0 73 | m_ColorGradingLutSize: 32 74 | m_UseFastSRGBLinearConversion: 0 75 | m_ShadowType: 1 76 | m_LocalShadowsSupported: 0 77 | m_LocalShadowsAtlasResolution: 256 78 | m_MaxPixelLights: 0 79 | m_ShadowAtlasResolution: 256 80 | m_VolumeFrameworkUpdateMode: 0 81 | m_Textures: 82 | blueNoise64LTex: {fileID: 0} 83 | bayerMatrixTex: {fileID: 0} 84 | m_PrefilteringModeMainLightShadows: 1 85 | m_PrefilteringModeAdditionalLight: 4 86 | m_PrefilteringModeAdditionalLightShadows: 1 87 | m_PrefilterXRKeywords: 0 88 | m_PrefilteringModeForwardPlus: 1 89 | m_PrefilteringModeDeferredRendering: 1 90 | m_PrefilteringModeScreenSpaceOcclusion: 1 91 | m_PrefilterDebugKeywords: 0 92 | m_PrefilterWriteRenderingLayers: 0 93 | m_PrefilterHDROutput: 0 94 | m_PrefilterSSAODepthNormals: 0 95 | m_PrefilterSSAOSourceDepthLow: 0 96 | m_PrefilterSSAOSourceDepthMedium: 0 97 | m_PrefilterSSAOSourceDepthHigh: 0 98 | m_PrefilterSSAOInterleaved: 0 99 | m_PrefilterSSAOBlueNoise: 0 100 | m_PrefilterSSAOSampleCountLow: 0 101 | m_PrefilterSSAOSampleCountMedium: 0 102 | m_PrefilterSSAOSampleCountHigh: 0 103 | m_PrefilterDBufferMRT1: 0 104 | m_PrefilterDBufferMRT2: 0 105 | m_PrefilterDBufferMRT3: 0 106 | m_PrefilterScreenCoord: 0 107 | m_PrefilterNativeRenderPass: 0 108 | m_ShaderVariantLogLevel: 0 109 | m_ShadowCascades: 0 110 | -------------------------------------------------------------------------------- /unity/example/Assets/Settings/High_PipelineAsset.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8c6e29f4bb2e333b09ce18273e59e142 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/Settings/High_PipelineAsset_ForwardRenderer.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} 13 | m_Name: High_PipelineAsset_ForwardRenderer 14 | m_EditorClassIdentifier: 15 | debugShaders: 16 | debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, type: 3} 17 | hdrDebugViewPS: {fileID: 4800000, guid: 573620ae32aec764abd4d728906d2587, type: 3} 18 | m_RendererFeatures: [] 19 | m_RendererFeatureMap: 20 | m_UseNativeRenderPass: 0 21 | postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} 22 | xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2} 23 | shaders: 24 | blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} 25 | copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} 26 | screenSpaceShadowPS: {fileID: 0} 27 | samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} 28 | stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3} 29 | fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} 30 | fallbackLoadingPS: {fileID: 4800000, guid: 7f888aff2ac86494babad1c2c5daeee2, type: 3} 31 | materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3} 32 | coreBlitPS: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3} 33 | coreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b, type: 3} 34 | blitHDROverlay: {fileID: 4800000, guid: a89bee29cffa951418fc1e2da94d1959, type: 3} 35 | cameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf, type: 3} 36 | objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486, type: 3} 37 | m_AssetVersion: 2 38 | m_OpaqueLayerMask: 39 | serializedVersion: 2 40 | m_Bits: 4294967295 41 | m_TransparentLayerMask: 42 | serializedVersion: 2 43 | m_Bits: 4294967295 44 | m_DefaultStencilState: 45 | overrideStencilState: 0 46 | stencilReference: 0 47 | stencilCompareFunction: 8 48 | passOperation: 2 49 | failOperation: 0 50 | zFailOperation: 0 51 | m_ShadowTransparentReceive: 1 52 | m_RenderingMode: 0 53 | m_DepthPrimingMode: 0 54 | m_CopyDepthMode: 1 55 | m_AccurateGbufferNormals: 0 56 | m_IntermediateTextureMode: 1 57 | -------------------------------------------------------------------------------- /unity/example/Assets/Settings/High_PipelineAsset_ForwardRenderer.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1118b1399981bb2b08fc1b622369b71a 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/Settings/Low_PipelineAsset.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} 13 | m_Name: Low_PipelineAsset 14 | m_EditorClassIdentifier: 15 | k_AssetVersion: 11 16 | k_AssetPreviousVersion: 11 17 | m_RendererType: 1 18 | m_RendererData: {fileID: 0} 19 | m_RendererDataList: 20 | - {fileID: 11400000, guid: 0d5d73d3fde523c90ad6b47a802c160b, type: 2} 21 | m_DefaultRendererIndex: 0 22 | m_RequireDepthTexture: 0 23 | m_RequireOpaqueTexture: 0 24 | m_OpaqueDownsampling: 1 25 | m_SupportsTerrainHoles: 1 26 | m_SupportsHDR: 1 27 | m_HDRColorBufferPrecision: 0 28 | m_MSAA: 1 29 | m_RenderScale: 1 30 | m_UpscalingFilter: 0 31 | m_FsrOverrideSharpness: 0 32 | m_FsrSharpness: 0.92 33 | m_EnableLODCrossFade: 1 34 | m_LODCrossFadeDitheringType: 1 35 | m_ShEvalMode: 0 36 | m_MainLightRenderingMode: 0 37 | m_MainLightShadowsSupported: 0 38 | m_MainLightShadowmapResolution: 1024 39 | m_AdditionalLightsRenderingMode: 2 40 | m_AdditionalLightsPerObjectLimit: 4 41 | m_AdditionalLightShadowsSupported: 0 42 | m_AdditionalLightsShadowmapResolution: 1024 43 | m_AdditionalLightsShadowResolutionTierLow: 256 44 | m_AdditionalLightsShadowResolutionTierMedium: 512 45 | m_AdditionalLightsShadowResolutionTierHigh: 1024 46 | m_ReflectionProbeBlending: 1 47 | m_ReflectionProbeBoxProjection: 1 48 | m_ShadowDistance: 20 49 | m_ShadowCascadeCount: 1 50 | m_Cascade2Split: 0.33333334 51 | m_Cascade3Split: {x: 0.1, y: 0.3} 52 | m_Cascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 53 | m_CascadeBorder: 0.2 54 | m_ShadowDepthBias: 1 55 | m_ShadowNormalBias: 1 56 | m_AnyShadowsSupported: 0 57 | m_SoftShadowsSupported: 0 58 | m_ConservativeEnclosingSphere: 0 59 | m_NumIterationsEnclosingSphere: 64 60 | m_SoftShadowQuality: 2 61 | m_AdditionalLightsCookieResolution: 2048 62 | m_AdditionalLightsCookieFormat: 3 63 | m_UseSRPBatcher: 1 64 | m_SupportsDynamicBatching: 0 65 | m_MixedLightingSupported: 1 66 | m_SupportsLightCookies: 1 67 | m_SupportsLightLayers: 0 68 | m_DebugLevel: 0 69 | m_StoreActionsOptimization: 0 70 | m_EnableRenderGraph: 0 71 | m_UseAdaptivePerformance: 1 72 | m_ColorGradingMode: 0 73 | m_ColorGradingLutSize: 32 74 | m_UseFastSRGBLinearConversion: 0 75 | m_ShadowType: 1 76 | m_LocalShadowsSupported: 0 77 | m_LocalShadowsAtlasResolution: 256 78 | m_MaxPixelLights: 0 79 | m_ShadowAtlasResolution: 256 80 | m_VolumeFrameworkUpdateMode: 0 81 | m_Textures: 82 | blueNoise64LTex: {fileID: 0} 83 | bayerMatrixTex: {fileID: 0} 84 | m_PrefilteringModeMainLightShadows: 1 85 | m_PrefilteringModeAdditionalLight: 4 86 | m_PrefilteringModeAdditionalLightShadows: 1 87 | m_PrefilterXRKeywords: 0 88 | m_PrefilteringModeForwardPlus: 1 89 | m_PrefilteringModeDeferredRendering: 1 90 | m_PrefilteringModeScreenSpaceOcclusion: 1 91 | m_PrefilterDebugKeywords: 0 92 | m_PrefilterWriteRenderingLayers: 0 93 | m_PrefilterHDROutput: 0 94 | m_PrefilterSSAODepthNormals: 0 95 | m_PrefilterSSAOSourceDepthLow: 0 96 | m_PrefilterSSAOSourceDepthMedium: 0 97 | m_PrefilterSSAOSourceDepthHigh: 0 98 | m_PrefilterSSAOInterleaved: 0 99 | m_PrefilterSSAOBlueNoise: 0 100 | m_PrefilterSSAOSampleCountLow: 0 101 | m_PrefilterSSAOSampleCountMedium: 0 102 | m_PrefilterSSAOSampleCountHigh: 0 103 | m_PrefilterDBufferMRT1: 0 104 | m_PrefilterDBufferMRT2: 0 105 | m_PrefilterDBufferMRT3: 0 106 | m_PrefilterScreenCoord: 0 107 | m_PrefilterNativeRenderPass: 0 108 | m_ShaderVariantLogLevel: 0 109 | m_ShadowCascades: 0 110 | -------------------------------------------------------------------------------- /unity/example/Assets/Settings/Low_PipelineAsset.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ad07f61982ed81e2e8480160dbbee8fd 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/Settings/Low_PipelineAsset_ForwardRenderer.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} 13 | m_Name: Low_PipelineAsset_ForwardRenderer 14 | m_EditorClassIdentifier: 15 | debugShaders: 16 | debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, type: 3} 17 | hdrDebugViewPS: {fileID: 4800000, guid: 573620ae32aec764abd4d728906d2587, type: 3} 18 | m_RendererFeatures: [] 19 | m_RendererFeatureMap: 20 | m_UseNativeRenderPass: 0 21 | postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} 22 | xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2} 23 | shaders: 24 | blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} 25 | copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} 26 | screenSpaceShadowPS: {fileID: 0} 27 | samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} 28 | stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3} 29 | fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} 30 | fallbackLoadingPS: {fileID: 4800000, guid: 7f888aff2ac86494babad1c2c5daeee2, type: 3} 31 | materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3} 32 | coreBlitPS: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3} 33 | coreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b, type: 3} 34 | blitHDROverlay: {fileID: 4800000, guid: a89bee29cffa951418fc1e2da94d1959, type: 3} 35 | cameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf, type: 3} 36 | objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486, type: 3} 37 | m_AssetVersion: 2 38 | m_OpaqueLayerMask: 39 | serializedVersion: 2 40 | m_Bits: 4294967295 41 | m_TransparentLayerMask: 42 | serializedVersion: 2 43 | m_Bits: 4294967295 44 | m_DefaultStencilState: 45 | overrideStencilState: 0 46 | stencilReference: 0 47 | stencilCompareFunction: 8 48 | passOperation: 2 49 | failOperation: 0 50 | zFailOperation: 0 51 | m_ShadowTransparentReceive: 1 52 | m_RenderingMode: 0 53 | m_DepthPrimingMode: 0 54 | m_CopyDepthMode: 1 55 | m_AccurateGbufferNormals: 0 56 | m_IntermediateTextureMode: 1 57 | -------------------------------------------------------------------------------- /unity/example/Assets/Settings/Low_PipelineAsset_ForwardRenderer.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0d5d73d3fde523c90ad6b47a802c160b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/Settings/Medium_PipelineAsset.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} 13 | m_Name: Medium_PipelineAsset 14 | m_EditorClassIdentifier: 15 | k_AssetVersion: 11 16 | k_AssetPreviousVersion: 11 17 | m_RendererType: 1 18 | m_RendererData: {fileID: 0} 19 | m_RendererDataList: 20 | - {fileID: 11400000, guid: 17a7e02ab11f4c3b0b74d8279f5bb10c, type: 2} 21 | m_DefaultRendererIndex: 0 22 | m_RequireDepthTexture: 0 23 | m_RequireOpaqueTexture: 0 24 | m_OpaqueDownsampling: 1 25 | m_SupportsTerrainHoles: 1 26 | m_SupportsHDR: 1 27 | m_HDRColorBufferPrecision: 0 28 | m_MSAA: 1 29 | m_RenderScale: 1 30 | m_UpscalingFilter: 0 31 | m_FsrOverrideSharpness: 0 32 | m_FsrSharpness: 0.92 33 | m_EnableLODCrossFade: 1 34 | m_LODCrossFadeDitheringType: 1 35 | m_ShEvalMode: 0 36 | m_MainLightRenderingMode: 1 37 | m_MainLightShadowsSupported: 1 38 | m_MainLightShadowmapResolution: 1024 39 | m_AdditionalLightsRenderingMode: 1 40 | m_AdditionalLightsPerObjectLimit: 1 41 | m_AdditionalLightShadowsSupported: 1 42 | m_AdditionalLightsShadowmapResolution: 1024 43 | m_AdditionalLightsShadowResolutionTierLow: 256 44 | m_AdditionalLightsShadowResolutionTierMedium: 512 45 | m_AdditionalLightsShadowResolutionTierHigh: 1024 46 | m_ReflectionProbeBlending: 1 47 | m_ReflectionProbeBoxProjection: 1 48 | m_ShadowDistance: 20 49 | m_ShadowCascadeCount: 1 50 | m_Cascade2Split: 0.33333334 51 | m_Cascade3Split: {x: 0.1, y: 0.3} 52 | m_Cascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 53 | m_CascadeBorder: 0.2 54 | m_ShadowDepthBias: 1 55 | m_ShadowNormalBias: 1 56 | m_AnyShadowsSupported: 1 57 | m_SoftShadowsSupported: 0 58 | m_ConservativeEnclosingSphere: 0 59 | m_NumIterationsEnclosingSphere: 64 60 | m_SoftShadowQuality: 2 61 | m_AdditionalLightsCookieResolution: 2048 62 | m_AdditionalLightsCookieFormat: 3 63 | m_UseSRPBatcher: 1 64 | m_SupportsDynamicBatching: 0 65 | m_MixedLightingSupported: 1 66 | m_SupportsLightCookies: 1 67 | m_SupportsLightLayers: 0 68 | m_DebugLevel: 0 69 | m_StoreActionsOptimization: 0 70 | m_EnableRenderGraph: 0 71 | m_UseAdaptivePerformance: 1 72 | m_ColorGradingMode: 0 73 | m_ColorGradingLutSize: 32 74 | m_UseFastSRGBLinearConversion: 0 75 | m_ShadowType: 1 76 | m_LocalShadowsSupported: 0 77 | m_LocalShadowsAtlasResolution: 256 78 | m_MaxPixelLights: 0 79 | m_ShadowAtlasResolution: 256 80 | m_VolumeFrameworkUpdateMode: 0 81 | m_Textures: 82 | blueNoise64LTex: {fileID: 0} 83 | bayerMatrixTex: {fileID: 0} 84 | m_PrefilteringModeMainLightShadows: 1 85 | m_PrefilteringModeAdditionalLight: 4 86 | m_PrefilteringModeAdditionalLightShadows: 1 87 | m_PrefilterXRKeywords: 0 88 | m_PrefilteringModeForwardPlus: 1 89 | m_PrefilteringModeDeferredRendering: 1 90 | m_PrefilteringModeScreenSpaceOcclusion: 1 91 | m_PrefilterDebugKeywords: 0 92 | m_PrefilterWriteRenderingLayers: 0 93 | m_PrefilterHDROutput: 0 94 | m_PrefilterSSAODepthNormals: 0 95 | m_PrefilterSSAOSourceDepthLow: 0 96 | m_PrefilterSSAOSourceDepthMedium: 0 97 | m_PrefilterSSAOSourceDepthHigh: 0 98 | m_PrefilterSSAOInterleaved: 0 99 | m_PrefilterSSAOBlueNoise: 0 100 | m_PrefilterSSAOSampleCountLow: 0 101 | m_PrefilterSSAOSampleCountMedium: 0 102 | m_PrefilterSSAOSampleCountHigh: 0 103 | m_PrefilterDBufferMRT1: 0 104 | m_PrefilterDBufferMRT2: 0 105 | m_PrefilterDBufferMRT3: 0 106 | m_PrefilterScreenCoord: 0 107 | m_PrefilterNativeRenderPass: 0 108 | m_ShaderVariantLogLevel: 0 109 | m_ShadowCascades: 0 110 | -------------------------------------------------------------------------------- /unity/example/Assets/Settings/Medium_PipelineAsset.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0a4d55c94c7c36d2d94df554b0069461 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/Settings/Medium_PipelineAsset_ForwardRenderer.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} 13 | m_Name: Medium_PipelineAsset_ForwardRenderer 14 | m_EditorClassIdentifier: 15 | debugShaders: 16 | debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, type: 3} 17 | hdrDebugViewPS: {fileID: 4800000, guid: 573620ae32aec764abd4d728906d2587, type: 3} 18 | m_RendererFeatures: [] 19 | m_RendererFeatureMap: 20 | m_UseNativeRenderPass: 0 21 | postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} 22 | xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2} 23 | shaders: 24 | blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} 25 | copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} 26 | screenSpaceShadowPS: {fileID: 0} 27 | samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} 28 | stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3} 29 | fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} 30 | fallbackLoadingPS: {fileID: 4800000, guid: 7f888aff2ac86494babad1c2c5daeee2, type: 3} 31 | materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3} 32 | coreBlitPS: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3} 33 | coreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b, type: 3} 34 | blitHDROverlay: {fileID: 4800000, guid: a89bee29cffa951418fc1e2da94d1959, type: 3} 35 | cameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf, type: 3} 36 | objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486, type: 3} 37 | m_AssetVersion: 2 38 | m_OpaqueLayerMask: 39 | serializedVersion: 2 40 | m_Bits: 4294967295 41 | m_TransparentLayerMask: 42 | serializedVersion: 2 43 | m_Bits: 4294967295 44 | m_DefaultStencilState: 45 | overrideStencilState: 0 46 | stencilReference: 0 47 | stencilCompareFunction: 8 48 | passOperation: 2 49 | failOperation: 0 50 | zFailOperation: 0 51 | m_ShadowTransparentReceive: 1 52 | m_RenderingMode: 0 53 | m_DepthPrimingMode: 0 54 | m_CopyDepthMode: 1 55 | m_AccurateGbufferNormals: 0 56 | m_IntermediateTextureMode: 1 57 | -------------------------------------------------------------------------------- /unity/example/Assets/Settings/Medium_PipelineAsset_ForwardRenderer.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 17a7e02ab11f4c3b0b74d8279f5bb10c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/Settings/Very High_PipelineAsset.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} 13 | m_Name: Very High_PipelineAsset 14 | m_EditorClassIdentifier: 15 | k_AssetVersion: 11 16 | k_AssetPreviousVersion: 11 17 | m_RendererType: 1 18 | m_RendererData: {fileID: 0} 19 | m_RendererDataList: 20 | - {fileID: 11400000, guid: e14e8db873e4efed58dee41d8fa1d396, type: 2} 21 | m_DefaultRendererIndex: 0 22 | m_RequireDepthTexture: 1 23 | m_RequireOpaqueTexture: 0 24 | m_OpaqueDownsampling: 1 25 | m_SupportsTerrainHoles: 1 26 | m_SupportsHDR: 1 27 | m_HDRColorBufferPrecision: 0 28 | m_MSAA: 2 29 | m_RenderScale: 1 30 | m_UpscalingFilter: 0 31 | m_FsrOverrideSharpness: 0 32 | m_FsrSharpness: 0.92 33 | m_EnableLODCrossFade: 1 34 | m_LODCrossFadeDitheringType: 1 35 | m_ShEvalMode: 0 36 | m_MainLightRenderingMode: 1 37 | m_MainLightShadowsSupported: 1 38 | m_MainLightShadowmapResolution: 4096 39 | m_AdditionalLightsRenderingMode: 1 40 | m_AdditionalLightsPerObjectLimit: 3 41 | m_AdditionalLightShadowsSupported: 1 42 | m_AdditionalLightsShadowmapResolution: 4096 43 | m_AdditionalLightsShadowResolutionTierLow: 256 44 | m_AdditionalLightsShadowResolutionTierMedium: 512 45 | m_AdditionalLightsShadowResolutionTierHigh: 1024 46 | m_ReflectionProbeBlending: 1 47 | m_ReflectionProbeBoxProjection: 1 48 | m_ShadowDistance: 70 49 | m_ShadowCascadeCount: 2 50 | m_Cascade2Split: 0.33333334 51 | m_Cascade3Split: {x: 0.1, y: 0.3} 52 | m_Cascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 53 | m_CascadeBorder: 0.2 54 | m_ShadowDepthBias: 1 55 | m_ShadowNormalBias: 1 56 | m_AnyShadowsSupported: 1 57 | m_SoftShadowsSupported: 1 58 | m_ConservativeEnclosingSphere: 0 59 | m_NumIterationsEnclosingSphere: 64 60 | m_SoftShadowQuality: 2 61 | m_AdditionalLightsCookieResolution: 2048 62 | m_AdditionalLightsCookieFormat: 3 63 | m_UseSRPBatcher: 1 64 | m_SupportsDynamicBatching: 0 65 | m_MixedLightingSupported: 1 66 | m_SupportsLightCookies: 1 67 | m_SupportsLightLayers: 0 68 | m_DebugLevel: 0 69 | m_StoreActionsOptimization: 0 70 | m_EnableRenderGraph: 0 71 | m_UseAdaptivePerformance: 1 72 | m_ColorGradingMode: 0 73 | m_ColorGradingLutSize: 32 74 | m_UseFastSRGBLinearConversion: 0 75 | m_ShadowType: 1 76 | m_LocalShadowsSupported: 0 77 | m_LocalShadowsAtlasResolution: 256 78 | m_MaxPixelLights: 0 79 | m_ShadowAtlasResolution: 256 80 | m_VolumeFrameworkUpdateMode: 0 81 | m_Textures: 82 | blueNoise64LTex: {fileID: 0} 83 | bayerMatrixTex: {fileID: 0} 84 | m_PrefilteringModeMainLightShadows: 1 85 | m_PrefilteringModeAdditionalLight: 4 86 | m_PrefilteringModeAdditionalLightShadows: 1 87 | m_PrefilterXRKeywords: 0 88 | m_PrefilteringModeForwardPlus: 1 89 | m_PrefilteringModeDeferredRendering: 1 90 | m_PrefilteringModeScreenSpaceOcclusion: 1 91 | m_PrefilterDebugKeywords: 0 92 | m_PrefilterWriteRenderingLayers: 0 93 | m_PrefilterHDROutput: 0 94 | m_PrefilterSSAODepthNormals: 0 95 | m_PrefilterSSAOSourceDepthLow: 0 96 | m_PrefilterSSAOSourceDepthMedium: 0 97 | m_PrefilterSSAOSourceDepthHigh: 0 98 | m_PrefilterSSAOInterleaved: 0 99 | m_PrefilterSSAOBlueNoise: 0 100 | m_PrefilterSSAOSampleCountLow: 0 101 | m_PrefilterSSAOSampleCountMedium: 0 102 | m_PrefilterSSAOSampleCountHigh: 0 103 | m_PrefilterDBufferMRT1: 0 104 | m_PrefilterDBufferMRT2: 0 105 | m_PrefilterDBufferMRT3: 0 106 | m_PrefilterScreenCoord: 0 107 | m_PrefilterNativeRenderPass: 0 108 | m_ShaderVariantLogLevel: 0 109 | m_ShadowCascades: 0 110 | -------------------------------------------------------------------------------- /unity/example/Assets/Settings/Very High_PipelineAsset.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8281ac0031813d7e886a47a8987c8833 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/Settings/Very High_PipelineAsset_ForwardRenderer.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} 13 | m_Name: Very High_PipelineAsset_ForwardRenderer 14 | m_EditorClassIdentifier: 15 | debugShaders: 16 | debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, type: 3} 17 | hdrDebugViewPS: {fileID: 4800000, guid: 573620ae32aec764abd4d728906d2587, type: 3} 18 | m_RendererFeatures: [] 19 | m_RendererFeatureMap: 20 | m_UseNativeRenderPass: 0 21 | postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} 22 | xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2} 23 | shaders: 24 | blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} 25 | copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} 26 | screenSpaceShadowPS: {fileID: 0} 27 | samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} 28 | stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3} 29 | fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} 30 | fallbackLoadingPS: {fileID: 4800000, guid: 7f888aff2ac86494babad1c2c5daeee2, type: 3} 31 | materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3} 32 | coreBlitPS: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3} 33 | coreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b, type: 3} 34 | blitHDROverlay: {fileID: 4800000, guid: a89bee29cffa951418fc1e2da94d1959, type: 3} 35 | cameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf, type: 3} 36 | objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486, type: 3} 37 | m_AssetVersion: 2 38 | m_OpaqueLayerMask: 39 | serializedVersion: 2 40 | m_Bits: 4294967295 41 | m_TransparentLayerMask: 42 | serializedVersion: 2 43 | m_Bits: 4294967295 44 | m_DefaultStencilState: 45 | overrideStencilState: 0 46 | stencilReference: 0 47 | stencilCompareFunction: 8 48 | passOperation: 2 49 | failOperation: 0 50 | zFailOperation: 0 51 | m_ShadowTransparentReceive: 1 52 | m_RenderingMode: 0 53 | m_DepthPrimingMode: 0 54 | m_CopyDepthMode: 1 55 | m_AccurateGbufferNormals: 0 56 | m_IntermediateTextureMode: 1 57 | -------------------------------------------------------------------------------- /unity/example/Assets/Settings/Very High_PipelineAsset_ForwardRenderer.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e14e8db873e4efed58dee41d8fa1d396 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/Settings/Very Low_PipelineAsset.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} 13 | m_Name: Very Low_PipelineAsset 14 | m_EditorClassIdentifier: 15 | k_AssetVersion: 11 16 | k_AssetPreviousVersion: 11 17 | m_RendererType: 1 18 | m_RendererData: {fileID: 0} 19 | m_RendererDataList: 20 | - {fileID: 11400000, guid: a38bebc5237dbc9d682fa0222fbee560, type: 2} 21 | m_DefaultRendererIndex: 0 22 | m_RequireDepthTexture: 0 23 | m_RequireOpaqueTexture: 0 24 | m_OpaqueDownsampling: 1 25 | m_SupportsTerrainHoles: 1 26 | m_SupportsHDR: 1 27 | m_HDRColorBufferPrecision: 0 28 | m_MSAA: 1 29 | m_RenderScale: 1 30 | m_UpscalingFilter: 0 31 | m_FsrOverrideSharpness: 0 32 | m_FsrSharpness: 0.92 33 | m_EnableLODCrossFade: 1 34 | m_LODCrossFadeDitheringType: 1 35 | m_ShEvalMode: 0 36 | m_MainLightRenderingMode: 0 37 | m_MainLightShadowsSupported: 0 38 | m_MainLightShadowmapResolution: 1024 39 | m_AdditionalLightsRenderingMode: 2 40 | m_AdditionalLightsPerObjectLimit: 4 41 | m_AdditionalLightShadowsSupported: 0 42 | m_AdditionalLightsShadowmapResolution: 1024 43 | m_AdditionalLightsShadowResolutionTierLow: 256 44 | m_AdditionalLightsShadowResolutionTierMedium: 512 45 | m_AdditionalLightsShadowResolutionTierHigh: 1024 46 | m_ReflectionProbeBlending: 1 47 | m_ReflectionProbeBoxProjection: 1 48 | m_ShadowDistance: 15 49 | m_ShadowCascadeCount: 1 50 | m_Cascade2Split: 0.33333334 51 | m_Cascade3Split: {x: 0.1, y: 0.3} 52 | m_Cascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 53 | m_CascadeBorder: 0.2 54 | m_ShadowDepthBias: 1 55 | m_ShadowNormalBias: 1 56 | m_AnyShadowsSupported: 0 57 | m_SoftShadowsSupported: 0 58 | m_ConservativeEnclosingSphere: 0 59 | m_NumIterationsEnclosingSphere: 64 60 | m_SoftShadowQuality: 2 61 | m_AdditionalLightsCookieResolution: 2048 62 | m_AdditionalLightsCookieFormat: 3 63 | m_UseSRPBatcher: 1 64 | m_SupportsDynamicBatching: 0 65 | m_MixedLightingSupported: 1 66 | m_SupportsLightCookies: 1 67 | m_SupportsLightLayers: 0 68 | m_DebugLevel: 0 69 | m_StoreActionsOptimization: 0 70 | m_EnableRenderGraph: 0 71 | m_UseAdaptivePerformance: 1 72 | m_ColorGradingMode: 0 73 | m_ColorGradingLutSize: 32 74 | m_UseFastSRGBLinearConversion: 0 75 | m_ShadowType: 1 76 | m_LocalShadowsSupported: 0 77 | m_LocalShadowsAtlasResolution: 256 78 | m_MaxPixelLights: 0 79 | m_ShadowAtlasResolution: 256 80 | m_VolumeFrameworkUpdateMode: 0 81 | m_Textures: 82 | blueNoise64LTex: {fileID: 0} 83 | bayerMatrixTex: {fileID: 0} 84 | m_PrefilteringModeMainLightShadows: 1 85 | m_PrefilteringModeAdditionalLight: 4 86 | m_PrefilteringModeAdditionalLightShadows: 1 87 | m_PrefilterXRKeywords: 0 88 | m_PrefilteringModeForwardPlus: 1 89 | m_PrefilteringModeDeferredRendering: 1 90 | m_PrefilteringModeScreenSpaceOcclusion: 1 91 | m_PrefilterDebugKeywords: 0 92 | m_PrefilterWriteRenderingLayers: 0 93 | m_PrefilterHDROutput: 0 94 | m_PrefilterSSAODepthNormals: 0 95 | m_PrefilterSSAOSourceDepthLow: 0 96 | m_PrefilterSSAOSourceDepthMedium: 0 97 | m_PrefilterSSAOSourceDepthHigh: 0 98 | m_PrefilterSSAOInterleaved: 0 99 | m_PrefilterSSAOBlueNoise: 0 100 | m_PrefilterSSAOSampleCountLow: 0 101 | m_PrefilterSSAOSampleCountMedium: 0 102 | m_PrefilterSSAOSampleCountHigh: 0 103 | m_PrefilterDBufferMRT1: 0 104 | m_PrefilterDBufferMRT2: 0 105 | m_PrefilterDBufferMRT3: 0 106 | m_PrefilterScreenCoord: 0 107 | m_PrefilterNativeRenderPass: 0 108 | m_ShaderVariantLogLevel: 0 109 | m_ShadowCascades: 0 110 | -------------------------------------------------------------------------------- /unity/example/Assets/Settings/Very Low_PipelineAsset.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a7c7eed761393be0a8e3b7899033ed3 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/Settings/Very Low_PipelineAsset_ForwardRenderer.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} 13 | m_Name: Very Low_PipelineAsset_ForwardRenderer 14 | m_EditorClassIdentifier: 15 | debugShaders: 16 | debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, type: 3} 17 | hdrDebugViewPS: {fileID: 4800000, guid: 573620ae32aec764abd4d728906d2587, type: 3} 18 | m_RendererFeatures: [] 19 | m_RendererFeatureMap: 20 | m_UseNativeRenderPass: 0 21 | postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} 22 | xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2} 23 | shaders: 24 | blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} 25 | copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} 26 | screenSpaceShadowPS: {fileID: 0} 27 | samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} 28 | stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3} 29 | fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} 30 | fallbackLoadingPS: {fileID: 4800000, guid: 7f888aff2ac86494babad1c2c5daeee2, type: 3} 31 | materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3} 32 | coreBlitPS: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3} 33 | coreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b, type: 3} 34 | blitHDROverlay: {fileID: 4800000, guid: a89bee29cffa951418fc1e2da94d1959, type: 3} 35 | cameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf, type: 3} 36 | objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486, type: 3} 37 | m_AssetVersion: 2 38 | m_OpaqueLayerMask: 39 | serializedVersion: 2 40 | m_Bits: 4294967295 41 | m_TransparentLayerMask: 42 | serializedVersion: 2 43 | m_Bits: 4294967295 44 | m_DefaultStencilState: 45 | overrideStencilState: 0 46 | stencilReference: 0 47 | stencilCompareFunction: 8 48 | passOperation: 2 49 | failOperation: 0 50 | zFailOperation: 0 51 | m_ShadowTransparentReceive: 1 52 | m_RenderingMode: 0 53 | m_DepthPrimingMode: 0 54 | m_CopyDepthMode: 1 55 | m_AccurateGbufferNormals: 0 56 | m_IntermediateTextureMode: 1 57 | -------------------------------------------------------------------------------- /unity/example/Assets/Settings/Very Low_PipelineAsset_ForwardRenderer.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a38bebc5237dbc9d682fa0222fbee560 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/URPAsset.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} 13 | m_Name: URPAsset 14 | m_EditorClassIdentifier: 15 | k_AssetVersion: 11 16 | k_AssetPreviousVersion: 11 17 | m_RendererType: 1 18 | m_RendererData: {fileID: 0} 19 | m_RendererDataList: 20 | - {fileID: 11400000, guid: 24411bb8ccc0621ae88acdc5dfde850a, type: 2} 21 | m_DefaultRendererIndex: 0 22 | m_RequireDepthTexture: 0 23 | m_RequireOpaqueTexture: 0 24 | m_OpaqueDownsampling: 1 25 | m_SupportsTerrainHoles: 1 26 | m_SupportsHDR: 1 27 | m_HDRColorBufferPrecision: 0 28 | m_MSAA: 1 29 | m_RenderScale: 1 30 | m_UpscalingFilter: 0 31 | m_FsrOverrideSharpness: 0 32 | m_FsrSharpness: 0.92 33 | m_EnableLODCrossFade: 1 34 | m_LODCrossFadeDitheringType: 1 35 | m_ShEvalMode: 0 36 | m_MainLightRenderingMode: 1 37 | m_MainLightShadowsSupported: 1 38 | m_MainLightShadowmapResolution: 2048 39 | m_AdditionalLightsRenderingMode: 1 40 | m_AdditionalLightsPerObjectLimit: 4 41 | m_AdditionalLightShadowsSupported: 0 42 | m_AdditionalLightsShadowmapResolution: 2048 43 | m_AdditionalLightsShadowResolutionTierLow: 256 44 | m_AdditionalLightsShadowResolutionTierMedium: 512 45 | m_AdditionalLightsShadowResolutionTierHigh: 1024 46 | m_ReflectionProbeBlending: 0 47 | m_ReflectionProbeBoxProjection: 0 48 | m_ShadowDistance: 50 49 | m_ShadowCascadeCount: 1 50 | m_Cascade2Split: 0.25 51 | m_Cascade3Split: {x: 0.1, y: 0.3} 52 | m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467} 53 | m_CascadeBorder: 0.2 54 | m_ShadowDepthBias: 1 55 | m_ShadowNormalBias: 1 56 | m_AnyShadowsSupported: 1 57 | m_SoftShadowsSupported: 1 58 | m_ConservativeEnclosingSphere: 1 59 | m_NumIterationsEnclosingSphere: 64 60 | m_SoftShadowQuality: 2 61 | m_AdditionalLightsCookieResolution: 2048 62 | m_AdditionalLightsCookieFormat: 3 63 | m_UseSRPBatcher: 1 64 | m_SupportsDynamicBatching: 0 65 | m_MixedLightingSupported: 1 66 | m_SupportsLightCookies: 1 67 | m_SupportsLightLayers: 0 68 | m_DebugLevel: 0 69 | m_StoreActionsOptimization: 0 70 | m_EnableRenderGraph: 0 71 | m_UseAdaptivePerformance: 1 72 | m_ColorGradingMode: 0 73 | m_ColorGradingLutSize: 32 74 | m_UseFastSRGBLinearConversion: 0 75 | m_ShadowType: 1 76 | m_LocalShadowsSupported: 0 77 | m_LocalShadowsAtlasResolution: 256 78 | m_MaxPixelLights: 0 79 | m_ShadowAtlasResolution: 256 80 | m_VolumeFrameworkUpdateMode: 0 81 | m_Textures: 82 | blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3} 83 | bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3} 84 | m_PrefilteringModeMainLightShadows: 1 85 | m_PrefilteringModeAdditionalLight: 4 86 | m_PrefilteringModeAdditionalLightShadows: 1 87 | m_PrefilterXRKeywords: 0 88 | m_PrefilteringModeForwardPlus: 1 89 | m_PrefilteringModeDeferredRendering: 1 90 | m_PrefilteringModeScreenSpaceOcclusion: 1 91 | m_PrefilterDebugKeywords: 0 92 | m_PrefilterWriteRenderingLayers: 0 93 | m_PrefilterHDROutput: 0 94 | m_PrefilterSSAODepthNormals: 0 95 | m_PrefilterSSAOSourceDepthLow: 0 96 | m_PrefilterSSAOSourceDepthMedium: 0 97 | m_PrefilterSSAOSourceDepthHigh: 0 98 | m_PrefilterSSAOInterleaved: 0 99 | m_PrefilterSSAOBlueNoise: 0 100 | m_PrefilterSSAOSampleCountLow: 0 101 | m_PrefilterSSAOSampleCountMedium: 0 102 | m_PrefilterSSAOSampleCountHigh: 0 103 | m_PrefilterDBufferMRT1: 0 104 | m_PrefilterDBufferMRT2: 0 105 | m_PrefilterDBufferMRT3: 0 106 | m_PrefilterScreenCoord: 0 107 | m_PrefilterNativeRenderPass: 0 108 | m_ShaderVariantLogLevel: 0 109 | m_ShadowCascades: 0 110 | -------------------------------------------------------------------------------- /unity/example/Assets/URPAsset.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca64da1cf34c6d337b308d69219aa759 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/URPAsset_Renderer.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} 13 | m_Name: URPAsset_Renderer 14 | m_EditorClassIdentifier: 15 | debugShaders: 16 | debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, type: 3} 17 | hdrDebugViewPS: {fileID: 4800000, guid: 573620ae32aec764abd4d728906d2587, type: 3} 18 | m_RendererFeatures: [] 19 | m_RendererFeatureMap: 20 | m_UseNativeRenderPass: 0 21 | postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} 22 | xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2} 23 | shaders: 24 | blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} 25 | copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} 26 | screenSpaceShadowPS: {fileID: 0} 27 | samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} 28 | stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3} 29 | fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} 30 | fallbackLoadingPS: {fileID: 4800000, guid: 7f888aff2ac86494babad1c2c5daeee2, type: 3} 31 | materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3} 32 | coreBlitPS: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3} 33 | coreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b, type: 3} 34 | blitHDROverlay: {fileID: 4800000, guid: a89bee29cffa951418fc1e2da94d1959, type: 3} 35 | cameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf, type: 3} 36 | objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486, type: 3} 37 | m_AssetVersion: 2 38 | m_OpaqueLayerMask: 39 | serializedVersion: 2 40 | m_Bits: 4294967295 41 | m_TransparentLayerMask: 42 | serializedVersion: 2 43 | m_Bits: 4294967295 44 | m_DefaultStencilState: 45 | overrideStencilState: 0 46 | stencilReference: 0 47 | stencilCompareFunction: 8 48 | passOperation: 2 49 | failOperation: 0 50 | zFailOperation: 0 51 | m_ShadowTransparentReceive: 1 52 | m_RenderingMode: 2 53 | m_DepthPrimingMode: 0 54 | m_CopyDepthMode: 1 55 | m_AccurateGbufferNormals: 0 56 | m_IntermediateTextureMode: 1 57 | -------------------------------------------------------------------------------- /unity/example/Assets/URPAsset_Renderer.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 24411bb8ccc0621ae88acdc5dfde850a 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/UniversalRenderPipelineGlobalSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 2ec995e51a6e251468d2a3fd8a686257, type: 3} 13 | m_Name: UniversalRenderPipelineGlobalSettings 14 | m_EditorClassIdentifier: 15 | m_ShaderVariantLogLevel: 0 16 | m_ExportShaderVariants: 1 17 | k_AssetVersion: 3 18 | m_RenderingLayerNames: 19 | - Default 20 | m_ValidRenderingLayers: 1 21 | lightLayerName0: 22 | lightLayerName1: 23 | lightLayerName2: 24 | lightLayerName3: 25 | lightLayerName4: 26 | lightLayerName5: 27 | lightLayerName6: 28 | lightLayerName7: 29 | m_StripDebugVariants: 1 30 | m_StripUnusedPostProcessingVariants: 0 31 | m_StripUnusedVariants: 1 32 | m_StripUnusedLODCrossFadeVariants: 1 33 | m_StripScreenCoordOverrideVariants: 1 34 | supportRuntimeDebugDisplay: 0 35 | -------------------------------------------------------------------------------- /unity/example/Assets/UniversalRenderPipelineGlobalSettings.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f82fc4d46cac1c1f8bf406d7b479eca 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/unrust.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e7a93221b3cfcdb969e21a7a386a9d40 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Assets/unrust/CubePrefabsAuthoring.cs: -------------------------------------------------------------------------------- 1 | using Unity.Entities; 2 | using UnityEngine; 3 | using unrust.runtime; 4 | 5 | namespace unrust.userland 6 | { 7 | public class CubePrefabsAuthoring : MonoBehaviour { 8 | public GameObject HelloCube; 9 | 10 | public const int RESOURCE_ID = 0; 11 | 12 | class Baker : Baker 13 | { 14 | public override void Bake(CubePrefabsAuthoring authoring) 15 | { 16 | var containerEntity = GetEntity(TransformUsageFlags.None); 17 | var buffer = AddBuffer(containerEntity).Reinterpret(); 18 | 19 | buffer.Add(GetEntity(authoring.HelloCube, TransformUsageFlags.Dynamic)); 20 | 21 | AddComponent(containerEntity, new UnrustResourceID { Value = 0}); 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /unity/example/Assets/unrust/CubePrefabsAuthoring.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb28d8b316bceb255a8017c7abcb4799 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/example/Assets/unrust/DoRotateAuthoring.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using Unity.Entities; 3 | using UnityEngine; 4 | 5 | namespace unrust.userland 6 | { 7 | [StructLayout(LayoutKind.Sequential)] 8 | public struct DoRotate : IComponentData 9 | { 10 | public float speed; 11 | } 12 | 13 | public class DoRotateAuthoring : MonoBehaviour 14 | { 15 | public float speed; 16 | 17 | class Baker : Baker 18 | { 19 | public override void Bake(DoRotateAuthoring authoring) 20 | { 21 | var entity = GetEntity(TransformUsageFlags.Dynamic); 22 | AddComponent(entity, new DoRotate 23 | { 24 | speed = authoring.speed, 25 | }); 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /unity/example/Assets/unrust/DoRotateAuthoring.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a455bbecf3a6afa65a77e3e94799392a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/example/Assets/unrust/GameStateAuthoring.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using Unity.Entities; 3 | using UnityEngine; 4 | 5 | namespace unrust.userland 6 | { 7 | [StructLayout(LayoutKind.Sequential)] 8 | public struct GameState : IComponentData 9 | { 10 | public sbyte Value; 11 | } 12 | 13 | public class GameStateAuthoring : MonoBehaviour 14 | { 15 | public enum ENUM_GameState : sbyte 16 | { 17 | HelloCubeSimple = 0, 18 | PrefabCube = 1, 19 | Parenting = 2, 20 | Enableable = 3, 21 | Boids = 4, 22 | } 23 | 24 | [SerializeField] 25 | public ENUM_GameState GameState; 26 | 27 | class Baker : Baker 28 | { 29 | public override void Bake(GameStateAuthoring authoring) 30 | { 31 | var entity = GetEntity(TransformUsageFlags.None); 32 | AddComponent(entity, new GameState 33 | { 34 | Value = (sbyte)authoring.GameState 35 | }); 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /unity/example/Assets/unrust/GameStateAuthoring.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9699696b616b48f0c9d6c626cd00a0c5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/example/Assets/unrust/UnrustComponent.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace unrust.userland 4 | { 5 | [StructLayout(LayoutKind.Sequential)] 6 | public struct CustomData 7 | { 8 | public CustomType ty; 9 | public CustomComponents value; 10 | } 11 | 12 | public enum CustomType : byte 13 | { 14 | DoRotate = 0, 15 | } 16 | 17 | [StructLayout(LayoutKind.Explicit)] 18 | public struct CustomComponents 19 | { 20 | public const int ComponentCount = 1; 21 | [FieldOffset(0)] public DoRotate DoRotate; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /unity/example/Assets/unrust/UnrustComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 08620966d8df04b259c8cb956a49f800 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/example/Assets/unrust/UnrustGame.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "UnrustGame", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:1ddaf467366a55d3ea7a9916ec68b0a2", 6 | "GUID:734d92eba21c94caba915361bd5ac177", 7 | "GUID:e0cd26848372d4e5c891c569017e11f1", 8 | "GUID:8819f35a0fc84499b990e90a4ca1911f" 9 | ], 10 | "includePlatforms": [], 11 | "excludePlatforms": [], 12 | "allowUnsafeCode": true, 13 | "overrideReferences": false, 14 | "precompiledReferences": [], 15 | "autoReferenced": true, 16 | "defineConstraints": [], 17 | "versionDefines": [], 18 | "noEngineReferences": false 19 | } -------------------------------------------------------------------------------- /unity/example/Assets/unrust/UnrustGame.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b07cc625b686e194e9e6604587ca2266 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/example/Assets/unrust/UnrustHooks.cs: -------------------------------------------------------------------------------- 1 | using Unity.Entities; 2 | using UnityEngine; 3 | using unrust.runtime; 4 | 5 | namespace unrust.userland 6 | { 7 | public static class UnrustHooks 8 | { 9 | [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] 10 | static void Initialize() 11 | { 12 | NativeWrapper.CustomCreates = CreateCallback; 13 | } 14 | 15 | public static unsafe ulong CreateCallback(EntityManager manager, Entity entity, CustomCreateCallback cb) 16 | { 17 | var count = 0; 18 | var arr = new CustomData[CustomComponents.ComponentCount]; 19 | 20 | if (manager.HasComponent(entity)) 21 | { 22 | arr[count] = new CustomData 23 | { 24 | ty = CustomType.DoRotate, 25 | value = new CustomComponents { DoRotate = manager.GetComponentData(entity) }, 26 | }; 27 | count++; 28 | } 29 | 30 | var stateCount = 0; 31 | var stateArr = new CustomState[CustomState.CustomStateCount]; 32 | 33 | if (manager.HasComponent(entity)) 34 | { 35 | stateArr[stateCount] = new CustomState 36 | { 37 | ty = CustomStateType.GameState, 38 | value = manager.GetComponentData(entity).Value, 39 | }; 40 | stateCount++; 41 | } 42 | 43 | fixed (void* ptr = arr) 44 | { 45 | fixed (void* state = stateArr) 46 | { 47 | return cb(ptr, (nuint)count, state, (nuint)stateCount); 48 | } 49 | } 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /unity/example/Assets/unrust/UnrustHooks.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1161cc7e0f33c4bc8a0df267f20597a0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/example/Assets/unrust/UnrustState.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace unrust.userland 4 | { 5 | [StructLayout(LayoutKind.Sequential)] 6 | public struct CustomState 7 | { 8 | public const int CustomStateCount = 1; 9 | public CustomStateType ty; 10 | public sbyte value; 11 | } 12 | 13 | public enum CustomStateType: byte 14 | { 15 | GameState = 0 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /unity/example/Assets/unrust/UnrustState.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe3b28d8c12cbf72b9efb5f277b236fe 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /unity/example/Assets/unrust/libgame.so.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c319a8024b19043beb3660fd1747c071 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 1 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | userData: 26 | assetBundleName: 27 | assetBundleVariant: 28 | -------------------------------------------------------------------------------- /unity/example/Assets/unrust/unrustGameSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 0171dacff6a52124383d02c16882d136, type: 3} 13 | m_Name: unrustGameSettings 14 | m_EditorClassIdentifier: 15 | pathToProject: ../game/Cargo.toml 16 | -------------------------------------------------------------------------------- /unity/example/Assets/unrust/unrustGameSettings.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fc905312e49a293beae55d1d178ce50f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/example/Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.collab-proxy": "2.0.4", 4 | "com.unity.entities.graphics": "1.0.14", 5 | "com.unity.feature.development": "1.0.1", 6 | "com.unity.render-pipelines.universal": "14.0.7", 7 | "com.unity.textmeshpro": "3.0.6", 8 | "com.unity.timeline": "1.7.4", 9 | "com.unity.toolchain.linux-x86_64": "2.0.6", 10 | "com.unity.ugui": "1.0.0", 11 | "com.unity.visualscripting": "1.8.0", 12 | "com.wavefunk.unrust": "file:../../sdk", 13 | "com.unity.modules.ai": "1.0.0", 14 | "com.unity.modules.androidjni": "1.0.0", 15 | "com.unity.modules.animation": "1.0.0", 16 | "com.unity.modules.assetbundle": "1.0.0", 17 | "com.unity.modules.audio": "1.0.0", 18 | "com.unity.modules.cloth": "1.0.0", 19 | "com.unity.modules.director": "1.0.0", 20 | "com.unity.modules.imageconversion": "1.0.0", 21 | "com.unity.modules.imgui": "1.0.0", 22 | "com.unity.modules.jsonserialize": "1.0.0", 23 | "com.unity.modules.particlesystem": "1.0.0", 24 | "com.unity.modules.physics": "1.0.0", 25 | "com.unity.modules.physics2d": "1.0.0", 26 | "com.unity.modules.screencapture": "1.0.0", 27 | "com.unity.modules.terrain": "1.0.0", 28 | "com.unity.modules.terrainphysics": "1.0.0", 29 | "com.unity.modules.tilemap": "1.0.0", 30 | "com.unity.modules.ui": "1.0.0", 31 | "com.unity.modules.uielements": "1.0.0", 32 | "com.unity.modules.umbra": "1.0.0", 33 | "com.unity.modules.unityanalytics": "1.0.0", 34 | "com.unity.modules.unitywebrequest": "1.0.0", 35 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 36 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 37 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 38 | "com.unity.modules.unitywebrequestwww": "1.0.0", 39 | "com.unity.modules.vehicles": "1.0.0", 40 | "com.unity.modules.video": "1.0.0", 41 | "com.unity.modules.vr": "1.0.0", 42 | "com.unity.modules.wind": "1.0.0", 43 | "com.unity.modules.xr": "1.0.0" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /unity/example/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 1024 20 | -------------------------------------------------------------------------------- /unity/example/ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /unity/example/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | m_DefaultMaxAngluarSpeed: 7 35 | -------------------------------------------------------------------------------- /unity/example/ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /unity/example/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_SerializeInlineMappingsOnOneLine: 1 31 | -------------------------------------------------------------------------------- /unity/example/ProjectSettings/EntitiesClientSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: e2ea235c1fcfe29488ed97c467a0da53, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | FilterSettings: 16 | ExcludedBakingSystemAssemblies: [] 17 | -------------------------------------------------------------------------------- /unity/example/ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 15 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_DepthNormals: 17 | m_Mode: 1 18 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 19 | m_MotionVectors: 20 | m_Mode: 1 21 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 22 | m_LightHalo: 23 | m_Mode: 1 24 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LensFlare: 26 | m_Mode: 1 27 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 28 | m_VideoShadersIncludeMode: 2 29 | m_AlwaysIncludedShaders: 30 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 31 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 32 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 36 | m_PreloadedShaders: [] 37 | m_PreloadShadersBatchTimeLimit: -1 38 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 39 | m_CustomRenderPipeline: {fileID: 11400000, guid: ca64da1cf34c6d337b308d69219aa759, type: 2} 40 | m_TransparencySortMode: 0 41 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 42 | m_DefaultRenderingPath: 1 43 | m_DefaultMobileRenderingPath: 1 44 | m_TierSettings: [] 45 | m_LightmapStripping: 0 46 | m_FogStripping: 0 47 | m_InstancingStripping: 0 48 | m_BrgStripping: 0 49 | m_LightmapKeepPlain: 1 50 | m_LightmapKeepDirCombined: 1 51 | m_LightmapKeepDynamicPlain: 1 52 | m_LightmapKeepDynamicDirCombined: 1 53 | m_LightmapKeepShadowMask: 1 54 | m_LightmapKeepSubtractive: 1 55 | m_FogKeepLinear: 1 56 | m_FogKeepExp: 1 57 | m_FogKeepExp2: 1 58 | m_AlbedoSwatchInfos: [] 59 | m_LightsUseLinearIntensity: 0 60 | m_LightsUseColorTemperature: 1 61 | m_DefaultRenderingLayerMask: 1 62 | m_LogWhenShaderIsCompiled: 0 63 | m_SRPDefaultSettings: 64 | UnityEngine.Rendering.Universal.UniversalRenderPipeline: {fileID: 11400000, guid: 6f82fc4d46cac1c1f8bf406d7b479eca, type: 2} 65 | m_LightProbeOutsideHullStrategy: 0 66 | m_CameraRelativeLightCulling: 0 67 | m_CameraRelativeShadowCulling: 0 68 | -------------------------------------------------------------------------------- /unity/example/ProjectSettings/MemorySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!387306366 &1 4 | MemorySettings: 5 | m_ObjectHideFlags: 0 6 | m_EditorMemorySettings: 7 | m_MainAllocatorBlockSize: -1 8 | m_ThreadAllocatorBlockSize: -1 9 | m_MainGfxBlockSize: -1 10 | m_ThreadGfxBlockSize: -1 11 | m_CacheBlockSize: -1 12 | m_TypetreeBlockSize: -1 13 | m_ProfilerBlockSize: -1 14 | m_ProfilerEditorBlockSize: -1 15 | m_BucketAllocatorGranularity: -1 16 | m_BucketAllocatorBucketsCount: -1 17 | m_BucketAllocatorBlockSize: -1 18 | m_BucketAllocatorBlockCount: -1 19 | m_ProfilerBucketAllocatorGranularity: -1 20 | m_ProfilerBucketAllocatorBucketsCount: -1 21 | m_ProfilerBucketAllocatorBlockSize: -1 22 | m_ProfilerBucketAllocatorBlockCount: -1 23 | m_TempAllocatorSizeMain: -1 24 | m_JobTempAllocatorBlockSize: -1 25 | m_BackgroundJobTempAllocatorBlockSize: -1 26 | m_JobTempAllocatorReducedBlockSize: -1 27 | m_TempAllocatorSizeGIBakingWorker: -1 28 | m_TempAllocatorSizeNavMeshWorker: -1 29 | m_TempAllocatorSizeAudioWorker: -1 30 | m_TempAllocatorSizeCloudWorker: -1 31 | m_TempAllocatorSizeGfx: -1 32 | m_TempAllocatorSizeJobWorker: -1 33 | m_TempAllocatorSizeBackgroundWorker: -1 34 | m_TempAllocatorSizePreloadManager: -1 35 | m_PlatformMemorySettings: {} 36 | -------------------------------------------------------------------------------- /unity/example/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /unity/example/ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreReleasePackages: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | m_SeeAllPackageVersions: 0 20 | oneTimeWarningShown: 0 21 | m_Registries: 22 | - m_Id: main 23 | m_Name: 24 | m_Url: https://packages.unity.com 25 | m_Scopes: [] 26 | m_IsDefault: 1 27 | m_Capabilities: 7 28 | m_UserSelectedRegistryName: 29 | m_UserAddingNewScopedRegistry: 0 30 | m_RegistryInfoDraft: 31 | m_Modified: 0 32 | m_ErrorMessage: 33 | m_UserModificationsInstanceId: -830 34 | m_OriginalInstanceId: -832 35 | m_LoadAssets: 0 36 | -------------------------------------------------------------------------------- /unity/example/ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "m_Dictionary": { 3 | "m_DictionaryValues": [] 4 | } 5 | } -------------------------------------------------------------------------------- /unity/example/ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /unity/example/ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /unity/example/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2022.3.0f1 2 | m_EditorVersionWithRevision: 2022.3.0f1 (fb119bb0b476) 3 | -------------------------------------------------------------------------------- /unity/example/ProjectSettings/SceneTemplateSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "templatePinStates": [], 3 | "dependencyTypeInfos": [ 4 | { 5 | "userAdded": false, 6 | "type": "UnityEngine.AnimationClip", 7 | "ignore": false, 8 | "defaultInstantiationMode": 0, 9 | "supportsModification": true 10 | }, 11 | { 12 | "userAdded": false, 13 | "type": "UnityEditor.Animations.AnimatorController", 14 | "ignore": false, 15 | "defaultInstantiationMode": 0, 16 | "supportsModification": true 17 | }, 18 | { 19 | "userAdded": false, 20 | "type": "UnityEngine.AnimatorOverrideController", 21 | "ignore": false, 22 | "defaultInstantiationMode": 0, 23 | "supportsModification": true 24 | }, 25 | { 26 | "userAdded": false, 27 | "type": "UnityEditor.Audio.AudioMixerController", 28 | "ignore": false, 29 | "defaultInstantiationMode": 0, 30 | "supportsModification": true 31 | }, 32 | { 33 | "userAdded": false, 34 | "type": "UnityEngine.ComputeShader", 35 | "ignore": true, 36 | "defaultInstantiationMode": 1, 37 | "supportsModification": true 38 | }, 39 | { 40 | "userAdded": false, 41 | "type": "UnityEngine.Cubemap", 42 | "ignore": false, 43 | "defaultInstantiationMode": 0, 44 | "supportsModification": true 45 | }, 46 | { 47 | "userAdded": false, 48 | "type": "UnityEngine.GameObject", 49 | "ignore": false, 50 | "defaultInstantiationMode": 0, 51 | "supportsModification": true 52 | }, 53 | { 54 | "userAdded": false, 55 | "type": "UnityEditor.LightingDataAsset", 56 | "ignore": false, 57 | "defaultInstantiationMode": 0, 58 | "supportsModification": false 59 | }, 60 | { 61 | "userAdded": false, 62 | "type": "UnityEngine.LightingSettings", 63 | "ignore": false, 64 | "defaultInstantiationMode": 0, 65 | "supportsModification": true 66 | }, 67 | { 68 | "userAdded": false, 69 | "type": "UnityEngine.Material", 70 | "ignore": false, 71 | "defaultInstantiationMode": 0, 72 | "supportsModification": true 73 | }, 74 | { 75 | "userAdded": false, 76 | "type": "UnityEditor.MonoScript", 77 | "ignore": true, 78 | "defaultInstantiationMode": 1, 79 | "supportsModification": true 80 | }, 81 | { 82 | "userAdded": false, 83 | "type": "UnityEngine.PhysicMaterial", 84 | "ignore": false, 85 | "defaultInstantiationMode": 0, 86 | "supportsModification": true 87 | }, 88 | { 89 | "userAdded": false, 90 | "type": "UnityEngine.PhysicsMaterial2D", 91 | "ignore": false, 92 | "defaultInstantiationMode": 0, 93 | "supportsModification": true 94 | }, 95 | { 96 | "userAdded": false, 97 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile", 98 | "ignore": false, 99 | "defaultInstantiationMode": 0, 100 | "supportsModification": true 101 | }, 102 | { 103 | "userAdded": false, 104 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources", 105 | "ignore": false, 106 | "defaultInstantiationMode": 0, 107 | "supportsModification": true 108 | }, 109 | { 110 | "userAdded": false, 111 | "type": "UnityEngine.Rendering.VolumeProfile", 112 | "ignore": false, 113 | "defaultInstantiationMode": 0, 114 | "supportsModification": true 115 | }, 116 | { 117 | "userAdded": false, 118 | "type": "UnityEditor.SceneAsset", 119 | "ignore": false, 120 | "defaultInstantiationMode": 0, 121 | "supportsModification": false 122 | }, 123 | { 124 | "userAdded": false, 125 | "type": "UnityEngine.Shader", 126 | "ignore": true, 127 | "defaultInstantiationMode": 1, 128 | "supportsModification": true 129 | }, 130 | { 131 | "userAdded": false, 132 | "type": "UnityEngine.ShaderVariantCollection", 133 | "ignore": true, 134 | "defaultInstantiationMode": 1, 135 | "supportsModification": true 136 | }, 137 | { 138 | "userAdded": false, 139 | "type": "UnityEngine.Texture", 140 | "ignore": false, 141 | "defaultInstantiationMode": 0, 142 | "supportsModification": true 143 | }, 144 | { 145 | "userAdded": false, 146 | "type": "UnityEngine.Texture2D", 147 | "ignore": false, 148 | "defaultInstantiationMode": 0, 149 | "supportsModification": true 150 | }, 151 | { 152 | "userAdded": false, 153 | "type": "UnityEngine.Timeline.TimelineAsset", 154 | "ignore": false, 155 | "defaultInstantiationMode": 0, 156 | "supportsModification": true 157 | } 158 | ], 159 | "defaultDependencyTypeInfo": { 160 | "userAdded": false, 161 | "type": "", 162 | "ignore": false, 163 | "defaultInstantiationMode": 1, 164 | "supportsModification": true 165 | }, 166 | "newSceneOverride": 0 167 | } -------------------------------------------------------------------------------- /unity/example/ProjectSettings/ShaderGraphSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: de02f9e1d18f588468e474319d09a723, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | customInterpolatorErrorThreshold: 32 16 | customInterpolatorWarningThreshold: 16 17 | -------------------------------------------------------------------------------- /unity/example/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /unity/example/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /unity/example/ProjectSettings/URPProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 247994e1f5a72c2419c26a37e9334c01, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_LastMaterialVersion: 7 16 | -------------------------------------------------------------------------------- /unity/example/ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_DashboardUrl: https://dashboard.unity3d.com 13 | m_TestInitMode: 0 14 | CrashReportingSettings: 15 | m_EventUrl: https://perf-events.cloud.unity3d.com 16 | m_Enabled: 0 17 | m_LogBufferSize: 10 18 | m_CaptureEditorExceptions: 1 19 | UnityPurchasingSettings: 20 | m_Enabled: 0 21 | m_TestMode: 0 22 | UnityAnalyticsSettings: 23 | m_Enabled: 0 24 | m_TestMode: 0 25 | m_InitializeOnStartup: 1 26 | m_PackageRequiringCoreStatsPresent: 0 27 | UnityAdsSettings: 28 | m_Enabled: 0 29 | m_InitializeOnStartup: 1 30 | m_TestMode: 0 31 | m_IosGameId: 32 | m_AndroidGameId: 33 | m_GameIds: {} 34 | m_GameId: 35 | PerformanceReportingSettings: 36 | m_Enabled: 0 37 | -------------------------------------------------------------------------------- /unity/example/ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /unity/example/ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /unity/example/ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /unity/example/game/Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | 3 | [package] 4 | name = "game" 5 | version = "0.1.0" 6 | edition = "2021" 7 | 8 | [build-dependencies] 9 | anyhow = "1" 10 | unrust = { path = "../../../pkg/unrust" } 11 | 12 | [lib] 13 | crate-type = ["cdylib"] 14 | 15 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 16 | 17 | [dependencies] 18 | unrust = { path = "../../../pkg/unrust" } 19 | tracing = "0.1" 20 | rand = "0.8.5" 21 | serde = { version = "1.0", features = ["derive"] } 22 | bevy_common_assets = { version = "0.7.0", features = ["toml"] } 23 | 24 | [patch.crates-io] 25 | genco = { git = "https://github.com/udoprog/genco", branch = "proc-macro2-fork" } 26 | proc-macro2 = { git = "https://github.com/udoprog/proc-macro2", branch = "span-locations" } -------------------------------------------------------------------------------- /unity/example/game/build.rs: -------------------------------------------------------------------------------- 1 | fn main() -> anyhow::Result<()> { 2 | unrust::generate_csharp("./src/types.rs", "../Assets/unrust") 3 | } 4 | -------------------------------------------------------------------------------- /unity/example/game/src/hello_cube_enableable.rs: -------------------------------------------------------------------------------- 1 | use crate::types::DoRotate; 2 | use rand::Rng; 3 | use std::f32::consts::TAU; 4 | use unrust::bevy::ecs as bevy_ecs; 5 | use unrust::bevy::prelude::*; 6 | 7 | #[derive(Default, Component)] 8 | pub(crate) struct Clock { 9 | pub time_left: f32, 10 | pub toggle: bool, 11 | } 12 | 13 | pub(crate) fn init_rotation_timer( 14 | mut cubes: Query<(Entity, &DoRotate), Without>, 15 | mut commands: Commands, 16 | ) { 17 | let mut rng = rand::thread_rng(); 18 | for (entity, _) in &mut cubes { 19 | let mut comm = commands.entity(entity); 20 | comm.insert(Clock { 21 | time_left: 1.0 + rng.gen::() * 3.0, 22 | toggle: false, 23 | }); 24 | } 25 | } 26 | 27 | pub(crate) fn enable_disable_rotation(mut cubes: Query<(&DoRotate, &mut Clock)>, timer: Res