Compare commits

...

153 Commits

Author SHA1 Message Date
mafiesto4 b84ccc2cbc **Update to .NET 10** 2026-06-04 11:37:53 +02:00
mafiesto4 775e978fed Merge remote-tracking branch 'origin/master' into 1.13
# Conflicts:
#	Flax.flaxproj
#	Source/Engine/Level/Actors/StaticModel.cpp
#	Source/Engine/Level/Prefabs/Prefab.cpp
#	Source/Engine/Tools/ModelTool/ModelTool.cpp
2026-06-03 17:15:38 +02:00
mafiesto4 e450658834 Remove deprecated mono runtime backend
Old `mono` backend was not maintained for since 1.7 (July 2023)
`dotnet` backend still can run `mono` on AOT platforms but with the latest .NET features.
2026-06-03 16:35:06 +02:00
mafiesto4 a544cbcfde Add mesh index buffer optimization based on meshoptimizer library
Work similar to existing impl but yields better results with even less overdraw.
2026-06-01 18:41:45 +02:00
mafiesto4 45f7c1f0a0 Add detecting Vulkan SDK version 2026-06-01 16:39:11 +02:00
mafiesto4 13aa6ce4a0 Another attempt to fix new Vulkan SDK install on macOS 2026-06-01 16:25:02 +02:00
mafiesto4 c2b2d6973b Merge branch '1.13' of https://gitlab.flaxengine.com/flax/flaxengine into 1.13 2026-06-01 16:19:30 +02:00
mafiesto4 96835b856d Fix StringViewAnsi substring to not allocate 2026-06-01 16:19:28 +02:00
mafiesto4 caeecf2aea Update Vulkan API to 1.4 on macOS and iOS 2026-06-01 16:19:04 +02:00
mafiesto4 db963f9191 Another attempt to fix new Vulkan SDK install on macOS 2026-06-01 16:10:00 +02:00
mafiesto4 4b6c22c43f Fix game build regression from f55ac81fe4 2026-06-01 15:52:18 +02:00
mafiesto4 d3be79fdc4 Fix missing SDK print for ones from modules or plugins 2026-06-01 15:50:25 +02:00
mafiesto4 8231bae16b Fix new Vulkan SDK install 2026-06-01 15:19:41 +02:00
mafiesto4 f55ac81fe4 Update to the latest Vulkan SDK 1.4.350
Update Vulkan API to `1.2` on Windows
Update Vulkan API to `1.1` on Android
2026-06-01 14:19:09 +02:00
mafiesto4 d181f8d726 Fix DDGI sampling when using non-directional lighting (eg. smoke particles or volumetric fog) 2026-05-31 12:29:52 +02:00
mafiesto4 2a37a529b9 Fix missing Debug module headers from exception helper folder 2026-05-31 12:29:14 +02:00
mafiesto4 7f370a7c5b Add improvements to DDGI sampling and filtering in areas far from probes 2026-05-31 12:28:56 +02:00
mafiesto4 0f38fca0b1 Minor fixes 2026-05-30 14:28:28 +02:00
mafiesto4 0b47e63ba3 Fix regression from 0a39d88221 to display selected enum properly 2026-05-30 13:36:48 +02:00
mafiesto4 a0663666bb Disable recurring editor build verbose log to be used once 2026-05-30 13:35:49 +02:00
mafiesto4 17ff4623e7 Fix DDGI cascade movement to be less vertical along the view 2026-05-20 23:20:30 +02:00
mafiesto4 0a39d88221 Fix editing flag enum to properly toggle bits incl. bit masks 2026-05-20 18:18:25 +02:00
mafiesto4 92a0a40d16 Add Global SDF Overdraw debug mode for content optimizations 2026-05-20 16:20:45 +02:00
mafiesto4 8d8d69b847 Add Optimization sub-group in view modes list 2026-05-19 21:19:32 +02:00
mafiesto4 5dac5d3f2d Refactor GPU Debug Layers to be manually activated with -gpudebug
Debug builds don't activate it by default. Can be sued in both Debug and Development builds.
`GPU_ENABLE_DIAGNOSTICS` renamed to `GPU_ENABLE_DEBUG_LAYER`
`GPU_ENABLE_WINDOW_SRV` renamed to `GPU_ENABLE_WINDOW_SRV`
`GPU_USE_SHADERS_DEBUG_LAYER` renamed to `GPU_ENABLE_SHADERS_DEBUG_LAYER`
2026-05-19 15:26:01 +02:00
mafiesto4 03126e1840 Fix missing objects when performing Global Surface Atlas defragmentation after failed insert 2026-05-19 14:02:35 +02:00
mafiesto4 9e96206d67 Merge remote-tracking branch 'origin/master' into 1.13 2026-05-19 10:55:14 +02:00
mafiesto4 3bf3264f48 Fix compilation with the latest GDK 2026-05-14 18:28:17 +02:00
mafiesto4 b043490413 Merge remote-tracking branch 'origin/master' into 1.13 2026-05-13 18:20:30 +02:00
mafiesto4 48f302b4fd Fix rare asset loading problems 2026-05-13 16:05:03 +02:00
mafiesto4 d9c787a661 Merge remote-tracking branch 'origin/master' into 1.13
# Conflicts:
#	Source/Editor/SceneGraph/GUI/ActorTreeNode.cs
#	Source/Engine/Graphics/Graphics.h
#	Source/Engine/Renderer/ShadowsPass.cpp
2026-05-13 16:03:53 +02:00
mafiesto4 ec9f05fe11 Fix memory alloc when renaming GPU resource on Vulkan 2026-05-12 17:10:28 +02:00
mafiesto4 b039e3779d Fix Global Surface Atlas tiles padding and position precision to have proper stability 2026-05-12 17:10:02 +02:00
mafiesto4 fc8a9b69d2 Move new Temporal AA code to shared header 2026-05-12 17:09:21 +02:00
mafiesto4 b38f6c5721 Merge branch 'HydrogenC-reverse-z' into 1.13 2026-05-12 17:07:50 +02:00
mafiesto4 0c1af2f243 Fix various rendering elements with Reversed Z enabled and simplify code
#2684
2026-05-11 18:26:21 +02:00
mafiesto4 7f2ba7a81e Fix shaders cache to be invalidated when changing ReverseZ option
#2684
2026-05-08 10:53:40 +02:00
mafiesto4 fb21ffd3be Rename FLAX_REVERSE_Z macro to REVERSE_Z
#2684
2026-05-08 10:52:46 +02:00
mafiesto4 7127ccda37 Fix depth bounds in reversed Z
#2684
2026-05-08 09:02:17 +02:00
mafiesto4 ead71e6836 Add support for using macros in scripting function parameter default values 2026-05-07 23:01:16 +02:00
mafiesto4 241441d5b9 Merge branch 'reverse-z' of https://github.com/HydrogenC/FlaxEngine into HydrogenC-reverse-z
# Conflicts:
#	Source/Engine/Graphics/GPUDevice.cpp
#	Source/Engine/Graphics/Materials/DeferredMaterialShader.cpp
#	Source/Engine/Graphics/Materials/ForwardMaterialShader.cpp
#	Source/Engine/Graphics/Materials/TerrainMaterialShader.cpp
#	Source/Engine/Renderer/LightPass.cpp
#	Source/Engine/Renderer/ReflectionsPass.cpp
#	Source/Engine/Renderer/ShadowsPass.cpp
#	Source/Shaders/SSR.hlsl
#	Source/Shaders/ShadowsSampling.hlsl
#	Source/Shaders/Sky.shader
2026-05-07 19:55:03 +02:00
mafiesto4 14b0fb355a Fix compilation with Large Worlds 2026-05-07 18:27:36 +02:00
mafiesto4 4489f43777 Add DefaultProbeCubemapFormat to Graphics Settings with option to compress env probe textures 2026-05-07 18:20:34 +02:00
mafiesto4 c17a9f653e Add minor improvements and adjust 3rd DDGI cascade for better world coverage 2026-05-07 16:38:15 +02:00
mafiesto4 e7fd901807 Add improved fallback GI outside the DDGI range to use a special ambient probe for stability 2026-05-07 16:21:17 +02:00
mafiesto4 bdabcd5e43 Fix regression to properly resume render pass when flushing barriers mid-pass
141a8de0da
2026-05-07 09:03:22 +02:00
mafiesto4 6cc8f693f3 Fix directional light rendering to be skipped when color alpha is zero 2026-05-07 08:41:48 +02:00
mafiesto4 1079791bed Add rendering stats for Data Upload 2026-05-07 00:02:33 +02:00
mafiesto4 627f3a2dec Show full timespan in editor incl. seconds 2026-05-06 17:31:27 +02:00
mafiesto4 2f05a0987e Add ShowInPlayMode to HideInEditor attribute for properties/fields that should display in editor only during play mode 2026-05-06 16:54:34 +02:00
mafiesto4 6335bcdc93 Add in-built editors for DateTime and TimeSpan 2026-05-06 16:42:38 +02:00
mafiesto4 650fa781d3 Simplify shader code for point/spot lights to use permutations instead 2026-05-06 12:59:35 +02:00
mafiesto4 000d786d49 Add Temporal Antialiasing as default AA method 2026-05-06 12:39:49 +02:00
mafiesto4 3eb85000aa Fix error when drag&drop new actor on Windows in Editor 2026-05-06 12:39:32 +02:00
mafiesto4 9c5daf419b Fix default shadow depth bias values and control them based on shadow resolution/quality mix 2026-05-06 12:39:15 +02:00
mafiesto4 9a85ae7142 Add soft PCSS shadows on Ultra quality
Add new `SourceAngle` property to Directional light that controls PCSS penumbra size
2026-05-06 12:37:42 +02:00
mafiesto4 fad0f7a345 Compact PCF shadow sampling code 2026-05-05 08:47:57 +02:00
mafiesto4 aac399c6a1 Add CascadeBlendSize to Directional Light and fix sun shadow fade at distance 2026-05-04 23:41:00 +02:00
mafiesto4 4c5035e433 Fix scene search performance regression 2026-05-04 23:05:25 +02:00
mafiesto4 b14c2cfc74 Optimize Global Surface Atlas full direct lighting redraw to copy whole emissive atlas at once 2026-05-04 18:11:01 +02:00
mafiesto4 cbcfa4013b Add Graphics::MotionVectors::MinObjectScreenSize to skip too small objects from drawing motion vectors 2026-05-04 17:29:58 +02:00
mafiesto4 429f8e5336 Add highlight to Motion Vectors Debug view for better content optimizing 2026-05-04 16:43:41 +02:00
mafiesto4 6cc0edf0eb Optimize shadows and depth rendering with instancing support for transparent shaders 2026-05-04 15:12:40 +02:00
mafiesto4 f7d8f36add Optimize draw calls batching and instancing with better sort keys generation and processing 2026-05-04 12:34:29 +02:00
mafiesto4 2e98300693 Add minor changes 2026-05-04 08:47:21 +02:00
mafiesto4 83de99877c Fix directional light cascaded shadow maps rendering stability 2026-05-04 08:46:43 +02:00
mafiesto4 7a569d4f14 Add selection drawing and picking gizmo to Foliage Types editing tab 2026-04-30 18:19:12 +02:00
mafiesto4 24675ace93 Refactor Temporal Anti-Aliasing shader to have less ghosting and quality scalability
Fix lots of ghosting artifacts.
Fix aliasing on small cables/lines during camera movement.
Add scalability via AA Quality setting for TAA.
2026-04-30 17:58:19 +02:00
mafiesto4 3a5d831e71 Minor changes 2026-04-29 18:34:39 +02:00
mafiesto4 0aecb35ab1 Fix Global Surface Atlas rasterization of objects with negative scale 2026-04-29 18:34:14 +02:00
mafiesto4 c4bb39aeac Improve Global Surface Atlas objects dirtying limit to pick the largers objects first 2026-04-29 17:52:51 +02:00
mafiesto4 61431a6400 Optimize Global Surface Atlas defragmentation with copying old atlas to avoid redrawing all objects 2026-04-29 17:19:40 +02:00
mafiesto4 d4da1d80d0 Optimize Global Surface Atlas with object draws limit per frame 2026-04-29 17:05:17 +02:00
mafiesto4 3bede1d6bc Optimize Global Surface Atlas updates distribution for subobjects (eg. foliage instances) 2026-04-28 22:21:38 +02:00
mafiesto4 ce4ad8aa71 Optimize RendererAllocation by reducing fragmentation with operating on power-of-2 blocks 2026-04-28 21:55:52 +02:00
mafiesto4 75bd206416 Fix regression crash on Vulkan when clearing many textures at once 2026-04-28 20:19:35 +02:00
mafiesto4 578af12f2b Optimize Global Surface Atlas objects to cache shader data 2026-04-28 20:18:18 +02:00
mafiesto4 acbbd34ecf Optimize scene rendering async job to use interleaved ranges instead of fighting for a shared index 2026-04-28 13:16:44 +02:00
mafiesto4 c8b06ba7ec Optimize scene rendering loop to cache more data on stack 2026-04-28 13:07:19 +02:00
mafiesto4 ad46b74f6a Optimize foliage drawing by caching per-instance world matrix 2026-04-28 12:50:19 +02:00
mafiesto4 47a9d76938 Optimize foliage drawing memory access a bit more 2026-04-28 11:48:52 +02:00
mafiesto4 442cb8f2dd Minor improvements 2026-04-28 00:25:31 +02:00
mafiesto4 45e121bf77 Fix Guid diff serialization and loading invalid values 2026-04-28 00:24:57 +02:00
mafiesto4 8e76d0d9d8 Fix GPUTexture.DownloadData to use correct bindings api 2026-04-28 00:24:34 +02:00
mafiesto4 f4905cfccc Optimize foliage rendering with less cache misses 2026-04-28 00:24:05 +02:00
mafiesto4 bf9a015959 Optimize FoliageInstance size to cut down memory by and reduce cache misses when drawing foliage 2026-04-27 22:54:11 +02:00
mafiesto4 4fd7f51fdf Optimize LightmapUVs to be stored already as Half4 to avoid runtime conversions during rendering 2026-04-27 21:53:11 +02:00
mafiesto4 f5e483069d Optimize CPU rendering of shadowed foliage by splitting draw contexts into separate async jobs 2026-04-27 17:14:56 +02:00
mafiesto4 0bd28ecb65 Fix compilation 2026-04-27 16:09:28 +02:00
mafiesto4 9eec54171c Fix compilation on Linux 2026-04-27 14:37:00 +02:00
mafiesto4 486781661e Optimize foliage instance bounds calculations 2026-04-27 14:32:19 +02:00
mafiesto4 b201897ae6 Optimize foliage serialization by batching instance data, performing quantization, and LZ4 compression
Cuts down foliage data size by over 50% and improves load times.
2026-04-27 14:30:19 +02:00
mafiesto4 c33ada2715 Fix unnecessary memory allocations within D3D object debug name assignment 2026-04-27 14:27:32 +02:00
mafiesto4 dcb9b5150f Optimize large scene/prefa/json assets metadata loading by avoiding parsing full contents 2026-04-27 14:27:00 +02:00
mafiesto4 f905b4013b Optimize large scene files loading by aligning json pool allocator pages to 64kB 2026-04-27 14:26:12 +02:00
mafiesto4 b0033a35b7 Improve foliage count display in editor tab 2026-04-27 14:25:23 +02:00
mafiesto4 f47a2909fe Update LZ4 library to v1.10 2026-04-27 14:24:56 +02:00
mafiesto4 b1c76ec7f9 Merge remote-tracking branch 'origin/1.12' into 1.13 2026-04-25 10:31:41 +02:00
mafiesto4 db2130f340 Add No parameters text to material instance panel with base material that doesn't have parameters 2026-04-24 23:49:40 +02:00
mafiesto4 edb3badcb3 Optimize content modifications watching events processing in large projects 2026-04-24 23:47:22 +02:00
mafiesto4 c33b2cc11e Optimize first scene startup by preloading it during loading screen 2026-04-24 17:56:12 +02:00
mafiesto4 135110387d Fix loading SceneReference property in Visual Script 2026-04-24 17:55:07 +02:00
mafiesto4 6b3502675a Fix deprecated flag usage when loading scenes over multiple frames 2026-04-24 17:54:40 +02:00
mafiesto4 615e847e01 Add new Level.PreloadSceneAsync for streaming levels before they need to be loaded in 2026-04-24 17:54:25 +02:00
mafiesto4 468e05c6e8 Fix crash on Vulkan when constant buffer is missing 2026-04-24 12:20:32 +02:00
mafiesto4 a46402df6b Merge remote-tracking branch 'origin/1.12' into 1.13 2026-04-24 11:50:19 +02:00
mafiesto4 1fa9aadebd Fix crash on cursor changes regression 2026-04-24 11:50:15 +02:00
mafiesto4 c0f52235c6 Fix compilation on Xbox with new D3D12MA lib used 2026-04-24 11:21:42 +02:00
mafiesto4 c782f07b76 Add GetTextureData function to texture API in C# 2026-04-24 11:21:18 +02:00
mafiesto4 dc9a8a2f84 Fix editor shutdown error when script compilation fails 2026-04-24 11:21:02 +02:00
mafiesto4 49943e13de Fix various API issues 2026-04-24 11:20:45 +02:00
mafiesto4 1988fae929 Add support for loading custom mouse cursor images 2026-04-24 11:20:04 +02:00
mafiesto4 804315bb3e Add VSync support to Vulkan 2026-04-23 20:25:36 +02:00
mafiesto4 0cacc58b53 Fix minor issues in D3D12 2026-04-23 18:39:09 +02:00
mafiesto4 7437b69d52 Add GPUMemoryStats for GPU video memory stats
Add new `Total/GPU` category to memory profiler.
Implement for D3D12 and Vulkan with allocators.
2026-04-23 18:38:47 +02:00
mafiesto4 f5f4fb29f2 Cleanup code and disable unused Json/Dump features from D3D12MA 2026-04-23 17:13:30 +02:00
mafiesto4 33617a702a Add D3D12MemoryAllocator for resource allocations on DX12
v3.1.0
2026-04-23 17:12:26 +02:00
mafiesto4 84b53bb9c8 Optimize various rendering effects with GPUDrawPass 2026-04-23 14:30:02 +02:00
mafiesto4 c3ea883b21 Fix crash on Android when mouse device is not connected 2026-04-23 10:18:43 +02:00
mafiesto4 f41d01f4a9 Optimize Vulkan render passes with a new GPUDrawPass to manually control attachment operations in higher-level API 2026-04-23 10:18:13 +02:00
mafiesto4 141a8de0da Optimize Vulkan texture clears with render pass attachments clear operation 2026-04-23 09:44:31 +02:00
mafiesto4 63b6fafa1b Add Escape key to deselect in Editor 2026-04-23 09:14:19 +02:00
mafiesto4 2ce1103530 Add VersionControlInfo to output game build info and log game version with branch/commit info 2026-04-22 23:11:29 +02:00
mafiesto4 6121a6fadf Merge remote-tracking branch 'origin/1.12' into 1.13 2026-04-22 17:56:23 +02:00
mafiesto4 145134f145 Add 1.13 for future update 2026-04-16 14:31:32 +02:00
ExMatics HydrogenC 3f78e47918 Fix for shadow atlas not being cleared correctly 2024-10-10 22:13:43 +08:00
ExMatics HydrogenC 7b4a9f1a63 Fix depth function 2024-10-10 21:15:46 +08:00
ExMatics HydrogenC 561d40fd71 Merge remote-tracking branch 'upstream/master' into reverse-z 2024-10-10 17:42:43 +08:00
ExMatics HydrogenC 133340b2ea Fix sky color being too dark 2024-06-06 12:56:32 +08:00
ExMatics HydrogenC 344665e34f Merge branch 'reverse-z' of https://github.com/HydrogenC/FlaxEngine into reverse-z 2024-06-06 12:13:51 +08:00
ExMatics HydrogenC 5d188c8c2d Simplify SetMatrix code 2024-06-06 12:13:32 +08:00
ExMatics HydrogenC 9447f3d569 Fix build tool command line 2024-06-06 11:16:00 +08:00
ExMatics HydrogenC df8dc9173a Add command line controls for reverse z 2024-06-06 00:07:28 +08:00
ExMatics HydrogenC b186d19faa Fix typo 2024-06-05 23:37:10 +08:00
ExMatics HydrogenC ea749f12a3 Add depth function to conditional compiling 2024-06-05 23:36:41 +08:00
ExMatics HydrogenC 74750fd604 Fix spot light 2024-06-05 23:09:43 +08:00
ExMatics HydrogenC b52e8bad4c Fix shadow casting 2024-06-05 23:02:21 +08:00
ExMatics HydrogenC 44f8e86245 Fix code depth sampling for unreversed z 2024-06-05 22:39:20 +08:00
ExMatics HydrogenC b036692154 Fix shadow bias and unify indent 2024-06-05 22:36:15 +08:00
ExMatics HydrogenC 5d050ca020 Make reverse z define dynamic 2024-06-05 21:51:07 +08:00
ExMatics HydrogenC 1b6a31b6e5 Finish conditional compiling 2024-06-05 21:15:08 +08:00
ExMatics HydrogenC ab4743fdb1 Add more comditional compiling 2024-06-05 18:20:38 +08:00
ExMatics HydrogenC 49629222c1 Revert VolumeParticle.shader 2024-06-05 07:41:40 +08:00
ExMatics HydrogenC 9d6778ff1e Add a bit conditional compiling 2024-06-05 07:40:03 +08:00
ExMatics HydrogenC ce73394531 add todo in BoundingFrustrum 2024-06-04 23:24:28 +08:00
ExMatics HydrogenC 463c8dba0d fix depth function 2024-06-04 23:22:41 +08:00
ExMatics HydrogenC 9bb6104cf7 Merge remote-tracking branch 'upstream/master' into reverse-z 2024-06-04 12:08:07 +08:00
ExMatics HydrogenC 151f4a4923 Merge branch 'reverse-z' of https://github.com/HydrogenC/FlaxEngine into reverse-z 2024-06-04 12:07:53 +08:00
ExMatics HydrogenC 36f588a792 Fix more shaders 2024-06-04 12:07:50 +08:00
ExMatics HydrogenC 07c7a250cc Revert unexpected deletions 2024-06-04 09:55:06 +08:00
ExMatics HydrogenC eab4a8c404 Fix shaders for reverse z 2024-06-04 09:30:26 +08:00
ExMatics HydrogenC cde3e3d710 Fix editor raycast 2024-06-04 08:39:14 +08:00
ExMatics HydrogenC a8dc67a1b2 Implement reverse z 2024-06-03 22:02:35 +08:00
552 changed files with 22285 additions and 47840 deletions
+5 -5
View File
@@ -3,7 +3,7 @@ description: Downloads and installs Vulkan SDK.
inputs:
vulkan-version:
description: 'Vulkan SDK release version (e.g. 1.2.198.1).'
default: '1.3.290.0'
default: '1.4.350.0'
required: false
runs:
using: "composite"
@@ -24,13 +24,13 @@ runs:
;;
Darwin)
export VULKAN_SDK_ROOT=`pwd`/../VulkanSDK
curl -LO "https://sdk.lunarg.com/sdk/download/$VULKAN_SDK_VER/mac/vulkan-sdk.dmg"
hdiutil attach vulkan-sdk.dmg -mountpoint /Volumes/vulkan-sdk
sudo "/Volumes/vulkan-sdk/InstallVulkan.app/Contents/MacOS/InstallVulkan" --root $VULKAN_SDK_ROOT --accept-licenses --default-answer --confirm-command install
curl -LO "https://sdk.lunarg.com/sdk/download/$VULKAN_SDK_VER/mac/vulkansdk-macos-$VULKAN_SDK_VER.zip"
unzip vulkansdk-macos-$VULKAN_SDK_VER.zip
sudo "vulkansdk-macos-$VULKAN_SDK_VER.app/Contents/MacOS/vulkansdk-macOS-$VULKAN_SDK_VER" --root $VULKAN_SDK_ROOT --accept-licenses --default-answer --confirm-command install
export VULKAN_SDK=$VULKAN_SDK_ROOT/macOS
;;
*) # Windows
curl -L -o vulkan-sdk.exe https://sdk.lunarg.com/sdk/download/$VULKAN_SDK_VER/windows/VulkanSDK-$VULKAN_SDK_VER-Installer.exe
curl -L -o vulkan-sdk.exe https://sdk.lunarg.com/sdk/download/$VULKAN_SDK_VER/windows/vulkansdk-windows-X64-$VULKAN_SDK_VER.exe
./vulkan-sdk.exe --root "C:\VulkanSDK" --accept-licenses --default-answer --confirm-command install
export VULKAN_SDK="C:\VulkanSDK"
;;
+2 -2
View File
@@ -20,7 +20,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.419
dotnet-version: 10.0.x
- name: Setup .NET Workload
run: |
dotnet workload install android
@@ -37,4 +37,4 @@ jobs:
PowerShell "(Get-Content global.json).Replace('latestMajor', 'minor') | Set-Content global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/global.json).Replace('latestMajor', 'minor') | Set-Content Source/Tools/Flax.Build/global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/Flax.Build.csproj).Replace('LatestMajor', 'Minor') | Set-Content Source/Tools/Flax.Build/Flax.Build.csproj"
.\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -dotnet=8 -arch=ARM64 -platform=Android -configuration=Release -buildtargets=FlaxGame
.\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -dotnet=10 -arch=ARM64 -platform=Android -configuration=Release -buildtargets=FlaxGame
+2 -2
View File
@@ -19,7 +19,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 9.0.x
dotnet-version: 10.0.x
- name: Setup .NET Workload
run: |
dotnet workload install ios
@@ -33,4 +33,4 @@ jobs:
git lfs pull
- name: Build
run: |
./Development/Scripts/Mac/CallBuildTool.sh -build -log -dotnet=9 -arch=ARM64 -platform=iOS -configuration=Release -buildtargets=FlaxGame
./Development/Scripts/Mac/CallBuildTool.sh -build -log -dotnet=10 -arch=ARM64 -platform=iOS -configuration=Release -buildtargets=FlaxGame
+4 -4
View File
@@ -23,7 +23,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x
- name: Print .NET info
run: |
dotnet --info
@@ -34,7 +34,7 @@ jobs:
git lfs pull
- name: Build
run: |
./Development/Scripts/Linux/CallBuildTool.sh -build -log -printSDKs -dotnet=8 -arch=x64 -platform=Linux -configuration=Development -buildtargets=FlaxEditor
./Development/Scripts/Linux/CallBuildTool.sh -build -log -printSDKs -dotnet=10 -arch=x64 -platform=Linux -configuration=Development -buildtargets=FlaxEditor
# Game
game-linux:
@@ -52,7 +52,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x
- name: Print .NET info
run: |
dotnet --info
@@ -63,4 +63,4 @@ jobs:
git lfs pull
- name: Build
run: |
./Development/Scripts/Linux/CallBuildTool.sh -build -log -printSDKs -dotnet=8 -arch=x64 -platform=Linux -configuration=Release -buildtargets=FlaxGame
./Development/Scripts/Linux/CallBuildTool.sh -build -log -printSDKs -dotnet=10 -arch=x64 -platform=Linux -configuration=Release -buildtargets=FlaxGame
+4 -4
View File
@@ -19,7 +19,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x
- name: Print .NET info
run: |
dotnet --info
@@ -30,7 +30,7 @@ jobs:
git lfs pull
- name: Build
run: |
./Development/Scripts/Mac/CallBuildTool.sh -build -log -printSDKs -dotnet=8 -arch=ARM64 -platform=Mac -configuration=Development -buildtargets=FlaxEditor
./Development/Scripts/Mac/CallBuildTool.sh -build -log -printSDKs -dotnet=10 -arch=ARM64 -platform=Mac -configuration=Development -buildtargets=FlaxEditor
# Game
game-mac:
@@ -44,7 +44,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x
- name: Print .NET info
run: |
dotnet --info
@@ -55,4 +55,4 @@ jobs:
git lfs pull
- name: Build
run: |
./Development/Scripts/Mac/CallBuildTool.sh -build -log -printSDKs -dotnet=8 -arch=ARM64 -platform=Mac -configuration=Release -buildtargets=FlaxGame
./Development/Scripts/Mac/CallBuildTool.sh -build -log -printSDKs -dotnet=10 -arch=ARM64 -platform=Mac -configuration=Release -buildtargets=FlaxGame
+4 -4
View File
@@ -20,7 +20,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.419
dotnet-version: 10.0.x
- name: Print .NET info
run: |
dotnet --info
@@ -34,7 +34,7 @@ jobs:
PowerShell "(Get-Content global.json).Replace('latestMajor', 'minor') | Set-Content global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/global.json).Replace('latestMajor', 'minor') | Set-Content Source/Tools/Flax.Build/global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/Flax.Build.csproj).Replace('LatestMajor', 'Minor') | Set-Content Source/Tools/Flax.Build/Flax.Build.csproj"
.\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -dotnet=8 -arch=x64 -platform=Windows -configuration=Development -buildtargets=FlaxEditor
.\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -dotnet=10 -arch=x64 -platform=Windows -configuration=Development -buildtargets=FlaxEditor
# Game
game-windows:
@@ -48,7 +48,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.419
dotnet-version: 10.0.x
- name: Print .NET info
run: |
dotnet --info
@@ -62,4 +62,4 @@ jobs:
PowerShell "(Get-Content global.json).Replace('latestMajor', 'minor') | Set-Content global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/global.json).Replace('latestMajor', 'minor') | Set-Content Source/Tools/Flax.Build/global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/Flax.Build.csproj).Replace('LatestMajor', 'Minor') | Set-Content Source/Tools/Flax.Build/Flax.Build.csproj"
.\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -dotnet=8 -arch=x64 -platform=Windows -configuration=Release -buildtargets=FlaxGame
.\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -dotnet=10 -arch=x64 -platform=Windows -configuration=Release -buildtargets=FlaxGame
+12 -12
View File
@@ -28,7 +28,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.419
dotnet-version: 10.0.x
- name: Print .NET info
run: |
dotnet --info
@@ -38,7 +38,7 @@ jobs:
PowerShell "(Get-Content global.json).Replace('latestMajor', 'minor') | Set-Content global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/global.json).Replace('latestMajor', 'minor') | Set-Content Source/Tools/Flax.Build/global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/Flax.Build.csproj).Replace('LatestMajor', 'Minor') | Set-Content Source/Tools/Flax.Build/Flax.Build.csproj"
.\PackageEditor.bat -arch=x64 -platform=Windows -deployOutput=Output -dotnet=8
.\PackageEditor.bat -arch=x64 -platform=Windows -deployOutput=Output -dotnet=10
- name: Upload
uses: actions/upload-artifact@v7
with:
@@ -64,7 +64,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.419
dotnet-version: 10.0.x
- name: Print .NET info
run: |
dotnet --info
@@ -74,7 +74,7 @@ jobs:
PowerShell "(Get-Content global.json).Replace('latestMajor', 'minor') | Set-Content global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/global.json).Replace('latestMajor', 'minor') | Set-Content Source/Tools/Flax.Build/global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/Flax.Build.csproj).Replace('LatestMajor', 'Minor') | Set-Content Source/Tools/Flax.Build/Flax.Build.csproj"
.\PackagePlatforms.bat -arch=x64 -platform=Windows -deployOutput=Output -dotnet=8
.\PackagePlatforms.bat -arch=x64 -platform=Windows -deployOutput=Output -dotnet=10
- name: Upload
uses: actions/upload-artifact@v7
with:
@@ -101,14 +101,14 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x
- name: Print .NET info
run: |
dotnet --info
dotnet workload --info
- name: Build
run: |
./PackageEditor.sh -arch=x64 -platform=Linux -deployOutput=Output -dotnet=8
./PackageEditor.sh -arch=x64 -platform=Linux -deployOutput=Output -dotnet=10
- name: Upload
uses: actions/upload-artifact@v7
with:
@@ -133,14 +133,14 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x
- name: Print .NET info
run: |
dotnet --info
dotnet workload --info
- name: Build
run: |
./PackagePlatforms.sh -arch=x64 -platform=Linux -deployOutput=Output -dotnet=8
./PackagePlatforms.sh -arch=x64 -platform=Linux -deployOutput=Output -dotnet=10
- name: Upload
uses: actions/upload-artifact@v7
with:
@@ -163,14 +163,14 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x
- name: Print .NET info
run: |
dotnet --info
dotnet workload --info
- name: Build
run: |
./PackageEditor.command -arch=ARM64 -platform=Mac -deployOutput=Output -dotnet=8
./PackageEditor.command -arch=ARM64 -platform=Mac -deployOutput=Output -dotnet=10
- name: Upload
uses: actions/upload-artifact@v7
with:
@@ -191,14 +191,14 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x
- name: Print .NET info
run: |
dotnet --info
dotnet workload --info
- name: Build
run: |
./PackagePlatforms.command -arch=ARM64 -platform=Mac -deployOutput=Output -dotnet=8
./PackagePlatforms.command -arch=ARM64 -platform=Mac -deployOutput=Output -dotnet=10
- name: Upload
uses: actions/upload-artifact@v7
with:
+2 -2
View File
@@ -18,7 +18,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x
- name: Setup .NET Workload
run: |
dotnet workload install ios
@@ -42,7 +42,7 @@ jobs:
cp ".github/data/Build Settings.json" "FlaxSamples/MaterialsFeaturesTour/Content/Settings"
- name: Build Editor
run: |
./Development/Scripts/Mac/CallBuildTool.sh -build -log -printSDKs -dotnet=8 -arch=ARM64 -platform=Mac -configuration=Development -buildtargets=FlaxEditor
./Development/Scripts/Mac/CallBuildTool.sh -build -log -printSDKs -dotnet=10 -arch=ARM64 -platform=Mac -configuration=Development -buildtargets=FlaxEditor
- name: Cook Game (iOS)
run: |
./Binaries/Editor/Mac/Development/FlaxEditor -std -headless -mute -null -project "FlaxSamples/MaterialsFeaturesTour" -build "Development.iOS"
+10 -10
View File
@@ -18,7 +18,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
dotnet-version: 10.0.x
- name: Print .NET info
run: |
dotnet --info
@@ -34,18 +34,18 @@ jobs:
chmod +x .github/data/bt.sh
- name: Build
run: |
./GenerateProjectFiles.sh -vs2022 -log -verbose -printSDKs -dotnet=8
./Development/Scripts/Linux/CallBuildTool.sh -build -log -dotnet=8 -arch=x64 -platform=Linux -configuration=Development -buildtargets=FlaxTestsTarget -UseLargeWorlds=true
./GenerateProjectFiles.sh -vs2026 -log -verbose -printSDKs -dotnet=10
./Development/Scripts/Linux/CallBuildTool.sh -build -log -dotnet=10 -arch=x64 -platform=Linux -configuration=Development -buildtargets=FlaxTestsTarget -UseLargeWorlds=true
dotnet msbuild Source/Tools/Flax.Build.Tests/Flax.Build.Tests.csproj /m /t:Restore,Build /p:Configuration=Debug /p:Platform=AnyCPU /nologo
dotnet msbuild Source/Tools/Flax.Build.Tests/Flax.Build.Tests.csproj /m /t:Restore,Build /p:Configuration=Debug /p:Platform=AnyCPU /nologo
- name: Test
run: |
${GITHUB_WORKSPACE}/.github/data/bt.sh ./Binaries/Editor/Linux/Development/FlaxTests -headless
dotnet test -f net8.0 Binaries/Tests/Flax.Build.Tests.dll
dotnet test -f net10.0 Binaries/Tests/Flax.Build.Tests.dll
cp Binaries/Editor/Linux/Development/FlaxEngine.CSharp.dll Binaries/Tests
cp Binaries/Editor/Linux/Development/FlaxEngine.CSharp.runtimeconfig.json Binaries/Tests
cp Binaries/Editor/Linux/Development/Newtonsoft.Json.dll Binaries/Tests
dotnet test -f net8.0 Binaries/Tests/FlaxEngine.CSharp.dll
dotnet test -f net10.0 Binaries/Tests/FlaxEngine.CSharp.dll
# Tests on Windows
tests-windows:
@@ -57,7 +57,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.419
dotnet-version: 10.0.x
- name: Print .NET info
run: |
dotnet --info
@@ -71,8 +71,8 @@ jobs:
PowerShell "(Get-Content global.json).Replace('latestMajor', 'minor') | Set-Content global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/global.json).Replace('latestMajor', 'minor') | Set-Content Source/Tools/Flax.Build/global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/Flax.Build.csproj).Replace('LatestMajor', 'Minor') | Set-Content Source/Tools/Flax.Build/Flax.Build.csproj"
.\GenerateProjectFiles.bat -vs2022 -log -verbose -printSDKs -dotnet=8
.\Development\Scripts\Windows\CallBuildTool.bat -build -log -dotnet=8 -arch=x64 -platform=Windows -configuration=Development -buildtargets=FlaxTestsTarget
.\GenerateProjectFiles.bat -vs2026 -log -verbose -printSDKs -dotnet=10
.\Development\Scripts\Windows\CallBuildTool.bat -build -log -dotnet=10 -arch=x64 -platform=Windows -configuration=Development -buildtargets=FlaxTestsTarget
dotnet msbuild Source\Tools\Flax.Build.Tests\Flax.Build.Tests.csproj /m /t:Restore,Build /p:Configuration=Debug /p:Platform=AnyCPU /nologo
- name: Test
shell: pwsh
@@ -80,8 +80,8 @@ jobs:
$ErrorActionPreference = "Stop"
.\Binaries\Editor\Win64\Development\FlaxTests.exe -headless
if(!$?) { Write-Host "Tests failed with exit code $LastExitCode" -ForegroundColor Red; Exit $LastExitCode }
dotnet test -f net8.0 Binaries\Tests\Flax.Build.Tests.dll
dotnet test -f net10.0 Binaries\Tests\Flax.Build.Tests.dll
xcopy /y Binaries\Editor\Win64\Development\FlaxEngine.CSharp.dll Binaries\Tests
xcopy /y Binaries\Editor\Win64\Development\FlaxEngine.CSharp.runtimeconfig.json Binaries\Tests
xcopy /y Binaries\Editor\Win64\Development\Newtonsoft.Json.dll Binaries\Tests
dotnet test -f net8.0 Binaries\Tests\FlaxEngine.CSharp.dll
dotnet test -f net10.0 Binaries\Tests\FlaxEngine.CSharp.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-17
View File
@@ -1,17 +0,0 @@
## Mono
Custom fork: [https://github.com/FlaxEngine/mono](https://github.com/FlaxEngine/mono) with custom features for C# assemblies hot-reloading at runtime without domain unload (more: [https://flaxengine.com/blog/flax-facts-16-scripts-hot-reload/](https://flaxengine.com/blog/flax-facts-16-scripts-hot-reload/)).
Startup docs about building mono: [https://www.mono-project.com/docs/compiling-mono/](https://www.mono-project.com/docs/compiling-mono/)
### Notes
Some useful notes and tips for devs:
* Use `-monolog` to print Mono logs to Flax logs
* When working with mono fork set `localRepoPath` to local repo location in `Source\Tools\Flax.Build\Deps\Dependencies\mono.cs`
* To update mono deps when developing/updating use `.\Development\Scripts\Windows\CallBuildTool.bat -log -ReBuildDeps -verbose -depsToBuild=mono -platform=Windows`, then build engine and run it
* `MONO_GC_DEBUG=check-remset-consistency` - it will do additional checks at each collection to see if there are any missing write barriers
* `MONO_GC_DEBUG=nursery-canaries` - it might catch some buffer overflows in case of problems in code.
* `MONO_GC_DEBUG=<log-level>:<log-file>` - will print GC debug to the log file (eg. `4:sgen-gc`).
* Methods `mono_custom_attrs_from_property` and `mono_custom_attrs_get_attr` are internally cached
* If C++ mono call a method in c# that will throw an error, error will be handled but, not completly. Calling relase domain will return random `Access memory violation`. First search for error in c# code. No workaround yet.
@@ -34,7 +34,7 @@ goto Exit
echo CallBuildTool ERROR: The script is in invalid directory.
goto Exit
:Error_NoVisualStudioEnvironment
echo CallBuildTool ERROR: Missing Visual Studio 2022 or newer.
echo CallBuildTool ERROR: Missing Visual Studio 2026 or newer.
goto Exit
:Error_CompilationFailed
echo CallBuildTool ERROR: Failed to compile Flax.Build project.
+3 -3
View File
@@ -2,9 +2,9 @@
"Name": "Flax",
"Version": {
"Major": 1,
"Minor": 12,
"Minor": 13,
"Revision": 0,
"Build": 6914
"Build": 7005
},
"Company": "Flax",
"Copyright": "Copyright (c) 2012-2026 Wojciech Figat. All rights reserved.",
@@ -13,7 +13,7 @@
"Configuration": {
"UseCSharp": true,
"UseLargeWorlds": false,
"UseDotNet": true,
"UseReverseZ": true,
"Windows": {
"UseSDL": false,
},
+1
View File
@@ -257,6 +257,7 @@
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/GrammarAndSpelling/GrammarChecking/Exceptions/=Try_0020to_0020scripting/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/GrammarAndSpelling/GrammarChecking/Exceptions/=will_0020fallback/@EntryIndexedValue">True</s:Boolean>
<s:String x:Key="/Default/GrammarAndSpelling/GrammarChecking/RulesStates/=LanguageTool_002EEN_002EE_005FG/@EntryIndexedValue">DisabledByUser</s:String>
<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=EEA05B0ED8200E4BA9D2D3F1052EBFFD/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=EEA05B0ED8200E4BA9D2D3F1052EBFFD/Color/@EntryValue">Blue</s:String>
+12 -12
View File
@@ -28,10 +28,10 @@ Follow the instructions below to compile and run the engine from source.
## Windows
* Install Visual Studio 2022 or newer
* Install Windows 8.1 SDK or newer (via Visual Studio Installer)
* Install Visual Studio 2026 or newer
* Install Windows 10 SDK or newer (via Visual Studio Installer)
* Install Microsoft Visual C++ 2015 v140 toolset or newer (via Visual Studio Installer)
* Install .NET 8 SDK (or newer) for **Windows x64** (via Visual Studio Installer or [from web](https://dotnet.microsoft.com/en-us/download/dotnet/8.0))
* Install .NET 10 SDK (or newer) for **Windows x64** (via Visual Studio Installer or [from web](https://dotnet.microsoft.com/en-us/download/dotnet/10.0))
* Install Git with LFS
* Clone repo (with LFS)
* Run **GenerateProjectFiles.bat**
@@ -44,10 +44,10 @@ Follow the instructions below to compile and run the engine from source.
## Linux
* Install Visual Studio Code
* Install .NET 8 or 9 SDK ([https://dotnet.microsoft.com/en-us/download/dotnet/8.0](https://dotnet.microsoft.com/en-us/download/dotnet/8.0))
* Ubuntu: `sudo apt install dotnet-sdk-8.0`
* Fedora: `sudo dnf install dotnet-sdk-8.0`
* Arch: `sudo pacman -S dotnet-sdk-8.0 dotnet-runtime-8.0 dotnet-targeting-pack-8.0 dotnet-host`
* Install .NET 10 SDK (or newer) ([https://dotnet.microsoft.com/en-us/download/dotnet/10.0](https://dotnet.microsoft.com/en-us/download/dotnet/10.0))
* Ubuntu: `sudo apt install dotnet-sdk-10.0`
* Fedora: `sudo dnf install dotnet-sdk-10.0`
* Arch: `sudo pacman -S dotnet-sdk-10.0 dotnet-runtime-10.0 dotnet-targeting-pack-10.0 dotnet-host`
* Install Vulkan SDK ([https://vulkan.lunarg.com/](https://vulkan.lunarg.com/))
* Ubuntu: `sudo apt install vulkan-sdk` (deprecated, follow official docs)
* Fedora: `sudo dnf install vulkan-headers vulkan-tools vulkan-validation-layers`
@@ -73,7 +73,7 @@ Follow the instructions below to compile and run the engine from source.
## Mac
* Install XCode 16.4 (or newer)
* Install .NET 8 SDK (or newer) ([https://dotnet.microsoft.com/en-us/download/dotnet/8.0](https://dotnet.microsoft.com/en-us/download/dotnet/8.0))
* Install .NET 10 SDK (or newer) ([https://dotnet.microsoft.com/en-us/download/dotnet/10.0](https://dotnet.microsoft.com/en-us/download/dotnet/10.0))
* Install Vulkan SDK ([https://vulkan.lunarg.com/](https://vulkan.lunarg.com/))
* Clone repo (with LFS)
* Run `GenerateProjectFiles.command`
@@ -86,17 +86,17 @@ Follow the instructions below to compile and run the engine from source.
Restart PC - ensure DotNet is added to PATH for command line tools execution.
* `Microsoft.NET.TargetFrameworkInference.targets(141,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0. Either target .NET 5.0 or lower, or use a version of the .NET SDK that supports .NET 8.0`
* `Microsoft.NET.TargetFrameworkInference.targets(141,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 10.0. Either target .NET 5.0 or lower, or use a version of the .NET SDK that supports .NET 10.0`
Use Visual Studio 2022, older versions are not supported by .NET SDK 8.
Use Visual Studio 2026 (or newer), old Visual Studio versions are not supported by .NET SDK 10.
* `Building for Windows without Vulkan rendering backend (Vulkan SDK is missing)`
Install the Vulkan SDK then set an environment variable to provide the path to the SDK prior to running GenerateProjectFiles.bat: `set VULKAN_SDK=%sdk_path%`.
* `The NuGetSdkResolver did not resolve this SDK`
* `The NuGetSdkResolver did not resolve this SDK` / `Could not resolve SDK "Microsoft.NET.Sdk"`
Install `.NET SDK`, `NuGet package manager` and `NuGet targets and build tasks` in Visual Studio components.
Install `.NET SDK` 10, `NuGet package manager` and `NuGet targets and build tasks` in Visual Studio components.
## Workspace directory
@@ -160,7 +160,7 @@ namespace FlaxEditor.Content
}
else
{
_parameters = Utils.GetEmptyArray<ScriptMemberInfo.Parameter>();
_parameters = Array.Empty<ScriptMemberInfo.Parameter>();
}
}
@@ -283,9 +283,9 @@ namespace FlaxEditor.Content
{
if (!_asset)
{
_parameters = Utils.GetEmptyArray<ScriptMemberInfo>();
_methods = Utils.GetEmptyArray<ScriptMemberInfo>();
_attributes = Utils.GetEmptyArray<Attribute>();
_parameters = Array.Empty<ScriptMemberInfo>();
_methods = Array.Empty<ScriptMemberInfo>();
_attributes = Array.Empty<Attribute>();
return;
}
if (_parameters != null)
@@ -303,7 +303,7 @@ namespace FlaxEditor.Content
_parameters[i] = new ScriptMemberInfo(new VisualScriptParameterInfo(this, parameters[i]));
}
else
_parameters = Utils.GetEmptyArray<ScriptMemberInfo>();
_parameters = Array.Empty<ScriptMemberInfo>();
// Cache Visual Script methods info
var methodsCount = _asset.GetMethodsCount();
@@ -314,7 +314,7 @@ namespace FlaxEditor.Content
_methods[i] = new ScriptMemberInfo(new VisualScriptMethodInfo(this, i));
}
else
_methods = Utils.GetEmptyArray<ScriptMemberInfo>();
_methods = Array.Empty<ScriptMemberInfo>();
// Cache Visual Script attributes
{
@@ -525,7 +525,7 @@ namespace FlaxEditor.Content
var baseType = BaseType;
if (baseType)
return baseType.GetProperties(bindingAttr);
return Utils.GetEmptyArray<ScriptMemberInfo>();
return Array.Empty<ScriptMemberInfo>();
}
/// <inheritdoc />
+5
View File
@@ -360,6 +360,11 @@ public:
/// </summary>
Array<BinaryModuleInfo, InlinedAllocation<64>> BinaryModules;
/// <summary>
/// Cached version of the built binaries from project Version Control.
/// </summary>
String VersionControlInfo;
public:
/// <summary>
@@ -42,6 +42,13 @@ bool CompileScriptsStep::DeployBinaries(CookingData& data, const String& path, c
return true;
}
// Metadata
auto versionControlInfoMember = document.FindMember("VersionControlInfo");
if (versionControlInfoMember != document.MemberEnd() && data.VersionControlInfo.IsEmpty())
{
data.VersionControlInfo = versionControlInfoMember->value.GetText();
}
// Deploy all references
auto referencesMember = document.FindMember("References");
if (referencesMember != document.MemberEnd())
@@ -245,8 +252,15 @@ bool CompileScriptsStep::Perform(CookingData& data)
writer.String(target);
writer.JKEY("Platform");
writer.String(platform);
writer.JKEY("Architecture");
writer.String(architecture);
writer.JKEY("Configuration");
writer.String(configuration);
if (data.VersionControlInfo.HasChars())
{
writer.JKEY("VersionControlInfo");
writer.String(data.VersionControlInfo);
}
writer.JKEY("BinaryModules");
writer.StartArray();
+11 -1
View File
@@ -50,6 +50,10 @@
#endif
#include "FlaxEngine.Gen.h"
#ifndef REVERSE_Z
#define REVERSE_Z 0
#endif
Dictionary<String, CookAssetsStep::ProcessAssetFunc> CookAssetsStep::AssetProcessors;
void IBuildCache::InvalidateCacheShaders()
@@ -233,6 +237,11 @@ void CookAssetsStep::CacheData::Load(CookingData& data)
LOG(Info, "{0} option has been modified.", TEXT("ShadersGenerateDebugData"));
invalidateShaders = true;
}
if (REVERSE_Z != Settings.Global.ShadersReverseZ)
{
LOG(Info, "{0} option has been modified.", TEXT("ShadersReverseZ"));
invalidateShaders = true;
}
#if PLATFORM_TOOLS_WINDOWS
if (data.Platform == BuildPlatform::Windows32 || data.Platform == BuildPlatform::Windows64)
{
@@ -424,6 +433,7 @@ bool ProcessShaderBase(CookAssetsStep::AssetCookData& data, ShaderAssetBase* ass
options.GenerateDebugData = data.Cache.Settings.Global.ShadersGenerateDebugData;
options.TreatWarningsAsErrors = false;
options.Output = &cacheStream;
options.Platform = data.Data.Tools->GetPlatform();
Array<String> includes;
#define COMPILE_PROFILE(profile, cacheChunk) \
@@ -526,7 +536,6 @@ bool ProcessShaderBase(CookAssetsStep::AssetCookData& data, ShaderAssetBase* ass
#if PLATFORM_TOOLS_XBOX_SCARLETT
case BuildPlatform::XboxScarlett:
{
options.Platform = PlatformType::XboxScarlett;
const char* platformDefineName = "PLATFORM_XBOX_SCARLETT";
COMPILE_PROFILE(DirectX_SM6, SHADER_FILE_CHUNK_INTERNAL_D3D_SM6_CACHE);
break;
@@ -1076,6 +1085,7 @@ bool CookAssetsStep::Perform(CookingData& data)
{
cache.Settings.Global.ShadersNoOptimize = buildSettings->ShadersNoOptimize;
cache.Settings.Global.ShadersGenerateDebugData = buildSettings->ShadersGenerateDebugData;
cache.Settings.Global.ShadersReverseZ = REVERSE_Z;
cache.Settings.Global.StreamingSettingsAssetId = gameSettings->Streaming;
cache.Settings.Global.ShadersVersion = GPU_SHADER_CACHE_VERSION;
cache.Settings.Global.MaterialGraphVersion = MATERIAL_GRAPH_VERSION;
@@ -97,6 +97,7 @@ public:
{
bool ShadersNoOptimize;
bool ShadersGenerateDebugData;
bool ShadersReverseZ;
Guid StreamingSettingsAssetId;
int32 ShadersVersion;
int32 MaterialGraphVersion;
@@ -30,13 +30,6 @@ bool DeployDataStep::Perform(CookingData& data)
Platform::Sleep(10);
}
FileSystem::CreateDirectory(contentDir);
const String dstMono = data.DataOutputPath / TEXT("Mono");
#if USE_NETCORE
{
// Remove old Mono files
FileSystem::DeleteDirectory(dstMono);
FileSystem::DeleteFile(data.DataOutputPath / TEXT("MonoPosixHelper.dll"));
}
String dstDotnet = data.DataOutputPath / TEXT("Dotnet");
const DotNetAOTModes aotMode = data.Tools->UseAOT();
const bool usAOT = aotMode != DotNetAOTModes::None && aotMode != DotNetAOTModes::NoDotnet;
@@ -386,23 +379,6 @@ bool DeployDataStep::Perform(CookingData& data)
}
}
}
#else
if (!FileSystem::DirectoryExists(dstMono))
{
// Deploy Mono files (from platform data folder)
const String srcMono = depsRoot / TEXT("Mono");
if (!FileSystem::DirectoryExists(srcMono))
{
data.Error(TEXT("Missing Mono runtime data files."));
return true;
}
if (FileSystem::CopyDirectory(dstMono, srcMono))
{
data.Error(TEXT("Failed to copy Mono runtime data files."));
return true;
}
}
#endif
// Deploy engine data for the target platform
if (data.Tools->OnDeployBinaries(data))
@@ -52,16 +52,15 @@ void OnAssemblyLoaded(MAssembly* assembly);
void OnAssemblyUnloading(MAssembly* assembly);
void OnBinaryModuleLoaded(BinaryModule* module);
MTypeObject* CustomEditorsUtil::GetCustomEditor(MTypeObject* refType)
MType* CustomEditorsUtil::GetCustomEditor(MType* type)
{
if (!refType)
if (!type)
return nullptr;
MType* type = INTERNAL_TYPE_OBJECT_GET(refType);
Entry result;
if (Cache.TryGet(type, result))
{
if (result.CustomEditorType)
return INTERNAL_TYPE_GET_OBJECT(result.CustomEditorType);
return result.CustomEditorType;
MClass* editor = result.CustomEditor ? result.CustomEditor : result.DefaultEditor;
if (editor)
return MUtils::GetType(editor);
@@ -127,12 +126,8 @@ void OnAssemblyLoaded(MAssembly* assembly)
continue;
// Check if attribute references a valid class
MTypeObject* refType = nullptr;
customEditorTypeField->GetValue(attribute, &refType);
if (refType == nullptr)
continue;
MType* type = INTERNAL_TYPE_OBJECT_GET(refType);
MType* type = nullptr;
customEditorTypeField->GetValue(attribute, &type);
if (type == nullptr)
continue;
MClass* typeClass = MCore::Type::GetClass(type);
@@ -12,6 +12,6 @@ class CustomEditorsUtil
public:
#if USE_CSHARP
static MTypeObject* GetCustomEditor(MTypeObject* refType);
static MType* GetCustomEditor(MType* type);
#endif
};
@@ -261,6 +261,7 @@ namespace FlaxEditor.CustomEditors.Editors
public static List<ItemInfo> GetItemsForType(ScriptType type, bool useProperties, bool useFields, bool usePropertiesWithoutSetter = false)
{
var items = new List<ItemInfo>();
var isPlayMode = Editor.IsPlayMode;
if (useProperties)
{
@@ -278,7 +279,7 @@ namespace FlaxEditor.CustomEditors.Editors
continue;
// Skip hidden fields, handle special attributes
if ((!p.IsPublic && !showInEditor) || attributes.Any(x => x is HideInEditorAttribute))
if ((!p.IsPublic && !showInEditor) || attributes.Any(x => x is HideInEditorAttribute hide && (!isPlayMode || !hide.ShowInPlayMode)))
continue;
items.Add(new ItemInfo(p, attributes));
@@ -293,11 +294,10 @@ namespace FlaxEditor.CustomEditors.Editors
for (int i = 0; i < fields.Length; i++)
{
var f = fields[i];
var attributes = f.GetAttributes(true);
// Skip hidden fields, handle special attributes
if ((!f.IsPublic && !attributes.Any(x => x is ShowInEditorAttribute)) || attributes.Any(x => x is HideInEditorAttribute))
if ((!f.IsPublic && !attributes.Any(x => x is ShowInEditorAttribute)) || attributes.Any(x => x is HideInEditorAttribute hide && (!isPlayMode || !hide.ShowInPlayMode)))
continue;
items.Add(new ItemInfo(f, attributes));
@@ -679,7 +679,7 @@ namespace FlaxEditor.CustomEditors.Editors
return asArray;
if (Values[0] is List<Tag> asList)
return asList.ToArray();
return Utils.GetEmptyArray<Tag>();
return Array.Empty<Tag>();
}
set
{
@@ -0,0 +1,90 @@
// Copyright (c) Wojciech Figat. All rights reserved.
using FlaxEngine;
using FlaxEngine.GUI;
using System;
namespace FlaxEditor.CustomEditors.Editors
{
/// <summary>
/// Default implementation of the inspector used to edit TimeSpan value type properties.
/// </summary>
[CustomEditor(typeof(TimeSpan)), DefaultEditor]
class TimeSpanEditor : CustomEditor
{
private TextBox _textBox;
private bool _isRefreshing;
/// <inheritdoc />
public override DisplayStyle Style => DisplayStyle.Inline;
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
{
if (HasDifferentTypes)
return;
_textBox = layout.Custom<TextBox>().CustomControl;
_textBox.EditEnd += OnEditEnd;
}
private void OnEditEnd()
{
if (_isRefreshing)
return;
if (TimeSpan.TryParse(_textBox.Text, out var timeSpan))
SetValue(timeSpan);
}
/// <inheritdoc />
public override void Refresh()
{
base.Refresh();
_isRefreshing = true;
_textBox.Text = HasDifferentValues ? "Multiple Values" : ((TimeSpan)Values[0]).ToString("G");
_isRefreshing = false;
}
}
/// <summary>
/// Default implementation of the inspector used to edit DateTime value type properties.
/// </summary>
[CustomEditor(typeof(DateTime)), DefaultEditor]
class DateTimeEditor : CustomEditor
{
private TextBox _textBox;
private bool _isRefreshing;
/// <inheritdoc />
public override DisplayStyle Style => DisplayStyle.Inline;
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
{
if (HasDifferentTypes)
return;
_textBox = layout.Custom<TextBox>().CustomControl;
_textBox.EditEnd += OnEditEnd;
}
private void OnEditEnd()
{
if (_isRefreshing)
return;
if (DateTime.TryParse(_textBox.Text, out var timeSpan))
SetValue(timeSpan);
}
/// <inheritdoc />
public override void Refresh()
{
base.Refresh();
_isRefreshing = true;
_textBox.Text = HasDifferentValues ? "Multiple Values" : ((DateTime)Values[0]).ToString("g");
_isRefreshing = false;
}
}
}
+3 -1
View File
@@ -12,6 +12,8 @@ using Microsoft.Win32;
/// </summary>
public class Editor : EditorModule
{
private static bool _logDotnetVersionsRange;
private void AddPlatformTools(BuildOptions options, string platformToolsRoot, string platformToolsRootExternal, string platform, params string[] macros)
{
if (Directory.Exists(Path.Combine(platformToolsRoot, platform)))
@@ -107,7 +109,7 @@ public class Editor : EditorModule
var maxVer = DotNetSdk.MaximumVersion.Major;
options.PrivateDefinitions.Add("GAME_BUILD_DOTNET_RUNTIME_MIN_VER=" + minVer);
options.PrivateDefinitions.Add("GAME_BUILD_DOTNET_RUNTIME_MAX_VER=" + DotNetSdk.MaximumVersion.Major);
Log.Verbose($"Using Dotnet runtime versions range {minVer}-{maxVer} for Game Cooker");
Log.VerboseOnce($"Using Dotnet runtime versions range {minVer}-{maxVer} for Game Cooker", ref _logDotnetVersionsRange);
}
}
+10 -1
View File
@@ -486,6 +486,15 @@ namespace FlaxEditor.GUI
button.TooltipText = _tooltips[index];
}
/// <summary>
/// Gets the text for selected item(s).
/// </summary>
/// <returns>The display text.</returns>
protected virtual string GetSelectedText()
{
return _selectedIndices.Count == 1 ? (_selectedIndices[0] >= 0 && _selectedIndices[0] < _items.Count ? _items[_selectedIndices[0]] : "") : "Multiple Values";
}
/// <summary>
/// Creates the popup menu.
/// </summary>
@@ -554,7 +563,7 @@ namespace FlaxEditor.GUI
// Check if has selected item
if (_selectedIndices != null && _selectedIndices.Count > 0)
{
string text = _selectedIndices.Count == 1 ? (_selectedIndices[0] >= 0 && _selectedIndices[0] < _items.Count ? _items[_selectedIndices[0]] : "") : "Multiple Values";
string text = GetSelectedText();
// Draw text of the selected item
float textScale = Height / DefaultHeight;
+1 -1
View File
@@ -103,7 +103,7 @@ namespace FlaxEditor.GUI.Drag
return results;
}
}
return Utils.GetEmptyArray<ScriptType>();
return Array.Empty<ScriptType>();
}
}
}
+1 -1
View File
@@ -101,7 +101,7 @@ public class DragControlType<U> : DragHelper<ScriptType, U> where U : DragEventA
return results;
}
}
return Utils.GetEmptyArray<ScriptType>();
return Array.Empty<ScriptType>();
}
}
+1 -1
View File
@@ -103,7 +103,7 @@ namespace FlaxEditor.GUI.Drag
return results.ToArray();
}
}
return Utils.GetEmptyArray<Script>();
return Array.Empty<Script>();
}
/// <summary>
+37 -43
View File
@@ -5,7 +5,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using FlaxEditor.CustomEditors;
using FlaxEditor.CustomEditors.Elements;
using FlaxEditor.GUI.ContextMenu;
using FlaxEditor.Scripting;
@@ -106,16 +105,6 @@ namespace FlaxEditor.GUI
if (_cachedValue == value && _hasValueCached)
return;
// Single value
for (int i = 0; i < _entries.Count; i++)
{
if (_entries[i].Value == value)
{
SelectedIndex = i;
return;
}
}
if (IsFlags)
{
// Collection of flags
@@ -123,7 +112,7 @@ namespace FlaxEditor.GUI
for (int i = 0; i < _entries.Count; i++)
{
var e = _entries[i].Value;
if (e != 0 && (e & value) == e)
if ((e != 0 || value == 0) && (e & value) == e)
{
selection.Add(i);
}
@@ -132,7 +121,17 @@ namespace FlaxEditor.GUI
}
else
{
SelectedIndex = -1;
// Single value
var toSelect = -1;
for (int i = 0; i < _entries.Count; i++)
{
if (_entries[i].Value == value)
{
toSelect = i;
break;
}
}
SelectedIndex = toSelect;
}
}
}
@@ -295,6 +294,22 @@ namespace FlaxEditor.GUI
button.CloseMenuOnClick = false;
}
/// <inheritdoc />
protected override string GetSelectedText()
{
// If multiple values are selected then try to find an enum item that matches the mask value
if (_selectedIndices.Count > 1)
{
foreach (var e in _entries)
{
if (e.Value == Value)
return e.Name;
}
}
return base.GetSelectedText();
}
/// <inheritdoc />
protected override void OnItemClicked(int index)
{
@@ -310,43 +325,22 @@ namespace FlaxEditor.GUI
}
// Calculate value that will be set after change
long valueAfter = 0;
long valueAfter = Value;
bool isSelected = _selectedIndices.Contains(index);
long selectedValue = entries[index].Value;
for (int i = 0; i < _selectedIndices.Count; i++)
if (isSelected)
{
int selectedIndex = _selectedIndices[i];
if (selectedIndex != index && (isSelected || (entries[selectedIndex].Value & selectedValue) == 0))
valueAfter |= entries[selectedIndex].Value;
// Remove from flags selection
valueAfter &= ~selectedValue;
}
if (!isSelected)
else
{
// Add to flags selection
valueAfter |= selectedValue;
// Skip if value won't change
if (Value == valueAfter)
{
return;
}
// Build new selection
for (int i = 0; i < entries.Count; i++)
{
if (entries[i].Value == valueAfter)
{
SelectedIndex = i;
return;
}
}
_selectedIndices.Clear();
for (int i = 0; i < entries.Count; i++)
{
var e = entries[i].Value;
if (e != 0 && (e & valueAfter) == e)
{
_selectedIndices.Add(i);
}
}
OnSelectedIndexChanged();
// Change value (incl. multiselection for flags)
Value = valueAfter;
return;
}
@@ -146,12 +146,12 @@ namespace FlaxEditor.GUI.Timeline.Tracks
/// <summary>
/// The event parameters data sizes collection.
/// </summary>
public int[] EventParamsSizes = Utils.GetEmptyArray<int>();
public int[] EventParamsSizes = Array.Empty<int>();
/// <summary>
/// The event parameters types collection.
/// </summary>
public Type[] EventParamsTypes = Utils.GetEmptyArray<Type>();
public Type[] EventParamsTypes = Array.Empty<Type>();
/// <summary>
/// The event key data.
@@ -380,7 +380,7 @@ namespace FlaxEditor.GUI.Timeline.Tracks
}
else
{
EventParamsTypes = Utils.GetEmptyArray<Type>();
EventParamsTypes = Array.Empty<Type>();
}
OnEventParamsChanged();
}
+1 -5
View File
@@ -139,15 +139,11 @@ namespace FlaxEditor.Gizmo
DrawSelectionDepth(context, renderContext.Task, customDepth);
_actors.Clear();
var near = renderContext.View.Near;
var far = renderContext.View.Far;
var projection = renderContext.View.Projection;
// Render outline
_material.SetParameterValue("OutlineColor0", _color0);
_material.SetParameterValue("OutlineColor1", _color1);
_material.SetParameterValue("CustomDepth", customDepth);
_material.SetParameterValue("ViewInfo", new Float4(1.0f / projection.M11, 1.0f / projection.M22, far / (far - near), (-far * near) / (far - near) / far));
_material.SetParameterValue("ViewInfo", renderContext.View.ViewInfo);
Renderer.DrawPostFxMaterial(context, ref renderContext, _material, output, input.View());
// Cleanup
@@ -526,7 +526,7 @@ DEFINE_INTERNAL_CALL(void) EditorInternal_SetAnimationTime(AnimatedModel* animat
animatedModel->GraphInstance.State[0].Animation.TimePosition = time;
}
DEFINE_INTERNAL_CALL(MTypeObject*) CustomEditorsUtilInternal_GetCustomEditor(MTypeObject* targetType)
DEFINE_INTERNAL_CALL(MType*) CustomEditorsUtilInternal_GetCustomEditor(MType* targetType)
{
return CustomEditorsUtil::GetCustomEditor(targetType);
}
+16 -10
View File
@@ -24,7 +24,7 @@ namespace FlaxEditor.Modules
private bool _rebuildInitFlag;
private int _itemsCreated;
private int _itemsDeleted;
private readonly HashSet<MainContentFolderTreeNode> _dirtyNodes = new HashSet<MainContentFolderTreeNode>();
private readonly HashSet<ContentFolderTreeNode> _dirtyNodes = new HashSet<ContentFolderTreeNode>();
/// <summary>
/// The project directory.
@@ -1309,26 +1309,31 @@ namespace FlaxEditor.Modules
internal void OnDirectoryEvent(MainContentFolderTreeNode node, FileSystemEventArgs e)
{
// Ensure to be ready for external events
// Ignore events during fast setup
if (_isDuringFastSetup)
return;
ContentFolderTreeNode dirtyNode = node;
// TODO: maybe we could make it faster! since we have a path so it would be easy to just create or delete given file. but remember about subdirectories
// Filter the node based on modified path
// (eg. if we have event for 'Content/Folder1/Folder2' and node is 'Content/Folder1' then we should process but skip other 'Content' subfolders)
var path = StringUtils.NormalizePath(Path.GetDirectoryName(e.FullPath));
var pathItem = node.Folder.Find(path) as ContentFolder;
if (pathItem != null)
{
dirtyNode = pathItem.Node;
}
// Switch type
switch (e.ChangeType)
{
case WatcherChangeTypes.Created:
case WatcherChangeTypes.Deleted:
case WatcherChangeTypes.Renamed:
{
lock (_dirtyNodes)
{
_dirtyNodes.Add(node);
_dirtyNodes.Add(dirtyNode);
}
break;
}
}
}
private void OnScriptsReload()
@@ -1383,14 +1388,15 @@ namespace FlaxEditor.Modules
// Update all dirty content tree nodes
lock (_dirtyNodes)
{
Profiler.BeginEvent("ContentDatabase.Refresh");
foreach (var node in _dirtyNodes)
{
LoadFolder(node, true);
if (_enableEvents)
WorkspaceModified?.Invoke();
}
if (_enableEvents && _dirtyNodes.Count != 0)
WorkspaceModified?.Invoke();
_dirtyNodes.Clear();
Profiler.EndEvent();
}
// Lazy-rebuilds
@@ -381,9 +381,6 @@ namespace FlaxEditor.Modules
Thread.Sleep(0);
_workerThread.Join(1000);
#if !USE_NETCORE
_workerThread.Abort(); // Deprecated in .NET 7
#endif
_workerThread = null;
}
@@ -584,7 +584,6 @@ namespace FlaxEditor.Modules.SourceCodeEditing
var codeBase = Utils.GetAssemblyLocation(assembly);
if (string.IsNullOrEmpty(codeBase))
return true;
#if USE_NETCORE
if (assembly.ManifestModule.FullyQualifiedName == "<In Memory Module>")
return false;
@@ -592,11 +591,6 @@ namespace FlaxEditor.Modules.SourceCodeEditing
string repositoryUrl = assembly.GetCustomAttributes<AssemblyMetadataAttribute>().FirstOrDefault(x => x.Key == "RepositoryUrl")?.Value ?? "";
if (repositoryUrl != "https://github.com/dotnet/runtime")
return true;
#else
// Skip assemblies from in-build Mono directory
if (!codeBase.Contains("/Mono/lib/mono/"))
return true;
#endif
return false;
}
+2
View File
@@ -465,6 +465,8 @@ namespace FlaxEditor.Modules
internal void ProgressFailed(string message)
{
if (StatusBar == null)
return;
_progressFailed = true;
StatusBar.StatusColor = Style.Current.Statusbar.Failed;
StatusBar.Text = message;
@@ -278,7 +278,7 @@ String RiderCodeEditor::GetName() const
String RiderCodeEditor::GetGenerateProjectCustomArgs() const
{
return TEXT("-vs2022");
return TEXT("-vs2026");
}
void RiderCodeEditor::OpenFile(const String& path, int32 line)
@@ -130,7 +130,7 @@ String VisualStudioCodeEditor::GetName() const
String VisualStudioCodeEditor::GetGenerateProjectCustomArgs() const
{
return TEXT("-vs2022 -vscode");
return TEXT("-vs2026 -vscode");
}
void VisualStudioCodeEditor::OpenFile(const String& path, int32 line)
@@ -138,7 +138,7 @@ void VisualStudioCodeEditor::OpenFile(const String& path, int32 line)
// Generate VS solution files for intellisense
if (!FileSystem::FileExists(Globals::ProjectFolder / Editor::Project->Name + TEXT(".sln")))
{
ScriptsBuilder::GenerateProject(TEXT("-vs2022"));
ScriptsBuilder::GenerateProject(TEXT("-vs2026"));
}
// Generate project files if missing
@@ -165,7 +165,7 @@ void VisualStudioCodeEditor::OpenSolution()
// Generate VS solution files for intellisense
if (!FileSystem::FileExists(Globals::ProjectFolder / Editor::Project->Name + TEXT(".sln")))
{
ScriptsBuilder::GenerateProject(TEXT("-vs2022"));
ScriptsBuilder::GenerateProject(TEXT("-vs2026"));
}
// Generate project files if solution is missing
+6 -6
View File
@@ -112,37 +112,37 @@ namespace FlaxEditor.Scripting
/// <inheritdoc />
public object[] GetAttributes(bool inherit)
{
return Utils.GetEmptyArray<object>();
return Array.Empty<object>();
}
/// <inheritdoc />
public ScriptMemberInfo[] GetMembers(string name, MemberTypes type, BindingFlags bindingAttr)
{
return Utils.GetEmptyArray<ScriptMemberInfo>();
return Array.Empty<ScriptMemberInfo>();
}
/// <inheritdoc />
public ScriptMemberInfo[] GetMembers(BindingFlags bindingAttr)
{
return Utils.GetEmptyArray<ScriptMemberInfo>();
return Array.Empty<ScriptMemberInfo>();
}
/// <inheritdoc />
public ScriptMemberInfo[] GetFields(BindingFlags bindingAttr)
{
return Utils.GetEmptyArray<ScriptMemberInfo>();
return Array.Empty<ScriptMemberInfo>();
}
/// <inheritdoc />
public ScriptMemberInfo[] GetProperties(BindingFlags bindingAttr)
{
return Utils.GetEmptyArray<ScriptMemberInfo>();
return Array.Empty<ScriptMemberInfo>();
}
/// <inheritdoc />
public ScriptMemberInfo[] GetMethods(BindingFlags bindingAttr)
{
return Utils.GetEmptyArray<ScriptMemberInfo>();
return Array.Empty<ScriptMemberInfo>();
}
/// <inheritdoc />
+12 -12
View File
@@ -447,7 +447,7 @@ namespace FlaxEditor.Scripting
{
var parameters = methodInfo.GetParameters();
if (parameters.Length == 0)
return Utils.GetEmptyArray<Parameter>();
return Array.Empty<Parameter>();
var result = new Parameter[parameters.Length];
for (int i = 0; i < result.Length; i++)
{
@@ -593,7 +593,7 @@ namespace FlaxEditor.Scripting
}
if (_custom != null)
return _custom.GetAttributes(inherit);
return Utils.GetEmptyArray<object>();
return Array.Empty<object>();
}
/// <summary>
@@ -1116,7 +1116,7 @@ namespace FlaxEditor.Scripting
return _managed.GetCustomAttributes(inherit);
if (_custom != null)
return _custom.GetAttributes(inherit);
return Utils.GetEmptyArray<object>();
return Array.Empty<object>();
}
/// <summary>
@@ -1191,12 +1191,12 @@ namespace FlaxEditor.Scripting
if (_managed != null)
{
managedMembers = _managed.GetMember(name, type, bindingAttr);
return Utils.GetEmptyArray<ScriptMemberInfo>();
return Array.Empty<ScriptMemberInfo>();
}
managedMembers = null;
if (_custom != null)
return _custom.GetMembers(name, type, bindingAttr);
return Utils.GetEmptyArray<ScriptMemberInfo>();
return Array.Empty<ScriptMemberInfo>();
}
/// <summary>
@@ -1218,7 +1218,7 @@ namespace FlaxEditor.Scripting
}
if (_custom != null)
return _custom.GetMembers(name, type, bindingAttr);
return Utils.GetEmptyArray<ScriptMemberInfo>();
return Array.Empty<ScriptMemberInfo>();
}
/// <summary>
@@ -1282,12 +1282,12 @@ namespace FlaxEditor.Scripting
if (_managed != null)
{
managedMembers = _managed.GetMembers(bindingAttr);
return Utils.GetEmptyArray<ScriptMemberInfo>();
return Array.Empty<ScriptMemberInfo>();
}
managedMembers = null;
if (_custom != null)
return _custom.GetMembers(bindingAttr);
return Utils.GetEmptyArray<ScriptMemberInfo>();
return Array.Empty<ScriptMemberInfo>();
}
/// <summary>
@@ -1307,7 +1307,7 @@ namespace FlaxEditor.Scripting
}
if (_custom != null)
return _custom.GetMembers(bindingAttr);
return Utils.GetEmptyArray<ScriptMemberInfo>();
return Array.Empty<ScriptMemberInfo>();
}
/// <summary>
@@ -1327,7 +1327,7 @@ namespace FlaxEditor.Scripting
}
if (_custom != null)
return _custom.GetFields(bindingAttr);
return Utils.GetEmptyArray<ScriptMemberInfo>();
return Array.Empty<ScriptMemberInfo>();
}
/// <summary>
@@ -1365,7 +1365,7 @@ namespace FlaxEditor.Scripting
}
if (_custom != null)
return _custom.GetProperties(bindingAttr);
return Utils.GetEmptyArray<ScriptMemberInfo>();
return Array.Empty<ScriptMemberInfo>();
}
/// <summary>
@@ -1403,7 +1403,7 @@ namespace FlaxEditor.Scripting
}
if (_custom != null)
return _custom.GetMethods(bindingAttr);
return Utils.GetEmptyArray<ScriptMemberInfo>();
return Array.Empty<ScriptMemberInfo>();
}
/// <summary>
+3 -15
View File
@@ -141,10 +141,10 @@ int32 ScriptsBuilder::GetCompilationsCount()
String ScriptsBuilder::GetBuildToolPath()
{
#if USE_NETCORE && (PLATFORM_LINUX || PLATFORM_MAC)
return Globals::StartupFolder / TEXT("Binaries/Tools/Flax.Build");
#else
#if PLATFORM_WINDOWS_FAMILY
return Globals::StartupFolder / TEXT("Binaries/Tools/Flax.Build.exe");
#else
return Globals::StartupFolder / TEXT("Binaries/Tools/Flax.Build");
#endif
}
@@ -244,18 +244,6 @@ bool ScriptsBuilder::RunBuildTool(const StringView& args, const StringView& work
// Prepare build options
StringBuilder cmdLine(args.Length() + buildToolPath.Length() + 200);
#if !USE_NETCORE && (PLATFORM_LINUX || PLATFORM_MAC)
const String monoPath = Globals::MonoPath / TEXT("bin/mono");
if (!FileSystem::FileExists(monoPath))
{
Log::FileNotFoundException(monoPath).SetLevel(LogType::Fatal);
return true;
}
const String monoPath = TEXT("mono");
cmdLine.Append(monoPath);
cmdLine.Append(TEXT(" "));
// TODO: Set env var for the mono MONO_GC_PARAMS=nursery-size64m to boost build performance -> profile it
#endif
cmdLine.Append(buildToolPath);
// Call build tool
+3 -3
View File
@@ -39,8 +39,8 @@ namespace FlaxEditor.Surface
DefaultValues = new object[]
{
"State",
Utils.GetEmptyArray<byte>(),
Utils.GetEmptyArray<byte>(),
Array.Empty<byte>(),
Array.Empty<byte>(),
},
Size = new Float2(100, 0),
},
@@ -54,7 +54,7 @@ namespace FlaxEditor.Surface
Size = new Float2(100, 0),
DefaultValues = new object[]
{
Utils.GetEmptyArray<byte>(),
Array.Empty<byte>(),
},
},
}
@@ -875,7 +875,7 @@ namespace FlaxEditor.Surface.Archetypes
byte[] value;
if (Transitions.Count == 0)
{
value = Utils.GetEmptyArray<byte>();
value = Array.Empty<byte>();
}
else
{
@@ -1807,7 +1807,7 @@ namespace FlaxEditor.Surface.Archetypes
get => _ruleGraph;
set
{
_ruleGraph = value ?? Utils.GetEmptyArray<byte>();
_ruleGraph = value ?? Array.Empty<byte>();
SourceState.SaveTransitions();
}
}
@@ -1849,7 +1849,7 @@ namespace FlaxEditor.Surface.Archetypes
DestinationState = destination;
_data = data;
_data.Destination = destination.ID;
_ruleGraph = ruleGraph ?? Utils.GetEmptyArray<byte>();
_ruleGraph = ruleGraph ?? Array.Empty<byte>();
}
/// <summary>
@@ -784,7 +784,7 @@ namespace FlaxEditor.Surface.Archetypes
DefaultValues = new object[]
{
"Locomotion",
Utils.GetEmptyArray<byte>(),
Array.Empty<byte>(),
3,
true,
true,
@@ -818,8 +818,8 @@ namespace FlaxEditor.Surface.Archetypes
DefaultValues = new object[]
{
"State",
Utils.GetEmptyArray<byte>(),
Utils.GetEmptyArray<byte>(),
Array.Empty<byte>(),
Array.Empty<byte>(),
},
},
new NodeArchetype
@@ -1089,7 +1089,7 @@ namespace FlaxEditor.Surface.Archetypes
Size = new Float2(100, 0),
DefaultValues = new object[]
{
Utils.GetEmptyArray<byte>(),
Array.Empty<byte>(),
},
},
new NodeArchetype
@@ -445,7 +445,7 @@ namespace FlaxEditor.Surface.Archetypes
var decorator = Context.SpawnNode(19, 3, Location, new object[]
{
nodeType.TypeName,
Utils.GetEmptyArray<byte>(),
Array.Empty<byte>(),
});
// Add decorator to the node
@@ -646,7 +646,7 @@ namespace FlaxEditor.Surface.Archetypes
return new[] { uint.Parse(id[0]) };
}
}
return Utils.GetEmptyArray<uint>();
return Array.Empty<uint>();
}
}
@@ -949,7 +949,7 @@ namespace FlaxEditor.Surface.Archetypes
DefaultValues = new object[]
{
string.Empty, // Type Name
Utils.GetEmptyArray<byte>(), // Instance Data
Array.Empty<byte>(), // Instance Data
null, // List of Decorator Nodes IDs
},
Size = new Float2(100, 0),
@@ -967,7 +967,7 @@ namespace FlaxEditor.Surface.Archetypes
DefaultValues = new object[]
{
typeof(BehaviorTreeRootNode).FullName, // Root node
Utils.GetEmptyArray<byte>(), // Instance Data
Array.Empty<byte>(), // Instance Data
},
Size = new Float2(100, 0),
Elements = new[]
@@ -984,7 +984,7 @@ namespace FlaxEditor.Surface.Archetypes
DefaultValues = new object[]
{
string.Empty, // Type Name
Utils.GetEmptyArray<byte>(), // Instance Data
Array.Empty<byte>(), // Instance Data
},
Size = new Float2(100, 0),
},
@@ -1,5 +1,6 @@
// Copyright (c) Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;
using FlaxEditor.GUI;
using FlaxEditor.Scripting;
@@ -84,7 +85,7 @@ namespace FlaxEditor.Surface.Archetypes
const int firstBox = 2;
const int maxBoxes = 40;
bool isInvalid = false;
var data = Utils.GetEmptyArray<byte>();
var data = Array.Empty<byte>();
if (valueBox.HasAnyConnection)
{
@@ -216,7 +217,7 @@ namespace FlaxEditor.Surface.Archetypes
Description = "Returns one of the input values based on the enum value",
Flags = NodeFlags.VisualScriptGraph | NodeFlags.AnimGraph,
Size = new Float2(160, 60),
DefaultValues = new object[] { Utils.GetEmptyArray<byte>() },
DefaultValues = new object[] { Array.Empty<byte>() },
ConnectionsHints = ConnectionsHint.Enum,
Elements = new[]
{
+3 -2
View File
@@ -1,5 +1,6 @@
// Copyright (c) Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;
using FlaxEditor.GUI;
using FlaxEditor.Scripting;
@@ -140,7 +141,7 @@ namespace FlaxEditor.Surface.Archetypes
const int firstBox = 2;
const int maxBoxes = 40;
bool isInvalid = false;
var data = Utils.GetEmptyArray<byte>();
var data = Array.Empty<byte>();
if (valueBox.HasAnyConnection)
{
@@ -285,7 +286,7 @@ namespace FlaxEditor.Surface.Archetypes
Description = "Performs the flow logic branch based on the enum value",
Flags = NodeFlags.VisualScriptGraph,
Size = new Float2(160, 60),
DefaultValues = new object[] { Utils.GetEmptyArray<byte>() },
DefaultValues = new object[] { Array.Empty<byte>() },
ConnectionsHints = ConnectionsHint.Enum,
Elements = new[]
{
+7 -7
View File
@@ -574,7 +574,7 @@ namespace FlaxEditor.Surface.Archetypes
if (_parameters.Length == 0 && methodInfo.ValueType.IsVoid)
{
// Skip allocations if method is void and parameter-less
Values[2] = Utils.GetEmptyArray<byte>();
Values[2] = Array.Empty<byte>();
}
else
{
@@ -714,7 +714,7 @@ namespace FlaxEditor.Surface.Archetypes
method.Name, // Method name
parametersCount, // Method parameters count
false, // Is Pure?
Utils.GetEmptyArray<byte>(), // Cached function signature data
Array.Empty<byte>(), // Cached function signature data
// Default value for parameters (27 entries)
// @formatter:off
null,null,null,null,null,null,null,null,null,null,
@@ -810,7 +810,7 @@ namespace FlaxEditor.Surface.Archetypes
signature.IsStatic = reader.ReadBoolean(); // Is Static
signature.ReturnType = VariantUtils.ReadVariantScriptType(reader); // Return type
var parametersCount = reader.ReadInt32(); // Parameters count
signature.Params = parametersCount != 0 ? new SignatureParamInfo[parametersCount] : Utils.GetEmptyArray<SignatureParamInfo>();
signature.Params = parametersCount != 0 ? new SignatureParamInfo[parametersCount] : Array.Empty<SignatureParamInfo>();
for (int i = 0; i < parametersCount; i++)
{
ref var param = ref signature.Params[i];
@@ -831,7 +831,7 @@ namespace FlaxEditor.Surface.Archetypes
signature.IsStatic = reader.ReadBoolean(); // Is Static
signature.ReturnType = VariantUtils.ReadVariantScriptType(reader); // Return type
var parametersCount = reader.ReadInt32(); // Parameters count
signature.Params = parametersCount != 0 ? new SignatureParamInfo[parametersCount] : Utils.GetEmptyArray<SignatureParamInfo>();
signature.Params = parametersCount != 0 ? new SignatureParamInfo[parametersCount] : Array.Empty<SignatureParamInfo>();
for (int i = 0; i < parametersCount; i++)
{
ref var param = ref signature.Params[i];
@@ -2489,7 +2489,7 @@ namespace FlaxEditor.Surface.Archetypes
{
string.Empty, // Overriden method name
0, // Overriden method parameters count
Utils.GetEmptyArray<byte>(), // Cached function signature data
Array.Empty<byte>(), // Cached function signature data
},
},
new NodeArchetype
@@ -2507,7 +2507,7 @@ namespace FlaxEditor.Surface.Archetypes
string.Empty, // Method name
0, // Method parameters count
false, // Is Pure?
Utils.GetEmptyArray<byte>(), // Cached function signature data
Array.Empty<byte>(), // Cached function signature data
// Default value for parameters (27 entries)
// @formatter:off
@@ -2546,7 +2546,7 @@ namespace FlaxEditor.Surface.Archetypes
Size = new Float2(240, 20),
DefaultValues = new object[]
{
Utils.GetEmptyArray<byte>(), // Function signature data
Array.Empty<byte>(), // Function signature data
},
},
new NodeArchetype
+3 -3
View File
@@ -156,7 +156,7 @@ namespace FlaxEditor.Surface.Archetypes
if (fieldsLength == 0)
{
// Skip allocations if structure is empty
Values[1] = Utils.GetEmptyArray<byte>();
Values[1] = Array.Empty<byte>();
}
else
{
@@ -471,7 +471,7 @@ namespace FlaxEditor.Surface.Archetypes
DefaultValues = new object[]
{
string.Empty, // Typename
Utils.GetEmptyArray<byte>(), // Cached structure layout data
Array.Empty<byte>(), // Cached structure layout data
},
Elements = new[]
{
@@ -591,7 +591,7 @@ namespace FlaxEditor.Surface.Archetypes
DefaultValues = new object[]
{
string.Empty, // Typename
Utils.GetEmptyArray<byte>(), // Cached structure layout data
Array.Empty<byte>(), // Cached structure layout data
},
Elements = new[]
{
+2 -2
View File
@@ -56,8 +56,8 @@ namespace FlaxEditor.Surface
private object Creator(Type type)
{
var ctor = type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, null, Utils.GetEmptyArray<Type>(), null);
return ctor.Invoke(Utils.GetEmptyArray<object>());
var ctor = type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, null, Array.Empty<Type>(), null);
return ctor.Invoke(Array.Empty<object>());
}
}
+1 -1
View File
@@ -1484,7 +1484,7 @@ namespace FlaxEditor.Surface.Elements
protected override void OnAttributesChanged()
{
OnCurrentTypeChanged();
_editor?.UpdateAttributes(this, _attributes ?? Utils.GetEmptyArray<object>(), _defaultValueEditor);
_editor?.UpdateAttributes(this, _attributes ?? Array.Empty<object>(), _defaultValueEditor);
}
/// <inheritdoc />
+2 -2
View File
@@ -91,7 +91,7 @@ namespace FlaxEditor.Surface
}
}
}
return Utils.GetEmptyArray<Attribute>();
return Array.Empty<Attribute>();
}
/// <summary>
@@ -106,7 +106,7 @@ namespace FlaxEditor.Surface
var json = FlaxEngine.Json.JsonSerializer.Serialize(attributes);
return Encoding.Unicode.GetBytes(json);
}
return Utils.GetEmptyArray<byte>();
return Array.Empty<byte>();
}
/// <summary>
+1 -1
View File
@@ -237,7 +237,7 @@ namespace FlaxEditor.Surface
surfaceParameters.Remove(surfaceParameter);
surfaceParameters.Add(surfaceParameter);
}
var attributes = surfaceParameter?.Meta.GetAttributes() ?? FlaxEngine.Utils.GetEmptyArray<Attribute>();
var attributes = surfaceParameter?.Meta.GetAttributes() ?? Array.Empty<Attribute>();
data[i] = new GraphParameterData(null, index++, parameter.Name, parameter.IsPublic, ToType(parameter.ParameterType), attributes, parameter);
i++;
}
@@ -17,7 +17,7 @@ namespace FlaxEditor.Tools.Foliage
private int _selectedInstanceIndex = -1;
/// <summary>
/// The foliage painting gizmo.
/// The foliage editing gizmo.
/// </summary>
public EditFoliageGizmo Gizmo;
@@ -66,8 +66,6 @@ namespace FlaxEditor.Tools.Foliage
base.Init(owner);
Gizmo = new EditFoliageGizmo(owner, this);
SelectionOutline = FlaxEngine.Object.New<EditFoliageSelectionOutline>();
SelectionOutline.GizmoMode = this;
}
/// <inheritdoc />
@@ -84,6 +82,11 @@ namespace FlaxEditor.Tools.Foliage
base.OnActivated();
Owner.Gizmos.Active = Gizmo;
if (SelectionOutline == null)
{
SelectionOutline = FlaxEngine.Object.New<EditFoliageSelectionOutline>();
SelectionOutline.GizmoMode = this;
}
((MainEditorGizmoViewport)Owner).OverrideSelectionOutline(SelectionOutline);
SelectedInstanceIndex = -1;
}
@@ -6,7 +6,7 @@ using FlaxEngine;
namespace FlaxEditor.Tools.Foliage
{
/// <summary>
/// The custom outline for drawing the selected foliage instances outlines.
/// The custom outline for drawing the selected foliage instance.
/// </summary>
/// <seealso cref="FlaxEditor.Gizmo.SelectionOutline" />
[HideInEditor]
+2 -3
View File
@@ -5,7 +5,6 @@ using System.Collections.Generic;
using FlaxEditor.GUI.Tabs;
using FlaxEditor.Modules;
using FlaxEditor.SceneGraph.Actors;
using FlaxEditor.Viewport.Modes;
using FlaxEngine;
using FlaxEngine.GUI;
@@ -214,7 +213,7 @@ namespace FlaxEditor.Tools.Foliage
private void InitSculptMode()
{
var tab = _modes.AddTab(FoliageTypes = new FoliageTypesTab(this));
var tab = _modes.AddTab(FoliageTypes = new FoliageTypesTab(this, Editor.Windows.EditWin.Viewport.EditFoliageTypesGizmo));
tab.Selected += OnTabSelected;
}
@@ -251,7 +250,7 @@ namespace FlaxEditor.Tools.Foliage
switch (_modes.SelectedTabIndex)
{
case 0:
Editor.Windows.EditWin.Viewport.Gizmos.SetActiveMode<NoGizmoMode>();
Editor.Windows.EditWin.Viewport.Gizmos.SetActiveMode<FoliageTypesGizmoMode>();
break;
case 1:
Editor.Windows.EditWin.Viewport.Gizmos.SetActiveMode<PaintFoliageGizmoMode>();
@@ -0,0 +1,44 @@
// Copyright (c) Wojciech Figat. All rights reserved.
using FlaxEditor.Gizmo;
namespace FlaxEditor.Tools.Foliage
{
/// <summary>
/// Gizmo for editing foliage types.
/// </summary>
public sealed class FoliageTypesGizmo : GizmoBase
{
/// <summary>
/// The parent mode.
/// </summary>
public readonly FoliageTypesGizmoMode GizmoMode;
/// <summary>
/// Initializes a new instance of the <see cref="EditFoliageGizmo"/> class.
/// </summary>
/// <param name="owner">The owner.</param>
/// <param name="mode">The mode.</param>
public FoliageTypesGizmo(IGizmoOwner owner, FoliageTypesGizmoMode mode)
: base(owner)
{
GizmoMode = mode;
}
/// <inheritdoc />
public override void Pick()
{
// Get mouse ray and try to hit foliage instance
var foliage = GizmoMode.SelectedFoliage;
if (!foliage)
return;
var ray = Owner.MouseRay;
if (foliage.Intersects(ref ray, out _, out _, out var instanceIndex))
{
// Select hit instance type
var instance = foliage.GetInstance(instanceIndex);
GizmoMode.SelectedTypeIndex = instance.Type;
}
}
}
}
@@ -0,0 +1,86 @@
// Copyright (c) Wojciech Figat. All rights reserved.
using FlaxEditor.Gizmo;
using FlaxEditor.SceneGraph.Actors;
using FlaxEditor.Viewport;
using FlaxEditor.Viewport.Modes;
namespace FlaxEditor.Tools.Foliage
{
/// <summary>
/// Foliage types editing mode.
/// </summary>
/// <seealso cref="FlaxEditor.Viewport.Modes.EditorGizmoMode" />
public class FoliageTypesGizmoMode : EditorGizmoMode
{
/// <summary>
/// The foliage types gizmo.
/// </summary>
public FoliageTypesGizmo Gizmo;
/// <summary>
/// The foliage type editing selection outline.
/// </summary>
public FoliageTypesOutline SelectionOutline;
/// <summary>
/// The selected foliage type index.
/// </summary>
public int SelectedTypeIndex
{
get => Editor.Instance.Windows.ToolboxWin.Foliage.SelectedFoliageTypeIndex;
set => Editor.Instance.Windows.ToolboxWin.Foliage.SelectedFoliageTypeIndex = value;
}
/// <summary>
/// Gets the selected foliage actor (see <see cref="Modules.SceneEditingModule"/>).
/// </summary>
public FlaxEngine.Foliage SelectedFoliage
{
get
{
var sceneEditing = Editor.Instance.SceneEditing;
var foliageNode = sceneEditing.SelectionCount == 1 ? sceneEditing.Selection[0] as FoliageNode : null;
return (FlaxEngine.Foliage)foliageNode?.Actor;
}
}
/// <inheritdoc />
public override void Init(IGizmoOwner owner)
{
base.Init(owner);
Gizmo = new FoliageTypesGizmo(owner, this);
}
/// <inheritdoc />
public override void Dispose()
{
FlaxEngine.Object.Destroy(ref SelectionOutline);
base.Dispose();
}
/// <inheritdoc />
public override void OnActivated()
{
base.OnActivated();
Owner.Gizmos.Active = Gizmo;
if (SelectionOutline == null)
{
SelectionOutline = FlaxEngine.Object.New<FoliageTypesOutline>();
SelectionOutline.GizmoMode = this;
}
((MainEditorGizmoViewport)Owner).OverrideSelectionOutline(SelectionOutline);
}
/// <inheritdoc />
public override void OnDeactivated()
{
((MainEditorGizmoViewport)Owner).OverrideSelectionOutline(null);
base.OnDeactivated();
}
}
}
@@ -0,0 +1,62 @@
// Copyright (c) Wojciech Figat. All rights reserved.
using FlaxEditor.Gizmo;
using FlaxEngine;
namespace FlaxEditor.Tools.Foliage
{
/// <summary>
/// The custom outline for drawing the selected foliage type.
/// </summary>
/// <seealso cref="FlaxEditor.Gizmo.SelectionOutline" />
[HideInEditor]
public class FoliageTypesOutline : SelectionOutline
{
/// <summary>
/// The parent mode.
/// </summary>
public FoliageTypesGizmoMode GizmoMode;
/// <inheritdoc />
public override bool CanRender()
{
if (!HasDataReady)
return false;
var foliage = GizmoMode.SelectedFoliage;
if (!foliage)
return false;
var typeIndex = GizmoMode.SelectedTypeIndex;
if (typeIndex < 0 || typeIndex >= foliage.FoliageTypesCount)
return false;
return true;
}
/// <inheritdoc />
public override void Render(GPUContext context, ref RenderContext renderContext, GPUTexture input, GPUTexture output)
{
base.Render(context, ref renderContext, input, output);
// Restore debug option
var foliage = GizmoMode.SelectedFoliage;
if (foliage)
foliage._drawFoliageType = -1;
}
/// <inheritdoc />
protected override void DrawSelectionDepth(GPUContext context, SceneRenderTask task, GPUTexture customDepth)
{
var foliage = GizmoMode.SelectedFoliage;
if (!foliage)
return;
var typeIndex = GizmoMode.SelectedTypeIndex;
if (typeIndex < 0 || typeIndex >= foliage.FoliageTypesCount)
return;
// Draw instances of the given type
foliage._drawFoliageType = typeIndex;
_actors.Add(foliage);
Renderer.DrawSceneDepth(context, task, customDepth, _actors);
}
}
}
@@ -334,7 +334,8 @@ namespace FlaxEditor.Tools.Foliage
/// Initializes a new instance of the <see cref="FoliageTypesTab"/> class.
/// </summary>
/// <param name="tab">The parent tab.</param>
public FoliageTypesTab(FoliageTab tab)
/// <param name="mode">The gizmo mode.</param>
public FoliageTypesTab(FoliageTab tab, FoliageTypesGizmoMode mode)
: base("Foliage Types")
{
Tab = tab;
+16 -7
View File
@@ -1514,9 +1514,14 @@ namespace FlaxEditor.Viewport
Matrix.Multiply(ref v, ref p, out var ivp);
ivp.Invert();
// Create near and far points
var nearPoint = new Vector3(mousePosition, _nearPlane);
var farPoint = new Vector3(mousePosition, _farPlane);
// Create near and far points, with device depth of 1 and 0 respectively
#if REVERSE_Z
var nearPoint = new Vector3(mousePosition, 1.0f);
var farPoint = new Vector3(mousePosition, 0.0f);
#else
var nearPoint = new Vector3(mousePosition, 0.0f);
var farPoint = new Vector3(mousePosition, 1.0f);
#endif
viewport.Unproject(ref nearPoint, ref ivp, out nearPoint);
viewport.Unproject(ref farPoint, ref ivp, out farPoint);
@@ -2084,9 +2089,9 @@ namespace FlaxEditor.Viewport
new ViewModeOptions(ViewMode.Wireframe, "Wireframe", Editor.Instance.Options.Options.Input.Wireframe),
new ViewModeOptions(ViewMode.LightBuffer, "Light Buffer", Editor.Instance.Options.Options.Input.LightBuffer),
new ViewModeOptions(ViewMode.Reflections, "Reflections Buffer", Editor.Instance.Options.Options.Input.ReflectionsBuffer),
new ViewModeOptions(ViewMode.Depth, "Depth Buffer", Editor.Instance.Options.Options.Input.DepthBuffer),
new ViewModeOptions("GBuffer", new[]
{
new ViewModeOptions(ViewMode.Depth, "Depth Buffer", Editor.Instance.Options.Options.Input.DepthBuffer),
new ViewModeOptions(ViewMode.Diffuse, "Diffuse"),
new ViewModeOptions(ViewMode.Metalness, "Metalness"),
new ViewModeOptions(ViewMode.Roughness, "Roughness"),
@@ -2102,9 +2107,13 @@ namespace FlaxEditor.Viewport
new ViewModeOptions(ViewMode.LightmapUVsDensity, "Lightmap UVs Density", Editor.Instance.Options.Options.Input.LightmapUVDensity),
new ViewModeOptions(ViewMode.VertexColors, "Vertex Colors", Editor.Instance.Options.Options.Input.VertexColors),
new ViewModeOptions(ViewMode.PhysicsColliders, "Physics Colliders", Editor.Instance.Options.Options.Input.PhysicsColliders),
new ViewModeOptions(ViewMode.LODPreview, "LOD Preview", Editor.Instance.Options.Options.Input.LODPreview),
new ViewModeOptions(ViewMode.MaterialComplexity, "Material Complexity", Editor.Instance.Options.Options.Input.MaterialComplexity),
new ViewModeOptions(ViewMode.QuadOverdraw, "Quad Overdraw", Editor.Instance.Options.Options.Input.QuadOverdraw),
new ViewModeOptions("Optimization", new[]
{
new ViewModeOptions(ViewMode.LODPreview, "LOD Preview", Editor.Instance.Options.Options.Input.LODPreview),
new ViewModeOptions(ViewMode.MaterialComplexity, "Material Complexity", Editor.Instance.Options.Options.Input.MaterialComplexity),
new ViewModeOptions(ViewMode.QuadOverdraw, "Quad Overdraw", Editor.Instance.Options.Options.Input.QuadOverdraw),
new ViewModeOptions(ViewMode.GlobalSDFOverdraw, "Global SDF Overdraw"),
}),
new ViewModeOptions(ViewMode.GlobalSDF, "Global SDF", Editor.Instance.Options.Options.Input.GloablSDF),
new ViewModeOptions(ViewMode.GlobalSurfaceAtlas, "Global Surface Atlas", Editor.Instance.Options.Options.Input.GlobalSurfaceAtlas),
new ViewModeOptions(ViewMode.GlobalIllumination, "Global Illumination", Editor.Instance.Options.Options.Input.GlobalIllumination),
@@ -179,12 +179,17 @@ namespace FlaxEditor.Viewport
public Tools.Terrain.EditTerrainGizmoMode EditTerrainGizmo;
/// <summary>
/// The paint foliage gizmo.
/// The edit foliage types gizmo.
/// </summary>
public Tools.Foliage.FoliageTypesGizmoMode EditFoliageTypesGizmo;
/// <summary>
/// The paint foliage instances gizmo.
/// </summary>
public Tools.Foliage.PaintFoliageGizmoMode PaintFoliageGizmo;
/// <summary>
/// The edit foliage gizmo.
/// The edit foliage instances gizmo.
/// </summary>
public Tools.Foliage.EditFoliageGizmoMode EditFoliageGizmo;
@@ -276,6 +281,7 @@ namespace FlaxEditor.Viewport
Gizmos.AddMode(SculptTerrainGizmo = new Tools.Terrain.SculptTerrainGizmoMode());
Gizmos.AddMode(PaintTerrainGizmo = new Tools.Terrain.PaintTerrainGizmoMode());
Gizmos.AddMode(EditTerrainGizmo = new Tools.Terrain.EditTerrainGizmoMode());
Gizmos.AddMode(EditFoliageTypesGizmo = new Tools.Foliage.FoliageTypesGizmoMode());
Gizmos.AddMode(PaintFoliageGizmo = new Tools.Foliage.PaintFoliageGizmoMode());
Gizmos.AddMode(EditFoliageGizmo = new Tools.Foliage.EditFoliageGizmoMode());
@@ -343,10 +349,12 @@ namespace FlaxEditor.Viewport
/// <param name="customSelectionOutline">The custom selection outline or null if use default one.</param>
public void OverrideSelectionOutline(SelectionOutline customSelectionOutline)
{
if (Task == null)
return;
if (_customSelectionOutline != null)
{
Task.RemoveCustomPostFx(_customSelectionOutline);
Object.Destroy(ref _customSelectionOutline);
Task.AddCustomPostFx(customSelectionOutline ? customSelectionOutline : SelectionOutline);
}
else if (customSelectionOutline != null)
@@ -530,7 +538,7 @@ namespace FlaxEditor.Viewport
}
/// <summary>
/// Toggles game view view mode on or off.
/// Toggles view mode on/off.
/// </summary>
public void ToggleGameView()
{
@@ -547,9 +555,9 @@ namespace FlaxEditor.Viewport
// Set flags & values
Task.ViewFlags = _gameViewActive ? _preGameViewFlags : ViewFlags.DefaultGame;
Task.ViewMode = _gameViewActive ? _preGameViewViewMode : ViewMode.Default;
ShowFpsCounter = _gameViewActive ? _gameViewWasFpsCounterShown : false;
ShowNavigation = _gameViewActive ? _gameViewWasNavigationShown : false;
Grid.Enabled = _gameViewActive ? _gameViewWasGridShown : false;
ShowFpsCounter = _gameViewActive && _gameViewWasFpsCounterShown;
ShowNavigation = _gameViewActive && _gameViewWasNavigationShown;
Grid.Enabled = _gameViewActive && _gameViewWasGridShown;
_gameViewActive = !_gameViewActive;
@@ -730,6 +738,20 @@ namespace FlaxEditor.Viewport
base.OnLeftMouseButtonUp();
}
/// <inheritdoc />
public override bool OnKeyDown(KeyboardKeys key)
{
if (base.OnKeyDown(key))
return true;
if (key == KeyboardKeys.Escape)
{
_editor.SceneEditing.Deselect();
}
return false;
}
/// <inheritdoc />
public override bool OnMouseUp(Float2 location, MouseButton button)
{
@@ -843,8 +865,8 @@ namespace FlaxEditor.Viewport
if (_task != null)
{
// Release if task is not used to save screenshot for project icon
ReleaseTaskResources();
Object.Destroy(ref _task);
ReleaseResources();
}
base.OnDestroy();
@@ -860,6 +882,7 @@ namespace FlaxEditor.Viewport
_savedTask = _task;
_savedBackBuffer = _backBuffer;
ReleaseTaskResources();
_task = null;
_backBuffer = null;
}
@@ -870,20 +893,20 @@ namespace FlaxEditor.Viewport
{
_savedTask.Enabled = false;
Object.Destroy(_savedTask);
ReleaseResources();
ReleaseTaskResources();
_savedTask = null;
}
Object.Destroy(ref _savedBackBuffer);
}
private void ReleaseResources()
private void ReleaseTaskResources()
{
if (Task)
if (_task)
{
Task.RemoveCustomPostFx(SelectionOutline);
Task.RemoveCustomPostFx(EditorPrimitives);
Task.RemoveCustomPostFx(_editorSpritesRenderer);
Task.RemoveCustomPostFx(_customSelectionOutline);
_task.RemoveCustomPostFx(SelectionOutline);
_task.RemoveCustomPostFx(EditorPrimitives);
_task.RemoveCustomPostFx(_editorSpritesRenderer);
_task.RemoveCustomPostFx(_customSelectionOutline);
}
Object.Destroy(ref SelectionOutline);
Object.Destroy(ref EditorPrimitives);
+1 -1
View File
@@ -136,9 +136,9 @@ namespace FlaxEditor.Windows
{
"Used third party software:",
"",
"Mono Project - www.mono-project.com",
#if USE_NETCORE
".NET - www.dotnet.microsoft.com",
"Mono Project - www.mono-project.com",
#endif
#if PLATFORM_SDL
"Simple DirectMedia Layer - www.libsdl.org",
@@ -233,7 +233,7 @@ namespace FlaxEditor.Windows.Assets
var materialInstance = proxy.Window?.Asset;
if (materialInstance == null)
{
layout.Label("No parameters");
layout.Label("No parameters", TextAlignment.Center);
return;
}
if (!materialInstance.IsLoaded || (materialInstance.BaseMaterial && !materialInstance.BaseMaterial.IsLoaded))
@@ -246,7 +246,10 @@ namespace FlaxEditor.Windows.Assets
base.Initialize(layout);
if (parameters.Length == 0)
{
layout.Label("No parameters", TextAlignment.Center);
return;
}
var parametersGroup = SurfaceUtils.InitGraphParametersGroup(layout);
var settingButton = parametersGroup.AddSettingsButton();
@@ -502,7 +502,7 @@ namespace FlaxEditor.Windows.Assets
{
Name = $"{name} (in {member.DeclaringType.Name})",
TooltipText = Editor.Instance.CodeDocs.GetTooltip(member),
Tag = new object[] { name, parameters.Length, Utils.GetEmptyArray<byte>() },
Tag = new object[] { name, parameters.Length, Array.Empty<byte>() },
// Do some basic sorting based on if the method is defined directly in the script base class
SortScore = member.DeclaringType == member.Type.ReflectedType ? 1 : 0,
};
+1 -1
View File
@@ -49,7 +49,7 @@ namespace FlaxEditor.Windows.Profiler
{
Title = "Draw (GPU)",
AnchorPreset = AnchorPresets.HorizontalStretchTop,
Offsets = new Margin(0, 0, _drawTimeCPU.Height + 2, 0),
Offsets = new Margin(0, 0, _drawTimeCPU.Height + 2, SingleChart.DefaultHeight),
FormatSample = v => (Mathf.RoundToInt(v * 10.0f) / 10.0f) + " ms",
Parent = mainPanel,
};
+4 -4
View File
@@ -559,7 +559,7 @@ namespace FlaxEngine
/// </summary>
public LinearCurve()
{
Keyframes = Utils.GetEmptyArray<Keyframe>();
Keyframes = Array.Empty<Keyframe>();
}
/// <summary>
@@ -655,7 +655,7 @@ namespace FlaxEngine
if (end - start <= Mathf.Epsilon)
{
// Erase the curve
Keyframes = Utils.GetEmptyArray<Keyframe>();
Keyframes = Array.Empty<Keyframe>();
return;
}
@@ -866,7 +866,7 @@ namespace FlaxEngine
/// </summary>
public BezierCurve()
{
Keyframes = Utils.GetEmptyArray<Keyframe>();
Keyframes = Array.Empty<Keyframe>();
}
/// <summary>
@@ -970,7 +970,7 @@ namespace FlaxEngine
if (end - start <= Mathf.Epsilon)
{
// Erase the curve
Keyframes = Utils.GetEmptyArray<Keyframe>();
Keyframes = Array.Empty<Keyframe>();
return;
}
@@ -79,13 +79,6 @@ DEFINE_INTERNAL_CALL(AnimGraphImpulse*) AnimGraphInternal_GetOutputImpulseData(I
#endif
void AnimGraphExecutor::initRuntime()
{
ADD_INTERNAL_CALL("FlaxEngine.AnimationGraph::Internal_HasConnection", &AnimGraphInternal_HasConnection);
ADD_INTERNAL_CALL("FlaxEngine.AnimationGraph::Internal_GetInputValue", &AnimGraphInternal_GetInputValue);
ADD_INTERNAL_CALL("FlaxEngine.AnimationGraph::Internal_GetOutputImpulseData", &AnimGraphInternal_GetOutputImpulseData);
}
void AnimGraphExecutor::ProcessGroupCustom(Box* boxBase, Node* nodeBase, Value& value)
{
#if USE_CSHARP
@@ -813,11 +813,6 @@ private:
static ThreadLocal<AnimGraphContext*> Context;
public:
/// <summary>
/// Initializes the managed runtime calls.
/// </summary>
static void initRuntime();
/// <summary>
/// Initializes a new instance of the <see cref="AnimGraphExecutor"/> class.
/// </summary>
+10
View File
@@ -430,6 +430,9 @@ void Asset::Reload()
ScopeLock lock(Locker);
// Cancel any still-running loading task (e.g. if WaitForLoaded timed out)
Platform::AtomicStore(&_loadingTask, 0);
if (IsLoaded())
{
// Unload current data
@@ -612,6 +615,13 @@ bool Asset::onLoad(LoadAssetTask* task)
Locker.Lock();
// Re-check after acquiring lock (loading task may have been cleared by Reload, or replaced by a new task)
if (Platform::AtomicRead(&_loadingTask) == 0)
{
Locker.Unlock();
return true;
}
// Load asset
LoadResult result;
#if USE_EDITOR
+2 -2
View File
@@ -101,9 +101,9 @@ bool Material::CanUseLightmap() const
return _materialShader && _materialShader->CanUseLightmap();
}
bool Material::CanUseInstancing(InstancingHandler& handler) const
bool Material::CanUseInstancing(const RenderContext& renderContext, InstancingHandler& handler) const
{
return _materialShader && _materialShader->CanUseInstancing(handler);
return _materialShader && _materialShader->CanUseInstancing(renderContext, handler);
}
void Material::Bind(BindParameters& params)
+1 -1
View File
@@ -48,7 +48,7 @@ public:
bool IsReady() const override;
DrawPass GetDrawModes() const override;
bool CanUseLightmap() const override;
bool CanUseInstancing(InstancingHandler& handler) const override;
bool CanUseInstancing(const RenderContext& renderContext, InstancingHandler& handler) const override;
void Bind(BindParameters& params) override;
// [ShaderAssetBase]
@@ -168,9 +168,9 @@ bool MaterialInstance::CanUseLightmap() const
return _baseMaterial && _baseMaterial->CanUseLightmap();
}
bool MaterialInstance::CanUseInstancing(InstancingHandler& handler) const
bool MaterialInstance::CanUseInstancing(const RenderContext& renderContext, InstancingHandler& handler) const
{
return _baseMaterial && _baseMaterial->CanUseInstancing(handler);
return _baseMaterial && _baseMaterial->CanUseInstancing(renderContext, handler);
}
void MaterialInstance::Bind(BindParameters& params)
@@ -53,7 +53,7 @@ public:
bool IsReady() const override;
DrawPass GetDrawModes() const override;
bool CanUseLightmap() const override;
bool CanUseInstancing(InstancingHandler& handler) const override;
bool CanUseInstancing(const RenderContext& renderContext, InstancingHandler& handler) const override;
void Bind(BindParameters& params) override;
protected:
+11
View File
@@ -27,6 +27,17 @@ API_STRUCT(NoDefault) struct FLAXENGINE_API SceneReference
{
return ID != other.ID;
}
FORCE_INLINE SceneReference& operator=(const Guid& id)
{
ID = id;
return *this;
}
FORCE_INLINE operator Guid() const
{
return ID;
}
};
template<>
@@ -9,6 +9,7 @@
#include "Engine/Level/Types.h"
#include "Engine/Debug/Exceptions/JsonParseException.h"
#include "Engine/Profiler/ProfilerCPU.h"
#include "Engine/Profiler/ProfilerMemory.h"
#if USE_EDITOR
#include "Engine/Core/Collections/HashSet.h"
#include "Engine/Core/Collections/Dictionary.h"
@@ -20,17 +21,66 @@ bool JsonStorageProxy::IsValidExtension(const StringView& extension)
return extension == DEFAULT_SCENE_EXTENSION || extension == DEFAULT_PREFAB_EXTENSION || extension == DEFAULT_JSON_EXTENSION;
}
StringAnsiView ParseJsonString(const StringAnsiView& json, int32 start)
{
while (start < json.Length() && json[start] != '\"')
start++;
int32 end = start + 1;
while (end < json.Length() && json[end] != '\"')
end++;
return json.Substring(start + 1, end - start - 1);
}
bool JsonStorageProxy::GetAssetInfo(const StringView& path, Guid& resultId, String& resultDataTypeName)
{
PROFILE_CPU();
// TODO: we could just open file and start reading until we find 'ID:..' without parsing whole file - could be much more faster
PROFILE_MEM(Content);
ZoneText(*path, path.Length());
// Read the first part of the file to get asset metadata (ID and TypeName)
auto file = File::Open(path, FileMode::OpenExisting, FileAccess::Read, FileShare::All);
if (!file)
return false;
Array<byte> fileData;
fileData.Resize(256);
uint32 read = 0;
file->Read(fileData.Get(), fileData.Count(), &read);
Delete(file);
file = nullptr;
if (read != 0)
{
// Naive Json parsing to get ID and TypeName without full parsing
StringAnsiView json((const char*)fileData.Get(), read);
StringAnsiView idStart("\"ID\": ");
StringAnsiView typenameStart("\"TypeName\": ");
bool hasOneOfThem = false;
for (int32 i = 0; i < json.Length() - 7; i++)
{
if (json.Substring(i).StartsWith(idStart))
{
StringAnsiView value = ParseJsonString(json, i + idStart.Length());
if (Guid::Parse(value, resultId))
continue;
if (hasOneOfThem)
return true;
hasOneOfThem = true;
i += value.Length() + idStart.Length() + 2;
}
if (json.Substring(i).StartsWith(typenameStart))
{
StringAnsiView value = ParseJsonString(json, i + typenameStart.Length());
resultDataTypeName = String(value);
if (hasOneOfThem)
return true;
hasOneOfThem = true;
i += value.Length() + typenameStart.Length() + 2;
}
}
}
// Load file
Array<byte> fileData;
if (File::ReadAllBytes(path, fileData))
{
return false;
}
// Parse data
rapidjson_flax::Document document;
@@ -89,11 +139,8 @@ void FindObjectIds(const rapidjson_flax::Value& obj, const rapidjson_flax::Docum
}
}
#endif
bool JsonStorageProxy::ChangeId(const StringView& path, const Guid& newId)
{
#if USE_EDITOR
PROFILE_CPU();
// Load file
@@ -140,8 +187,6 @@ bool JsonStorageProxy::ChangeId(const StringView& path, const Guid& newId)
return true;
return false;
#else
LOG(Warning, "Editing cooked content is invalid.");
return true;
#endif
}
#endif
@@ -30,6 +30,7 @@ public:
/// <returns>True if found any asset, otherwise false.</returns>
static bool GetAssetInfo(const StringView& path, Guid& resultId, String& resultDataTypeName);
#if USE_EDITOR
/// <summary>
/// Changes asset ID.
/// </summary>
@@ -37,4 +38,5 @@ public:
/// <param name="newId">Asset ID to set</param>
/// <returns>True if found any asset, otherwise false.</returns>
static bool ChangeId(const StringView& path, const Guid& newId);
#endif
};
@@ -113,6 +113,8 @@ CreateAssetContext::CreateAssetContext(const StringView& inputPath, const String
CreateAssetResult CreateAssetContext::Run(const CreateAssetFunction& callback)
{
PROFILE_CPU();
PROFILE_MEM(Content);
ASSERT(callback.IsBinded());
// Call action
@@ -207,6 +209,9 @@ void CreateAssetContext::AddMeta(JsonWriter& writer) const
void CreateAssetContext::ApplyChanges()
{
PROFILE_CPU();
PROFILE_MEM(Content);
// Get access
auto storage = ContentStorageManager::TryGetStorage(TargetAssetPath);
if (storage && storage->IsLoaded())
@@ -274,6 +279,8 @@ bool AssetsImportingManager::Create(const String& tag, const StringView& outputP
bool AssetsImportingManager::Import(const StringView& inputPath, const StringView& outputPath, Guid& assetId, void* arg)
{
PROFILE_CPU();
PROFILE_MEM(Content);
LOG(Info, "Importing file '{0}' to '{1}'...", inputPath, outputPath);
// Check if input file exists
@@ -347,6 +354,7 @@ String AssetsImportingManager::GetImportPath(const String& path)
bool AssetsImportingManager::Create(const Function<CreateAssetResult(CreateAssetContext&)>& callback, const StringView& inputPath, const StringView& outputPath, Guid& assetId, void* arg)
{
PROFILE_CPU();
PROFILE_MEM(Content);
ZoneText(*outputPath, outputPath.Length());
const auto startTime = Platform::GetTimeSeconds();
@@ -365,7 +365,7 @@ namespace FlaxEngine.Collections
public T[] ToArray()
{
if (Count == 0)
return Utils.GetEmptyArray<T>();
return Array.Empty<T>();
var result = new T[Count];
if (_backItem > _frontItem)
+21 -1
View File
@@ -44,12 +44,32 @@ public:
IMPLEMENT_ENGINE_SETTINGS_GETTER(BuildSettings, GameCooking);
#include "Engine/Content/Deprecated.h"
PRAGMA_DISABLE_DEPRECATION_WARNINGS;
bool GraphicsSettings::GetUeeHDRProbes() const
{
return UseHDRProbes;
}
void GraphicsSettings::SetUeeHDRProbes(bool value)
{
MARK_CONTENT_DEPRECATED();
UseHDRProbes = value;
DefaultProbeCubemapFormat = value ? ProbeCubemapFormats::R11G11B10 : ProbeCubemapFormats::R8G8B8A8;
}
bool GraphicsSettings::GetUseHDRProbes() const
{
return UseHDRProbes;
}
void GraphicsSettings::SetUseHDRProbes(bool value)
{
DefaultProbeCubemapFormat = value ? ProbeCubemapFormats::R11G11B10 : ProbeCubemapFormats::R8G8B8A8;
}
PRAGMA_ENABLE_DEPRECATION_WARNINGS;
void GraphicsSettings::OnDeserializing(const CallbackContext& context)
{
#if 0 // TODO: move to Linear color space as default once it's ready for production

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