478 Commits

Author SHA1 Message Date
c7326ea483 _prog
Some checks failed
Build Android / Game (Android, Release ARM64) (push) Has been cancelled
Build iOS / Game (iOS, Release ARM64) (push) Has been cancelled
Build Linux / Editor (Linux, Development x64) (push) Has been cancelled
Build Linux / Game (Linux, Release x64) (push) Has been cancelled
Build macOS / Editor (Mac, Development ARM64) (push) Has been cancelled
Build macOS / Game (Mac, Release ARM64) (push) Has been cancelled
Build Windows / Editor (Windows, Development x64) (push) Has been cancelled
Build Windows / Game (Windows, Release x64) (push) Has been cancelled
Cooker / Cook (Mac) (push) Has been cancelled
Tests / Tests (Linux) (push) Has been cancelled
Tests / Tests (Windows) (push) Has been cancelled
2025-12-27 17:59:40 +02:00
523cad3b2c Skip including known non-code subfolders from Source folder 2025-12-27 17:59:33 +02:00
ff6816396c _Formatting flags 2025-12-26 21:49:13 +02:00
24b8ad77fe Fix managed wrapper function parameter handling for BytesContainer 2025-12-23 00:36:57 +02:00
3008d8037d _unbox
Some checks failed
Build Android / Game (Android, Release ARM64) (push) Has been cancelled
Build iOS / Game (iOS, Release ARM64) (push) Has been cancelled
Build Linux / Editor (Linux, Development x64) (push) Has been cancelled
Build Linux / Game (Linux, Release x64) (push) Has been cancelled
Build macOS / Editor (Mac, Development ARM64) (push) Has been cancelled
Build macOS / Game (Mac, Release ARM64) (push) Has been cancelled
Build Windows / Editor (Windows, Development x64) (push) Has been cancelled
Build Windows / Game (Windows, Release x64) (push) Has been cancelled
Cooker / Cook (Mac) (push) Has been cancelled
Tests / Tests (Linux) (push) Has been cancelled
Tests / Tests (Windows) (push) Has been cancelled
2025-12-21 20:17:24 +02:00
0973363c64 wip 2 no leaks 2025-12-21 17:45:46 +02:00
5d45b9ea1c Fix managed boolean array conversion to native array 2025-12-20 01:51:37 +02:00
c40f7c12f2 Fix incorrect class namespace in bindings class name lookups 2025-12-19 23:57:31 +02:00
1b2d6372b2 Fix warnings 2025-12-19 13:16:35 +02:00
0782ea889c Fix command-line parsing for SDL CreateProcess arguments 2025-12-19 13:16:35 +02:00
ef89501111 Add function for parsing command-line arguments into argument list 2025-12-19 13:16:35 +02:00
608353b996 _managed handle pool start 2025-12-19 13:14:11 +02:00
221325ef09 _freemanaged dllexport used 2025-12-19 13:14:10 +02:00
8f57c91a9e _track disabled 2025-12-19 13:14:10 +02:00
968de34cae _wip 2025-12-19 13:14:10 +02:00
6586a98f8d Ensure managed converter functions are exported with optimizations 2025-12-19 13:14:10 +02:00
b3510b0e44 Add USED attribute for forcing compiler to emit the symbol 2025-12-19 13:14:10 +02:00
d5a92c1942 Fix missing exports for managed converter structures 2025-12-19 13:14:10 +02:00
417f82826f Expose RenderContext to scripting API 2025-12-19 13:14:10 +02:00
63bed0986a Fix clang bindings code generation for non-const ref parameters 2025-12-19 13:14:10 +02:00
c40eefc79d Fix compilation errors with /permissive- standard conformance mode 2025-12-19 13:14:10 +02:00
d68631dd20 Fix Editor project file generation to use custom code editor arguments 2025-12-19 13:14:10 +02:00
e77b772010 Get code editor name through CodeEditingManager 2025-12-19 13:14:10 +02:00
e41e956386 Fix default code editor not using Visual Studio as fallback editor 2025-12-19 13:14:10 +02:00
33e47c646b Fix invalid code editor when selected editor is not detected 2025-12-19 13:14:10 +02:00
b30ce6b84f Support Visual Studio 2026 as a generator for CMake dependencies 2025-12-19 01:31:42 +02:00
02f67b25f3 Verify the last project path before using it 2025-12-19 01:31:42 +02:00
469a422681 Add -lastproject editor command-line option to open the last project 2025-12-19 01:31:41 +02:00
42fa0ffdd1 Use last opened project as initial directory in project file dialog 2025-12-19 01:31:41 +02:00
f97ee72f1c Fix SpecialFolder::AppData on Apple systems 2025-12-19 01:31:41 +02:00
89c93dd4f7 Use XDG user directories on Linux special paths 2025-12-19 01:31:40 +02:00
60cd8f702e Fix Flax C#-project launchSettings.json to launch without project 2025-12-19 01:31:40 +02:00
f376ec5c8a Launch editor when debugging C++ projects in Rider Linux/macOS 2025-12-19 01:31:40 +02:00
82bb297119 Use standard output for logging by default 2025-12-16 21:16:05 +02:00
ed994cb560 Run editor with selected project configuration in launchSettings.json 2025-12-16 21:16:05 +02:00
8efe2134f0 Fix duplicate properties for default configuration in C# projects 2025-12-16 21:16:05 +02:00
8efc4715c6 Improve Linux .NET runtime identifier detection
Use the runtime identifier detected during runtime instead of
calling the dotnet tool in order to query it.
2025-12-16 00:15:40 +02:00
48c60144ae Set C# language version to 14 with .NET 10 2025-12-16 00:15:40 +02:00
249cde467e Improve installed .NET runtime version detection 2025-12-16 00:15:40 +02:00
e2eadc87b6 Fix Editor state after loading a scene without compiled game modules 2025-12-16 00:15:40 +02:00
bc4b94d2bc Use in over ref modifier in Math functions input parameters 2025-12-16 00:15:30 +02:00
ecf074801f Fix ref usage warnings with in-parameters 2025-12-16 00:15:30 +02:00
74bac97f44 Deprecate UseFastPDBLinking
This is no longer supported in VS2026
2025-12-16 00:15:30 +02:00
d7eebb699c Pass const ref parameters as in parameters in C# bindings
_amend in parameters
2025-12-16 00:15:29 +02:00
dde07bac8d Fix mixed newline characters in generated bindings 2025-12-16 00:14:16 +02:00
5c8e593d89 Show properties without getter in generic editor 2025-12-16 00:14:16 +02:00
46fd5a5855 Ensure Flax.Build tasks and utilities output error messages as errors 2025-12-16 00:11:06 +02:00
74c1e200ce Implement Platform::CreateProcess with SDL backend
Supports handling process standard output and standard error
streams separately in realtime.
2025-12-16 00:10:01 +02:00
31945a53a2 Update SDL to 3.3.4 2025-12-15 19:32:47 +02:00
3e91ba3fb2 Merge remote-tracking branch 'origin/master' into sdl_platform 2025-12-15 19:03:05 +02:00
Wojtek Figat
e257f9e4a0 Merge branch 'Tryibion-fix-anim-slot-replay' 2025-12-14 23:03:45 +01:00
Wojtek Figat
056de752ed Add docs 2025-12-14 23:03:34 +01:00
Wojtek Figat
76700c0b24 Merge branch 'fix-anim-slot-replay' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-anim-slot-replay 2025-12-14 23:01:21 +01:00
Wojtek Figat
9fdcff657d Merge branch 'VitaminCpp-late_join_fix' 2025-12-14 22:58:55 +01:00
Wojtek Figat
2b6339c05c Minor code cleanup 2025-12-14 22:58:53 +01:00
Wojtek Figat
bb91202439 Merge branch 'late_join_fix' of https://github.com/VitaminCpp/FlaxEngine into VitaminCpp-late_join_fix 2025-12-14 22:49:49 +01:00
Wojtek Figat
f25e9f262a Merge branch 'VitaminCpp-replication_hashing_fix' 2025-12-14 22:48:09 +01:00
Wojtek Figat
ee51077f49 Merge branch 'replication_hashing_fix' of https://github.com/VitaminCpp/FlaxEngine into VitaminCpp-replication_hashing_fix 2025-12-14 22:43:58 +01:00
Wojtek Figat
950e958a58 Merge branch 'VitaminCpp-hash_set_crash_fix' 2025-12-14 22:41:11 +01:00
Wojtek Figat
5fdbed2b56 Minor codestyle adjustments 2025-12-14 22:41:00 +01:00
Chandler Cox
0e627577fc Simplify code. 2025-12-14 15:00:44 -06:00
Wojtek Figat
4846d4b024 Merge branch 'hash_set_crash_fix' of https://github.com/VitaminCpp/FlaxEngine into VitaminCpp-hash_set_crash_fix 2025-12-14 21:52:40 +01:00
Wojtek Figat
5e5293bf7b Merge branch 'GoaLitiuM-oob_write_fix' 2025-12-14 21:31:42 +01:00
Wojtek Figat
d88477dcae Merge branch 'oob_write_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-oob_write_fix 2025-12-14 21:31:37 +01:00
Wojtek Figat
bd58bd91b4 Merge branch 'ThePhantomMask-AddDropdownHighlightedColor' 2025-12-13 23:14:47 +01:00
Wojtek Figat
7ce0d88bdc Merge branch 'AddDropdownHighlightedColor' of https://github.com/ThePhantomMask/FlaxEngine into ThePhantomMask-AddDropdownHighlightedColor 2025-12-13 23:14:09 +01:00
Wojtek Figat
98bb2d40d6 Merge branch 'Inertia-Squared-hyprland-fix' 2025-12-13 23:13:30 +01:00
Wojtek Figat
f4bc620bbd Merge branch 'hyprland-fix' of https://github.com/Inertia-Squared/FlaxEngine into Inertia-Squared-hyprland-fix 2025-12-13 23:13:26 +01:00
Wojtek Figat
0313bf32c9 Merge branch 'AcidicVoid-master' 2025-12-13 23:11:05 +01:00
Wojtek Figat
0c887cd29e Use fix from #3830 in particle and anim graphs too 2025-12-13 23:11:01 +01:00
Wojtek Figat
5bd9bce634 Merge branch 'master' of https://github.com/AcidicVoid/FlaxEngine into AcidicVoid-master 2025-12-13 23:08:01 +01:00
Wojtek Figat
2a53d0a462 Fix crash on Visual Script missing asset ref after hot-reload in Editor
#3823
2025-12-13 02:10:41 +01:00
82bd915274 Fix out-of-bounds write while parsing command-line arguments 2025-12-12 14:47:15 +02:00
Wojtek Figat
71391cf1cc Fix deprecated tag placement 2025-12-11 16:38:28 +01:00
Wojtek Figat
b5286af526 Attempt to fix regression from 32bd72fecd 2025-12-11 14:48:18 +01:00
Wojtek Figat
9f07a2a54e Attempt to fix regression from 32bd72fecd 2025-12-10 18:58:43 +01:00
Wojtek Figat
c39c642b60 Add safety check for invalid math values in shader graph generation 2025-12-10 17:39:18 +01:00
Wojtek Figat
02cff3973a Bump up engine version 2025-12-10 15:01:53 +01:00
Wojtek Figat
a63b97d31d Add stripping DXIL debug data from the shader cache when not used 2025-12-10 14:58:12 +01:00
Wojtek Figat
ca52122656 Fix validation error on Windows for textures but optimize buffers instead 2025-12-10 14:53:51 +01:00
Wojtek Figat
20a7fcf6a0 Add profiler wait event for GPU wait on D3D12 2025-12-10 13:01:24 +01:00
Wojtek Figat
43665aa7eb Rename GPUContext::ClearState to ResetState for constentency 2025-12-10 13:00:59 +01:00
Wojtek Figat
3b9b49950c Fixes for Xbox One 2025-12-10 09:48:47 +01:00
Wojtek Figat
0a8752ec0a Fix cross-building building engine with separate executable and library for Unix platforms on Windows 2025-12-10 09:48:27 +01:00
Wojtek Figat
47685dc2be Merge branch 'VitaminCpp-missing_move_semantics_fix' 2025-12-09 10:00:55 +01:00
Wojtek Figat
517ee5bb25 Merge branch 'missing_move_semantics_fix' of https://github.com/VitaminCpp/FlaxEngine into VitaminCpp-missing_move_semantics_fix 2025-12-09 10:00:51 +01:00
Wojtek Figat
3ab01d3576 Merge branch 'VitaminCpp-minor_mem_layout_opt' 2025-12-09 10:00:20 +01:00
Wojtek Figat
31b6d4d658 Merge branch 'minor_mem_layout_opt' of https://github.com/VitaminCpp/FlaxEngine into VitaminCpp-minor_mem_layout_opt 2025-12-09 10:00:16 +01:00
Wojtek Figat
08f840d642 Merge branch 'Tryibion-fix-exception-reload' 2025-12-09 09:59:56 +01:00
Wojtek Figat
776b6259cd Merge branch 'fix-exception-reload' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-exception-reload 2025-12-09 09:59:34 +01:00
Wojtek Figat
5c81c71116 Move constant buffer init for instanced draws only, others do it in all paths 2025-12-09 09:51:53 +01:00
Wojtek Figat
188b635ea0 Merge remote-tracking branch 'origin/master' 2025-12-09 09:48:05 +01:00
Wojtek Figat
56066a3212 Porting to a famous blue platform 2025-12-08 14:41:55 -08:00
Phantom
ed50ce9c90 Change Dropdown's EditorOrder from 2023 to 2024 2025-12-07 18:48:16 +01:00
Phantom
a7e77f6e21 Update CreatePopupItem method
-Modify the `TextColour` property to use a dynamic value based on `TextColour` multiplied by `0.9f` instead of a fixed value (`Colour.White * 0.9f`).
-Modify the `TextColourHighlighted` property to use the dynamic value of `TextColourHighlighted` instead of a fixed value (`Colour.White`).
2025-12-07 18:23:38 +01:00
Phantom
56278b17ee Add Text Color Highlighted on Dropdown 2025-12-07 16:53:43 +01:00
Wojtek Figat
bd78db72b9 Add Mono AOT dynamic module preloading to speed up startup time 2025-12-05 03:46:28 -08:00
Wojtek Figat
32bd72fecd Minor fix to the game cooker assets summary log of a single asset 2025-12-04 23:51:07 +01:00
Wojtek Figat
3a798a70fa Fix collections capacity growing to use the closest power of two
Capacity was incorrectly 2x larger than needed.
Added unit test to ensure it stays correct.
2025-12-04 23:29:15 +01:00
Wojtek Figat
02429266b1 Fix Array::RemoveAtKeepOrder to avoid memory override with large mem copy 2025-12-03 05:03:21 -08:00
Wojtek Figat
77aea0c69c Fix fatal error reporting from multiple therads to sync and properly log (eg. out of memory) 2025-12-01 08:18:54 -08:00
Inertia
6a3ce862cb - Add X11 Class hints for easy hooking by WMs for window-specific rules (required to fix some bugs in WMs like Hyprland) 2025-12-01 11:19:35 +11:00
Wojtek Figat
93217da619 Add option to merge vertex layout with reference order maintained 2025-11-29 15:04:11 -08:00
VitaminCpp
63def54dad Merge branch 'FlaxEngine:master' into hash_set_crash_fix 2025-11-28 15:55:15 +01:00
Michael Herzog
00f9a28729 Fixed HashSet compaction count after mid-compact growth
Ensure HashSetBase::Compact() preserves _elementsCount even when EnsureCapacity() triggers during compaction. The growth path resets the counter; we now cache the original count and restore it after moving all buckets so Count() stays correct in heavy-collision scenarios.
2025-11-28 15:51:57 +01:00
092beb6ae9 Fix compilation error 2025-11-28 11:59:56 +02:00
eb69186271 Merge remote-tracking branch 'origin/master' into sdl_platform 2025-11-28 11:58:44 +02:00
Michael Herzog
56beca0db4 Fixed network replicated-object deduplication by hashing/equality on ObjectId
Aligned NetworkReplicatedObject equality with its hash (compare ObjectId, not pointer).
2025-11-27 23:28:17 +01:00
Alex Ray
64cd898a65 Bypassing Call Logic in Editor Preview 2025-11-27 18:09:11 +01:00
VitaminCpp
90472a4b31 Merge branch 'FlaxEngine:master' into late_join_fix 2025-11-27 10:33:53 +01:00
Wojtek Figat
a1999183f2 Fix compilation regression 2025-11-27 09:13:14 +01:00
Wojtek Figat
1e3ce48024 Fix compilation regression 2025-11-26 23:43:20 -08:00
Michael Herzog
0007185b5f Fixed late-join network replication
- Adjusted replication to resend unchanged state only to missing clients.
- Skip server serialization when no recipients, and downgrade unknown-despawn noise.
2025-11-26 17:54:49 +01:00
Wojtek Figat
403d2cedc0 Updates to engine for porting to blue platform 2025-11-26 06:28:54 -08:00
Wojtek Figat
c8839b8587 Add support for Cooperative Suspend when running on Mono
Informs mono runtime that Job System, Thread Pool or Content Load threads can wait when they are going idle between tasks.
2025-11-26 00:22:48 -08:00
Wojtek Figat
cf048c9804 Fix path filter query warning 2025-11-26 00:07:00 -08:00
Wojtek Figat
bea75f51bd Fix AOT libs cooking to avoid file dirtying for more accurate iterative cooking 2025-11-26 00:02:40 -08:00
Chandler Cox
1bf6612002 Fix exception thrown when reloading open windows. 2025-11-25 17:26:57 -06:00
Michael Herzog
d9a18b1d31 Fixed HashSet compact rehash under heavy collisions
- Compact now iterates over the old bucket array using the saved oldSize, and frees with that size, avoiding out-of-bounds when _size changes.
- If reinsertion finds no free slot during compaction (pathological collisions), the table grows once and retries, preventing AVs.
- This fix addresses problems with weak hash keys (like #3824).
2025-11-25 21:23:49 +01:00
Michael Herzog
465f30661f Minor memory layout optimization 2025-11-25 17:36:49 +01:00
Michael Herzog
a62ca5452e Fixed missing move semantics in script object reference 2025-11-25 17:33:11 +01:00
Wojtek Figat
92254eefcc SImplify some code and update code for platforms 2025-11-25 00:20:14 -08:00
Chandler Cox
2d56411e5f Add slot stop methods without anim param. 2025-11-23 14:19:37 -06:00
Chandler Cox
f8dc8ab903 Fix not being able to replay same animation in animation slot. 2025-11-23 14:19:11 -06:00
Wojtek Figat
2a55cda583 Add fallback location of engine managed library on AOT platforms 2025-11-20 14:58:30 -08:00
Wojtek Figat
7c91c03adf Merge remote-tracking branch 'origin/master' 2025-11-20 06:26:09 -08:00
Wojtek Figat
caa902ea9b Fix shader compilation without HLSL 2021 on Vulkan 2025-11-20 13:47:23 +01:00
Wojtek Figat
fb07071e24 Restore Global Surface Atlas and DDGI on Apple platforms
#3797
2025-11-20 13:47:18 +01:00
Wojtek Figat
a1cb7dcbe7 Fix GPU BVH shader compilation for macOS/iOS 2025-11-20 13:47:11 +01:00
Wojtek Figat
032f698c7b Fix shader warning 2025-11-19 23:29:28 -08:00
0ac3ab2329 Merge remote-tracking branch 'origin/master' into sdl_platform 2025-11-19 18:30:08 +02:00
Wojtek Figat
e2aaef9b88 Fix shader warning 2025-11-19 08:27:33 -08:00
Wojtek Figat
ee0303bcfb Merge branch 'Tryibion-fix-spline-draw' 2025-11-18 21:30:53 +01:00
Wojtek Figat
1523c7b4ce Merge branch 'fix-spline-draw' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-spline-draw 2025-11-18 21:30:50 +01:00
Wojtek Figat
a16a8eaded Merge branch 'Tryibion-fix-anim-event-edge' 2025-11-18 21:30:05 +01:00
Wojtek Figat
9ff9d48ffd Merge branch 'fix-anim-event-edge' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-anim-event-edge 2025-11-18 21:30:01 +01:00
Wojtek Figat
dfb1fb91a5 Fix ability to override material instance hidden parameters
#3802
2025-11-18 21:29:51 +01:00
Wojtek Figat
8f56ab9534 Fix crash when creating empty material instance 2025-11-18 18:45:43 +01:00
Wojtek Figat
c0dda45c7b Fix crash on exit when C# code was bound to asset unloading event called after C# shutdown 2025-11-18 18:00:02 +01:00
Wojtek Figat
3efb981f00 Fix rare issues on input bugs in Visject 2025-11-18 16:51:43 +01:00
Wojtek Figat
ed408917c6 Fix Visject Surface node dependent connection types init on load
#3802
2025-11-18 16:41:24 +01:00
Wojtek Figat
2ca435a414 Fix shader graph assets loading to wait for async task
#3802
2025-11-18 16:11:31 +01:00
Wojtek Figat
de9e282bad Fix config version in GDK manifest 2025-11-18 05:42:21 -08:00
Wojtek Figat
c437daf9be Fix new compiler DXC changes 2025-11-18 05:42:02 -08:00
Wojtek Figat
1e4f96486f Fix audio playback bug from video on Xbox 2025-11-18 03:55:52 -08:00
Wojtek Figat
e03d0f3322 Fix shader compilation with HLSL 2021 2025-11-18 12:09:20 +01:00
Wojtek Figat
5f0e1253cc Refactor DX12 Root Signature creation to support offline construction
Fix running D3D12 on integrated AMD GPU
2025-11-18 12:08:54 +01:00
Wojtek Figat
7e6b040258 Update DXC shader compiler to 1.8 version (for D3D12) 2025-11-18 12:08:11 +01:00
Wojtek Figat
329ebb6482 Add custom shader compiler for Xbox Scarlett 2025-11-18 12:07:39 +01:00
Wojtek Figat
7a9c58003d Fix video playback on Xbox 2025-11-17 04:41:57 -08:00
Wojtek Figat
371a16e37b Fixes for Xbox with Mono AOT 2025-11-16 14:50:22 -08:00
Chandler Cox
95629e792d Fix additional edge cases 2025-11-15 22:12:35 -06:00
Chandler Cox
e79af2fd60 Handle additional edge cases for anim event. 2025-11-15 21:39:21 -06:00
Wojtek Figat
4aba0153f8 Prioritize Dotnet libs on Mono AOT 2025-11-15 14:57:12 -08:00
Wojtek Figat
f91c33e17c Another fix for shader compilation on Vulkan 2025-11-15 23:42:03 +01:00
Chandler Cox
6c29877b20 Fix spline bezier drawing. 2025-11-15 15:58:50 -06:00
Wojtek Figat
3abde6ecfc Merge branch 'VitaminCpp-fix_bvh_generation_crash' 2025-11-15 22:33:24 +01:00
Wojtek Figat
b42168eee5 Merge branch 'fix_bvh_generation_crash' of https://github.com/VitaminCpp/FlaxEngine into VitaminCpp-fix_bvh_generation_crash 2025-11-15 22:31:49 +01:00
Wojtek Figat
ac3b2c0ef2 Fix shader warning 2025-11-15 22:13:22 +01:00
Michael Herzog
f640452b7b Fix BVH node splitting using stale pointer to invalidated array memory
Ensure BuildBVH refreshes its node pointer after growing _bvh so reallocations no longer leave it operating on freed memory, eliminating the sporadic SDF-generation crash.
2025-11-15 21:57:14 +01:00
Wojtek Figat
2f670495ac Migrate Xbox to using static linking with nethost lib 2025-11-14 14:56:10 +01:00
Wojtek Figat
2a36edf528 Add option to link OpenMP on GDK platforms if needed 2025-11-14 02:11:13 -08:00
Wojtek Figat
5e690abd76 Fix initial state of DummyVertexBuffer on DX12 2025-11-14 01:06:01 -08:00
Wojtek Figat
4008e19ca9 Fix various build issuesin uncommon configurations 2025-11-14 00:52:14 -08:00
Wojtek Figat
e9070b30a0 Minor tweaks 2025-11-13 23:05:13 +01:00
Wojtek Figat
636a1ff930 Fix material shader generation when material layer fails to load 2025-11-13 23:04:24 +01:00
Wojtek Figat
3888c4ba21 Fix async tasks destruction to wait on the dependencies in chain 2025-11-13 22:53:52 +01:00
Wojtek Figat
69173803bf Fix shader warning on Vulkan 2025-11-13 22:09:11 +01:00
Wojtek Figat
13e31650be Merge branch 'GoaLitiuM-dotnet_windows_detect_fix' 2025-11-13 22:05:47 +01:00
Wojtek Figat
3563287f17 Merge branch 'dotnet_windows_detect_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-dotnet_windows_detect_fix 2025-11-13 22:05:38 +01:00
Wojtek Figat
91ee9f5e05 Refactor Mesh SDF generation on GPU to use raytracing for more precise results 2025-11-13 22:05:23 +01:00
49918a1067 Fix Windows dotnet root path detection 2025-11-11 22:14:41 +02:00
466f9a4797 Merge remote-tracking branch 'origin/master' into sdl_platform 2025-11-11 21:40:06 +02:00
Wojtek Figat
c7997e0c2f Fix potential error on missing reference object 2025-11-10 21:50:11 +01:00
Wojtek Figat
4805dfbdba Fix issues with model data storage when doing long actions in async (eg. SDF generation) 2025-11-10 15:02:33 +01:00
Wojtek Figat
62424215c1 Fix crash due to missing asset reference inside MeshAccelerationStructure 2025-11-09 23:25:16 +01:00
Wojtek Figat
97ae13759e Merge remote-tracking branch 'origin/master' 2025-11-09 23:22:37 +01:00
Wojtek Figat
108678d94f Fix crash when texture streaming mip task gets deleted after texture object on GC 2025-11-09 22:16:44 +01:00
Wojtek Figat
66dbba5c16 Fix crash if base material gets GCed before it's referenced by instance during loading 2025-11-09 22:16:14 +01:00
Wojtek Figat
d84cef0c18 Fix crash due to async content data streaming
Properly checks for asset data unloading before taking lock on asset chunks.
#3358 #3085 #3515
2025-11-09 22:15:41 +01:00
Wojtek Figat
077cefc60e Merge branch 'xxSeys1-ContentNavigationScrollbarColors' 2025-11-07 21:43:37 +01:00
Wojtek Figat
35acc668c9 Merge branch 'ContentNavigationScrollbarColors' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-ContentNavigationScrollbarColors 2025-11-07 21:42:10 +01:00
Wojtek Figat
ebbe0f12ed Merge branch 'xxSeys1-AttributeEditorPolish' 2025-11-07 21:38:51 +01:00
Wojtek Figat
6a8b76278a Merge branch 'AttributeEditorPolish' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-AttributeEditorPolish 2025-11-07 21:37:46 +01:00
Wojtek Figat
8ac99ef28f Merge branch 'Tryibion-fix-type-editor-in-collection' 2025-11-07 21:33:25 +01:00
Wojtek Figat
547cf7f600 Merge branch 'fix-type-editor-in-collection' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-type-editor-in-collection 2025-11-07 21:33:22 +01:00
Wojtek Figat
b8b8b118c9 Merge branch 'xxSeys1-BakeButtonGroups' 2025-11-07 21:32:35 +01:00
Wojtek Figat
76247323eb Merge branch 'BakeButtonGroups' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-BakeButtonGroups 2025-11-07 21:32:32 +01:00
Wojtek Figat
0ff20c7c85 Merge branch 'Yahasana-patch-1' 2025-11-07 21:31:30 +01:00
Wojtek Figat
dd690e7495 Merge branch 'patch-1' of https://github.com/Yahasana/FlaxEngine into Yahasana-patch-1 2025-11-07 21:31:26 +01:00
Wojtek Figat
ca500548a3 Bump up build number 2025-11-07 21:31:13 +01:00
Wojtek Figat
c0b73375b1 Fix invoking asset load event if it's referenced directly
#3782
2025-11-07 21:31:04 +01:00
Wojtek Figat
9c6d6a0b07 Merge branch 'xxSeys1-CommentAroundAsset' 2025-11-07 15:52:16 +01:00
Wojtek Figat
179f6014bf Merge branch 'CommentAroundAsset' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-CommentAroundAsset 2025-11-07 15:48:34 +01:00
Wojtek Figat
b580c6ec8e Merge branch 'GoaLitiuM-woa_fixes' 2025-11-07 15:25:33 +01:00
Wojtek Figat
dd60cf0040 Merge branch 'woa_fixes' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-woa_fixes 2025-11-07 15:25:29 +01:00
Wojtek Figat
cc851b29fc Fix animation state transition inputs when using other surface context 2025-11-07 15:17:20 +01:00
Wojtek Figat
59643b2fb9 Add improved local-light shadow raytracing by starting ray from light, not surface 2025-11-06 21:01:02 +01:00
Wojtek Figat
3a5bb81d39 Add a new splash screen quote 2025-11-06 21:00:29 +01:00
Wojtek Figat
5ec860015d Add minor adjustments 2025-11-06 21:00:16 +01:00
Wojtek Figat
0f701ec08e Add force Mesh SDF rebuild when holiding F key and using Build All Meshes SDF optino in Editor menu 2025-11-04 13:30:18 +01:00
Wojtek Figat
387c3ea2f4 Add better debug view for Global SDF to include surface hit normal 2025-11-04 13:27:47 +01:00
Wojtek Figat
85b134b7be Add improved Global SDF quality and precision of rasterization 2025-11-04 13:27:21 +01:00
Wojtek Figat
5d17d2509d Fix Global SDF gradient at borders 2025-11-04 12:42:08 +01:00
Wojtek Figat
036d4b2f4b Fix error when asset refs picker uses different types 2025-11-03 23:21:09 +01:00
Saas
93f12b73d8 less code is more better 2025-10-31 23:16:37 +01:00
Saas
1091bc6e2c only show comment edit buttons when surface can be edited 2025-10-31 20:47:23 +01:00
Saas
594c0fb8e7 add comment around asset from which asset reference graph originates 2025-10-31 19:23:42 +01:00
3fc1895b56 Fix compiler error and wrong CPU architecture warnings on WoA 2025-10-31 02:12:14 +02:00
Wojtek Figat
a70d7cf1f9 Update build number 2025-10-30 23:37:20 +01:00
Wojtek Figat
1f592ba1a1 Fix game viewport scaling when using custom aspect or resolution to simulate actual logic
#3699
2025-10-30 23:36:51 +01:00
Wojtek Figat
a43daf025d Merge branch 'xxSeys1-NoEmptyScriptsEditorExpand' 2025-10-30 22:41:31 +01:00
Wojtek Figat
296a2afa95 Merge branch 'NoEmptyScriptsEditorExpand' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-NoEmptyScriptsEditorExpand 2025-10-30 22:41:28 +01:00
Wojtek Figat
a7e879a3a4 Merge branch 'xxSeys1-Flax11ByDefault' 2025-10-30 22:40:46 +01:00
Wojtek Figat
27b160b464 Merge branch 'Flax11ByDefault' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-Flax11ByDefault 2025-10-30 22:40:41 +01:00
Wojtek Figat
7c3c4f1a63 Add Network RPC messages splitting for large arguments payloads
#3776
2025-10-30 22:40:23 +01:00
c61ecc0545 Merge branch 'master' into sdl_platform 2025-10-30 22:42:29 +02:00
Saas
fbae93b532 update default engine version in issue bug template to 1.11 2025-10-30 20:28:37 +01:00
Saas
35d6e5fd21 fix still being able to open/ close script editor with no fields
Introduces "CanOpenClose" to DropPanel.
If false, will ignore the user clicking on the header (or the arrow) to open or collapse the panel
2025-10-30 20:02:15 +01:00
Wojtek Figat
114828adcb Refactor NetworkReplicator update into separate function for cleaner code 2025-10-30 17:12:49 +01:00
Wojtek Figat
053e52c91f Fix compilation for bindings only without scripting internal host defined 2025-10-29 22:18:01 +01:00
Wojtek Figat
d24bd7dfd0 Merge branch 'GoaLitiuM-dotnet_define_fix' 2025-10-29 07:40:11 +01:00
2c8c9b1637 Fix .NET version preprocessor definitions 2025-10-29 08:26:39 +02:00
Wojtek Figat
05a8c841da Fix color grading lut to be refreshed when shader gets reloaded 2025-10-28 23:19:51 +01:00
Wojtek Figat
c4fcaa999c Fix asset thumbnails to be stable with FXAA instead of TAA 2025-10-28 22:23:15 +01:00
Wojtek Figat
70c9dd6608 Fix eye adaptation in Manual mode 2025-10-28 21:36:28 +01:00
Wojtek Figat
802e2ac7c2 Fix compiling stb texture tool on Windows 2025-10-28 21:25:30 +01:00
Wojtek Figat
0ca60062d9 Fix crash on leftover physic contact collision processing 2025-10-28 16:17:48 +01:00
Mofasa
5a587a8582 Update HintPaths for project references
Fixed error CS0234: The type or namespace name 'C
odeAnalysis' does not exist in the namespace 'Microsoft'
2025-10-28 15:09:15 +08:00
Wojtek Figat
22515c37b5 Fix crash regression in D3D12 UAV bindings code 2025-10-27 22:38:47 +01:00
Wojtek Figat
38a48cf1d4 Update build number 2025-10-27 16:48:52 +01:00
Wojtek Figat
cd66d00219 Add checking hardware instruction set on Windows earlier on
#3732
2025-10-27 16:48:24 +01:00
Wojtek Figat
c944bd9bed Fix missing Vulkan feature activation for host query reset 2025-10-27 00:32:29 +01:00
Wojtek Figat
a0689f3f00 Update all Linux deps with Clang 14 on Ubuntu 24 2025-10-27 00:01:36 +01:00
Wojtek Figat
2ee2c97f1e Update docs for Ubuntu 24 and Clang 4 2025-10-26 21:48:49 +01:00
Wojtek Figat
fd19e83a46 Merge branch 'Tryibion-fix-no-undo-for-drag-spawn' 2025-10-25 22:52:47 +02:00
Wojtek Figat
755702b65a Improve #3747 to check for loaded levels in drag drop validation 2025-10-25 22:52:41 +02:00
Wojtek Figat
72e200a7fc Merge branch 'fix-no-undo-for-drag-spawn' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-no-undo-for-drag-spawn 2025-10-25 22:50:01 +02:00
Wojtek Figat
6353e5f4f2 Merge branch 'Tryibion-fix-arrow-up-tree-select' 2025-10-25 22:47:21 +02:00
Wojtek Figat
b184022d15 Merge branch 'fix-arrow-up-tree-select' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-arrow-up-tree-select 2025-10-25 22:46:55 +02:00
Wojtek Figat
26dce69404 Merge branch 'GoaLitiuM-dotnet10_sdkver' 2025-10-25 22:45:34 +02:00
2841ac22df Bump the maximum supported .NET SDK version to 10 2025-10-25 22:35:48 +03:00
Wojtek Figat
516f22c3c0 Merge branch 'GoaLitiuM-dotnet_error_messages' 2025-10-25 21:14:23 +02:00
Wojtek Figat
5a8c4cd0a5 Merge branch 'dotnet_error_messages' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-dotnet_error_messages 2025-10-25 21:14:19 +02:00
Wojtek Figat
f53b7e3323 Merge branch 'Tryibion-fix-default-scale-option' 2025-10-25 21:10:34 +02:00
Chandler Cox
c1439c646e Fix default for prefab canvas size index being 0 instead of -1. 2025-10-25 11:34:48 -05:00
280035e54f Use stderr for Flax.Build error messages
This turns the error messages from Flax.Build to red in Flax Editor
console output.
2025-10-24 23:27:18 +03:00
0d140c4f39 Fix Windows dotnet version lookup without installed SDK
Having only x86 dotnet SDK installed while expecting x64 version fails
prematurely.
2025-10-24 23:27:17 +03:00
32b4efc175 Add missing .NET installation architecture info to error messages 2025-10-24 23:27:17 +03:00
22ba7f2ee5 Merge remote-tracking branch 'origin/master' into sdl_platform 2025-10-24 18:31:50 +03:00
Wojtek Figat
d1774cac28 Go back to SSE4.2 on Windows as minimum requirement instead of AVX2 for better user coverage by default
#3732
2025-10-22 16:14:05 +02:00
Wojtek Figat
2629511224 Merge branch 'Tryibion-fix-duplicate-collection-option' 2025-10-20 22:04:12 +02:00
Wojtek Figat
bcf7226946 Merge branch 'fix-duplicate-collection-option' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-duplicate-collection-option 2025-10-20 22:04:05 +02:00
Wojtek Figat
f5c9e00beb Merge branch 'GoaLitiuM-woa_alignment' 2025-10-20 22:03:39 +02:00
Wojtek Figat
6353514188 Merge branch 'woa_alignment' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-woa_alignment 2025-10-20 22:03:32 +02:00
Wojtek Figat
8467315a1e Fix motion vector stability on Large World origin changes
#3745
2025-10-20 18:08:54 +02:00
Chandler Cox
be5dbbb95f Fix duplicate option for collections being grayed out if nothing is in clipboard. 2025-10-19 15:55:57 -05:00
6b9c727a6a Fix compiler warning 2025-10-19 22:16:34 +03:00
91c0ba1986 Enforce pointer alignment for InlinedAllocation
AssetReferences stored in inlined allocation needs to be aligned to
pointer sized boundary due to atomic operations having strict
requirements for such. Unaligned access seems to only crash on
Windows on ARM systems when trying to allocate TextRender draw chunks.
2025-10-19 22:14:28 +03:00
Chandler Cox
e4bb8001b2 Fix not having undo for items dragged into scene tree into empty space. 2025-10-18 18:23:33 -05:00
f52f3920cb Update SDL to 3.2.24 2025-10-18 02:19:56 +03:00
f99a244b8e Merge remote-tracking branch 'origin/master' into sdl_platform
# Conflicts:
#	Source/Editor/Windows/GameWindow.cs
2025-10-18 02:19:30 +03:00
Saas
a9fc5f720d break up EnvironmentProbe properties into groups 2025-10-16 20:35:53 +02:00
Saas
d323b1c7e2 move skylight and environment probe bake buttons into dedicated groups 2025-10-16 20:28:34 +02:00
Wojtek Figat
d93c32db9c Merge remote-tracking branch 'origin/1.11'
# Conflicts:
#	Source/Tools/Flax.Build/Deps/Downloader.cs
2025-10-16 14:07:49 +02:00
Wojtek Figat
08abdc159e Another ios build change to use dotnet 9 instead 2025-10-16 13:38:26 +02:00
Wojtek Figat
708b9c6767 Attempt to fix missing ios workload for .NET 8 2025-10-16 12:12:37 +02:00
Wojtek Figat
ed26a4c182 Fix moving character controller when displacement is zero 2025-10-16 11:34:43 +02:00
Wojtek Figat
a239984908 Add console logging for VSCode on Mac and Linux inside game projects 2025-10-16 10:47:41 +02:00
Wojtek Figat
fc3ea44c69 Update OpenAL on Mac/iOS 2025-10-16 10:40:08 +02:00
Wojtek Figat
fdecad0d29 Fix Vulkan crash on missing handle owner during binding 2025-10-16 10:39:50 +02:00
Wojtek Figat
c7437ed533 Fix OpenAL Soft building due to missing certs on a website 2025-10-16 10:39:36 +02:00
Wojtek Figat
dab44f5ceb Minor fixes 2025-10-16 10:20:51 +02:00
Wojtek Figat
c635d93b3c Fix more errors in Visject context menu regressions 2025-10-15 14:44:58 +02:00
Chandler Cox
7377bad721 Fix check method for type editor not working in a collection. 2025-10-14 21:20:22 -05:00
Wojtek Figat
09fa3ce4be Minor changes 2025-10-14 15:07:40 +02:00
Chandler Cox
bd0daf7580 Fix tree arrowing up not selecting children in tree. 2025-10-13 21:49:05 -05:00
668a4dbb4d Merge remote-tracking branch 'origin/master' into sdl_platform 2025-10-14 01:09:26 +03:00
Wojtek Figat
e1b3429b4c Fix regression on game window defocus 2025-10-13 21:50:19 +02:00
Wojtek Figat
efa963be68 Fix editor error when prefab asset is unloaded 2025-10-13 21:45:31 +02:00
Wojtek Figat
e19be4c0c6 Merge branch 'xxSeys1-ColorValueBoxDisplayAlpha' 2025-10-13 20:53:22 +02:00
Wojtek Figat
2d5fdfef2f Merge branch 'ColorValueBoxDisplayAlpha' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-ColorValueBoxDisplayAlpha 2025-10-13 20:51:13 +02:00
Wojtek Figat
46ee6bc193 Merge branch 'xxSeys1-NicerOldNewEditorWarnings' 2025-10-13 20:50:17 +02:00
Wojtek Figat
a2ee2ec6ac Merge branch 'NicerOldNewEditorWarnings' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-NicerOldNewEditorWarnings 2025-10-13 20:50:13 +02:00
Wojtek Figat
2caaef02ad Merge branch 'Tryibion-fix-coll-data-delete-crash' 2025-10-13 20:49:37 +02:00
Saas
df28b0d977 fix Content Panel navigation bar scroll bar colors
Same concept as in #2581
2025-10-13 11:31:53 +02:00
Chandler Cox
b62f331b08 Fix crash when deleting collision data. 2025-10-12 17:04:40 -05:00
Wojtek Figat
f7b306532b Merge branch 'GoaLitiuM-openal_pipewire_fixes' 2025-10-12 23:25:24 +02:00
Wojtek Figat
212abe7d90 Update OpenAL for Windows and Android
#3338
2025-10-12 23:25:17 +02:00
Wojtek Figat
7dfc37f652 Adjustments for #3338 2025-10-12 23:24:34 +02:00
Wojtek Figat
12decc3320 Merge branch 'openal_pipewire_fixes' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-openal_pipewire_fixes
# Conflicts:
#	Source/Tools/Flax.Build/Deps/Dependencies/OpenAL.cs
2025-10-12 22:39:34 +02:00
Wojtek Figat
d7a528cdbc Update assets 2025-10-12 22:38:11 +02:00
Wojtek Figat
18364d2a8b Merge remote-tracking branch 'origin/1.11' 2025-10-12 21:50:19 +02:00
Saas
5a9eedfadb make old/ new editor dialog boxes nicer to read 2025-10-12 20:14:43 +02:00
Saas
be7871c292 use Render2D based solution rather than shader for alpha grid
https://github.com/FlaxEngine/FlaxEngine/pull/3281#issuecomment-3218049398
2025-10-12 16:50:31 +02:00
Saas
59fb83a469 correctly center buttons 2025-10-12 16:23:54 +02:00
Saas
7544500be1 polish attribute editor
- Add hint about what to do when there are no attributes
- Swap "Ok" "Cancel" buttons order to match other dialog boxes
- Move buttons to the bottom
- Increase size of menu
- Add some missing "." to add/ remove button tooltips in array editor
2025-10-12 16:07:20 +02:00
Wojtek Figat
abdeaa9354 Update build number 2025-10-11 00:17:41 +02:00
Wojtek Figat
d3389604b0 Update engine materials 2025-10-11 00:17:02 +02:00
Wojtek Figat
d426c5b0d9 Merge remote-tracking branch 'origin/master' into 1.11
# Conflicts:
#	Source/Engine/Physics/Colliders/Collider.h
2025-10-11 00:16:10 +02:00
Wojtek Figat
8da0d2c4ce Merge branch 'xxSeys1-IndustryStandardSettingsShortcut' 2025-10-10 08:31:40 +02:00
Wojtek Figat
20f576783b Merge branch 'IndustryStandardSettingsShortcut' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-IndustryStandardSettingsShortcut 2025-10-10 08:31:32 +02:00
Wojtek Figat
2bf62cc54f Add GPUDevice.VideoOutputs with a list of attached monitors 2025-10-09 15:13:04 +02:00
Wojtek Figat
ef2c551cee Fix build 2025-10-08 23:24:15 +02:00
Wojtek Figat
65cf59642c Fix changing Rigid Body center of mass offset
#2325 #3247
2025-10-08 22:16:46 +02:00
Wojtek Figat
e2fc8a6283 Add drawing RigidBody center of mass and attached colliders
#2325 #3247
2025-10-08 22:16:16 +02:00
Wojtek Figat
73976f3ed9 Fix box collider to properly draw small bounds 2025-10-08 22:08:34 +02:00
Wojtek Figat
7ab6bafe39 Fix crash when saving empty json string 2025-10-08 22:02:05 +02:00
Wojtek Figat
deb2ad7c8f Fix font hit test on multi-line text past the line end character
#3503
2025-10-08 16:36:34 +02:00
Wojtek Figat
cd7fc3242e Merge branch 'ZaPx64-ZaPx64-texture-asset-save-fix' 2025-10-08 09:14:59 +02:00
Wojtek Figat
31a0a77e7c Merge branch 'ZaPx64-texture-asset-save-fix' of https://github.com/ZaPx64/FlaxEngine into ZaPx64-ZaPx64-texture-asset-save-fix 2025-10-08 09:14:54 +02:00
Wojtek Figat
f0ec4a901a Merge branch 'xxSeys1-StraightenConnectionFix' 2025-10-08 09:13:45 +02:00
Wojtek Figat
8cb67f017a Fix PlayStation build regression 2025-10-07 18:23:53 +02:00
Wojtek Figat
7b643e9685 Fix volumetric fog particles drawing regression 2025-10-07 18:23:39 +02:00
Wojtek Figat
39803ce6b2 Add **render layer mask to decals**
#967 #3080
2025-10-07 18:23:03 +02:00
Wojtek Figat
2f1f380062 Add new scene textures SceneStencil and ObjectLayer to sample Stencil buffer 2025-10-07 18:10:14 +02:00
Wojtek Figat
f8dbf363b6 Fix crash on Android when loading mesh with SDF data 2025-10-07 18:09:18 +02:00
Wojtek Figat
fc1451254d Fix missing terrain debug shapes drawing when only in a view 2025-10-07 18:08:51 +02:00
Wojtek Figat
d3c54e590a Fix quad overdraw debug drawing regression 2025-10-07 18:08:32 +02:00
Wojtek Figat
361fc3ecfb Add stencil buffer usage with object layer information
#3080 #967
2025-10-07 18:07:23 +02:00
ZaPx64
3682159da6 Fix Save() failing on virtual texture asset 2025-10-05 09:20:54 +02:00
Saas
e9f83f77bb fix "Straighten Connections" to actually straighten all connections 2025-10-04 14:03:02 +02:00
Wojtek Figat
823ed247d2 Merge remote-tracking branch 'origin/master' into 1.11
# Conflicts:
#	Source/Engine/Level/Actors/Sky.cpp
2025-10-03 22:37:32 +02:00
Wojtek Figat
8f3b80492e Fix terrain physics error on end play when it's disabled
#3590 #3603
2025-10-03 22:30:44 +02:00
Wojtek Figat
c61c013517 Merge branch 'xxSeys1-StrokeMyEgo' 2025-10-03 22:22:11 +02:00
Wojtek Figat
a2170ffd8a Merge branch 'StrokeMyEgo' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-StrokeMyEgo 2025-10-03 22:22:07 +02:00
Wojtek Figat
4f1f77fb32 Simplify code of EditorViewport to access editor instance 2025-10-03 22:21:11 +02:00
Wojtek Figat
6ae370f8fc Fix camera cut flag in rendering to not trigger on origin change for smother visuals 2025-10-03 22:20:58 +02:00
Saas
da5c8555e5 add myself to list of Flax authors lol
Mafi said I should do this :)
2025-10-03 21:16:28 +02:00
Saas
c4c7ee941f add industry standard shortcut for editor settings 2025-10-03 14:46:43 +02:00
Wojtek Figat
4f45b3c1d0 Fix missing root motion copy when using input skeleton pose (eg. IK node)
#3445
2025-10-03 11:33:01 +02:00
Wojtek Figat
4c640b915f Fix CheckBox to display check state when created in game without editor icon atlas
#3705
2025-10-03 11:25:25 +02:00
Wojtek Figat
1f3f1ea67e Fix Blend Poses nodes to smoothly blend back when transition goes back
#3595
2025-10-03 10:52:01 +02:00
Wojtek Figat
60c19303f6 Fix duplicating splines with parents
#3531
2025-10-02 23:31:03 +02:00
Wojtek Figat
adcfc50218 Fix stack overflow exception in shader graph recursion to be detected
#3706
2025-10-02 20:49:50 +02:00
Wojtek Figat
9b812ec34a Fix BoundingFrustum::GetPlane in C++ to match C# version (and doc comment) 2025-10-02 18:48:32 +02:00
Wojtek Figat
7e1ac5e167 Fix sky rendering in ortho and oblique projection
#3448
2025-10-02 18:48:14 +02:00
Wojtek Figat
028b5fedec Use right-click only on GPUTextureEditor context menu 2025-09-30 23:37:15 +02:00
Wojtek Figat
9cc2c1da40 Fix terrain exporting to properly calculate size and sample positions
#3534
2025-09-30 22:58:08 +02:00
Wojtek Figat
93219793d5 Merge remote-tracking branch 'origin/master' into 1.11 2025-09-30 18:26:14 +02:00
Wojtek Figat
32f2ef3f06 Fix Android compilation 2025-09-30 18:26:10 +02:00
Wojtek Figat
5ed8564293 Merge branch 'xxSeys1-visjectPanOnNode' 2025-09-30 16:08:37 +02:00
Wojtek Figat
7c87ade12b Merge branch 'visjectPanOnNode' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-visjectPanOnNode 2025-09-30 15:51:17 +02:00
Wojtek Figat
7f87678282 Merge branch 'xxSeys1-IssueTemplateFix' 2025-09-30 15:49:18 +02:00
Wojtek Figat
e429d29d17 Merge branch 'IssueTemplateFix' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-IssueTemplateFix 2025-09-30 15:49:11 +02:00
Wojtek Figat
086a49f45d Fix deadlock when updating Text Render layout during scene rendering 2025-09-30 15:46:06 +02:00
Wojtek Figat
c46e1164d6 Add hot-reload support for material feature template sources on material generation 2025-09-30 15:45:45 +02:00
Wojtek Figat
2a5898c1de Fix regression from #3342 to use existing time as unscaled to match previous content 2025-09-30 15:45:24 +02:00
Wojtek Figat
f09d6aa0eb Fix fog rendering bug on d3d11/d3d10 2025-09-30 15:44:34 +02:00
Wojtek Figat
0848f1fa83 Refactor specular lighting to properly map specular as reflectance in BRDF
Reference: https://google.github.io/filament/Filament.md.html

#1492
2025-09-30 15:43:55 +02:00
Wojtek Figat
537d8b57ca Revert "Merge branch 'NoClearSearchboxesWhenStuffHappens' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-NoClearSearchboxesWhenStuffHappens"
This reverts commit 1186833b2d, reversing
changes made to bb180b0f59.

#3687 #3701
2025-09-26 22:25:49 +02:00
Wojtek Figat
02c5ad3fa4 Fix particles to support any amount of contexts drawings 2025-09-25 18:38:46 +02:00
Wojtek Figat
41e851298d Add new PreIntegratedGF with 80% smaller but more accurate data
Update old generation code, use R16G16_UNorm format instead of R11G11B10, skip mips and reduce Y axis to 32 pixels.

#1492
2025-09-25 17:35:10 +02:00
Saas
4a3fb41035 further fixes and make some stuff a bit nicer 2025-09-25 13:32:21 +02:00
Wojtek Figat
d57eec3403 Bump up materials after merge 2025-09-24 18:26:33 +02:00
Wojtek Figat
87e2c4c4d5 Merge remote-tracking branch 'origin/master' into 1.11
# Conflicts:
#	Content/Editor/DebugMaterials/DDGIDebugProbes.flax
#	Source/Editor/Windows/OutputLogWindow.cs
#	Source/Engine/Level/Actor.cpp
2025-09-24 18:18:27 +02:00
Saas
797cb3c3f2 fix 1.10 becoming 1.1 and some spelling issue in issue template 2025-09-23 20:56:43 +02:00
Wojtek Figat
47670251ef Merge branch 'Tryibion-issue-template' 2025-09-23 17:21:34 +02:00
Wojtek Figat
cf1ef91246 Merge branch 'issue-template' of https://github.com/Tryibion/FlaxEngine into Tryibion-issue-template 2025-09-23 17:21:30 +02:00
Wojtek Figat
7060cb5696 Fix UI Brush editing in prefab regression from a471861e92
#3694
2025-09-23 17:20:18 +02:00
Wojtek Figat
c449833d35 Merge branch 'Tryibion-audio-events' 2025-09-23 17:07:22 +02:00
Wojtek Figat
284aeca51a Merge branch 'audio-events' of https://github.com/Tryibion/FlaxEngine into Tryibion-audio-events 2025-09-23 17:07:18 +02:00
Wojtek Figat
d8f7199c11 Fix importing emissive, roughness, metalness and wireframe properties of materials with Assimp
#3418
2025-09-23 15:42:49 +02:00
Wojtek Figat
dc05bbbbcd Merge branch 'IceReaper-feature/create_project' 2025-09-22 22:45:50 +02:00
Wojtek Figat
3fcc9ed01f Merge branch 'feature/create_project' of https://github.com/IceReaper/FlaxEngine into IceReaper-feature/create_project 2025-09-22 22:32:43 +02:00
Wojtek Figat
70ba750a5e Fix code #3511 2025-09-22 22:31:23 +02:00
Wojtek Figat
50271199ac Merge branch 'xxSeys1-moveVisjectConnection' 2025-09-22 22:30:32 +02:00
Wojtek Figat
d1a99c9396 Merge branch 'moveVisjectConnection' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-moveVisjectConnection
# Conflicts:
#	Source/Editor/Surface/VisjectSurface.cs
2025-09-22 22:30:26 +02:00
Chandler Cox
4ae3d57adc Resolve code suggestions 2025-09-22 11:32:24 -05:00
Wojtek Figat
99b9967806 Merge branch 'xxSeys1-ViewportIconsMoreCustomization' 2025-09-22 18:10:38 +02:00
Wojtek Figat
2f7e84253a Merge branch 'ViewportIconsMoreCustomization' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-ViewportIconsMoreCustomization 2025-09-22 18:10:33 +02:00
Wojtek Figat
2f55cb938f Merge branch 'xxSeys1-commandSuggestionImprovements' 2025-09-22 18:08:30 +02:00
Wojtek Figat
a86661a855 Merge branch 'commandSuggestionImprovements' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-commandSuggestionImprovements 2025-09-22 18:06:55 +02:00
Wojtek Figat
a68ce6633a Merge branch 'Tryibion-vs-code-plugin-organize' 2025-09-22 18:02:52 +02:00
Wojtek Figat
5d57afe3aa Merge branch 'vs-code-plugin-organize' of https://github.com/Tryibion/FlaxEngine into Tryibion-vs-code-plugin-organize 2025-09-22 18:02:00 +02:00
Wojtek Figat
6705138247 Merge branch 'xxSeys1-SmallVehicleImprovements' 2025-09-22 16:18:17 +02:00
Wojtek Figat
276caf771c Merge branch 'SmallVehicleImprovements' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-SmallVehicleImprovements
# Conflicts:
#	Source/Engine/Physics/Actors/WheeledVehicle.h
2025-09-22 16:18:12 +02:00
Wojtek Figat
5eea5a72c9 Fix particle material compilation error when using position offset
#3661
2025-09-22 11:44:11 +02:00
Wojtek Figat
e9a7b1c8eb Fix using enums as Scene Animation Event parameters
#3554
2025-09-22 10:22:32 +02:00
Wojtek Figat
a151c78412 Fix loading projects that have similar path to engine folder
#3565
2025-09-22 08:42:16 +02:00
Wojtek Figat
5f1e905e8f Fix crash when importing model as prefab and handle duplicated object names
#3558
2025-09-21 22:52:57 +02:00
Wojtek Figat
a0f764a774 Add skybox rotation feature
#3592
2025-09-21 21:58:03 +02:00
Wojtek Figat
7da5ce3ed4 Merge branch 'xxSeys1-NoClearSearchboxesWhenStuffHappens' 2025-09-21 21:06:21 +02:00
Wojtek Figat
1186833b2d Merge branch 'NoClearSearchboxesWhenStuffHappens' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-NoClearSearchboxesWhenStuffHappens 2025-09-21 21:06:16 +02:00
Wojtek Figat
bb180b0f59 Merge branch 'Tryibion-fix-physics-attach-rigid' 2025-09-21 21:04:59 +02:00
Wojtek Figat
5d1c79929a Merge branch 'fix-physics-attach-rigid' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-physics-attach-rigid 2025-09-21 21:04:56 +02:00
Wojtek Figat
3f5a4cc4c9 Merge branch 'Tryibion-fix-dup&remove' 2025-09-21 21:02:22 +02:00
Wojtek Figat
62fd8ac967 Merge branch 'fix-dup&remove' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-dup&remove 2025-09-21 21:02:17 +02:00
Wojtek Figat
d904b92f2e Merge branch 'xxSeys1-LessCreateScriptItems' 2025-09-21 21:01:36 +02:00
Wojtek Figat
87e2b76ffa Merge branch 'LessCreateScriptItems' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-LessCreateScriptItems 2025-09-21 21:01:33 +02:00
Wojtek Figat
c5e11aed15 Merge branch 'xxSeys1-WidgetCreateFilterControlTypes' 2025-09-21 21:00:27 +02:00
Wojtek Figat
85d61b334b Merge branch 'WidgetCreateFilterControlTypes' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-WidgetCreateFilterControlTypes 2025-09-21 21:00:11 +02:00
Wojtek Figat
26e94f6f8e Refactor material instance to not override all public parameters by default (need explicit set)
#3444
2025-09-21 20:59:25 +02:00
Wojtek Figat
902744a0ce Fix model import scale on nodes that could be applied multiple times on the same mesh
#3562
2025-09-21 15:08:35 +02:00
Wojtek Figat
1c581bceaf Fix sun shadows when direction is perfectly vertical
#3614
2025-09-20 23:52:04 +02:00
Wojtek Figat
9cc44825c6 Update engine materials 92f4327fc2 2025-09-20 00:14:51 +02:00
Wojtek Figat
92f4327fc2 Fix missing volumetric fog affecting transparent materials
#3436
2025-09-20 00:13:52 +02:00
Wojtek Figat
47711ec5be Fix Volumetric Fog flicker on camera cuts
#3443
2025-09-19 23:10:03 +02:00
Chandler Cox
d1fbc66cb9 Fix not attaching updated collision data to rigid body. 2025-09-19 15:58:22 -05:00
Saas
7183a3306e fix typo 2025-09-19 16:57:50 +02:00
Saas
fd191f7ffb don't clear content panel folder- and scene tree search box on script reload and enter/ exit play 2025-09-18 23:24:10 +02:00
Saas
2604d58687 no more Linq 2025-09-18 17:37:04 +02:00
Chandler Cox
01d1d634c2 Fix other missing duplicate. 2025-09-16 17:43:55 -05:00
Chandler Cox
c7e403661d Dont allow remove and duplicate options for non-resizing collections. 2025-09-16 17:42:24 -05:00
Saas
1196db6d17 check if control is control meant for gui editor use 2025-09-16 22:54:57 +02:00
Saas
553a007508 Revert "hide TrackLabel control in editor"
This reverts commit 364a523375.
2025-09-16 22:14:22 +02:00
Saas
de2ee36529 fix naming lol 2025-09-16 22:07:42 +02:00
Saas
eea44ac897 remove search query highlights showing on create new script item 2025-09-16 22:06:49 +02:00
Saas
c124713e99 remove create new script items when searchbox is cleared 2025-09-16 22:05:28 +02:00
Saas
364a523375 hide TrackLabel control in editor 2025-09-16 22:04:24 +02:00
Wojtek Figat
afdd264e63 Fix compilation of Editor in Release mode 2025-09-16 16:34:58 +02:00
Wojtek Figat
8ec54f7b1c Merge branch 'cNori-Custom-editor-for-GPUTextures' 2025-09-16 00:16:10 +02:00
Wojtek Figat
521518bde4 Add hack to use GPUTextureEditor on ref pickers 2025-09-16 00:15:58 +02:00
Wojtek Figat
56077a268a SImplify and cleanup GPUTexture editor #3452 #3194 2025-09-16 00:15:48 +02:00
Wojtek Figat
a0ca000793 Merge branch 'Custom-editor-for-GPUTextures' of https://github.com/cNori/FlaxEngineFork into cNori-Custom-editor-for-GPUTextures 2025-09-15 18:08:02 +02:00
Wojtek Figat
ae4ae7a638 Fix rich textbox vertical alignment
#3502
2025-09-15 15:17:18 +02:00
Wojtek Figat
e2a4c8ab03 Merge branch 'Tryibion-fix-viewdistance-light' 2025-09-15 14:14:04 +02:00
Chandler Cox
7a40722964 Fix view distance light property from affecting brightness all of the time. 2025-09-14 17:51:27 -05:00
Wojtek Figat
1de8909d05 Merge branch 'Tryibion-prefab-viewport-scaling' 2025-09-14 23:59:45 +02:00
Wojtek Figat
9749487e24 Move prefab and game UI size context menu to shared UI Module
#3571
2025-09-14 23:59:40 +02:00
Wojtek Figat
55968a8ddc Merge branch 'prefab-viewport-scaling' of https://github.com/Tryibion/FlaxEngine into Tryibion-prefab-viewport-scaling 2025-09-14 23:11:59 +02:00
Wojtek Figat
e325b190ea Merge branch 'xxSeys1-disabledGizmoBrightness' 2025-09-14 22:01:18 +02:00
Wojtek Figat
ada6b9140f Minor adjustments for #3411 2025-09-14 22:00:57 +02:00
Wojtek Figat
5582579173 Merge branch 'disabledGizmoBrightness' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-disabledGizmoBrightness 2025-09-14 21:45:57 +02:00
Wojtek Figat
88773e71e5 Fix warning when cloning actor from prefab that is not a root
#3578
2025-09-14 14:25:19 +02:00
Wojtek Figat
9e1f488f22 Fix prefab window to use UI Mode for empty UI Control prefab
#3574
2025-09-13 14:41:11 +02:00
Wojtek Figat
a471861e92 Fix editing UI Brush in prefabs
#3501
2025-09-12 23:15:13 +02:00
Wojtek Figat
3d182c89f3 Add MaterialShader::BindParameters to usable in game scripts
#3668
2025-09-12 18:04:01 +02:00
Wojtek Figat
e3810a9938 Merge branch 'GoaLitiuM-vs2026' 2025-09-12 18:02:07 +02:00
Wojtek Figat
f323fdb592 Add and use Max Mesh Position Error to Build Settings for automatic mesh vertex positions storage 2025-09-12 17:53:14 +02:00
f0dea9d528 Add support for Visual Studio 2026 and v145 MSVC toolset 2025-09-10 20:05:56 +03:00
Wojtek Figat
b537a80031 Fix regression in lights/shadows setup from 1a88fefd76 2025-09-09 23:53:28 +02:00
Wojtek Figat
5e52bf6469 Fix missing code from 80de56f469 2025-09-09 23:21:10 +02:00
Wojtek Figat
8482f93a0f Merge remote-tracking branch 'origin/1.11' into 1.11 2025-09-09 22:58:34 +02:00
Wojtek Figat
64c62f269c Optimize D3D12 with D3D12_HEAP_FLAG_CREATE_NOT_ZEROED in some cases 2025-09-09 22:54:37 +02:00
Wojtek Figat
19d0d3b683 Remove system lockers during asset loads or saving (only unload needs it) 2025-09-09 15:26:27 +02:00
Wojtek Figat
1f56c75821 Minor fixes 2025-09-09 15:26:03 +02:00
Wojtek Figat
64e127a47a Fix crashes of scripting backend on Android 2025-09-09 15:25:24 +02:00
Wojtek Figat
8921cf5156 Add label/button text to string convertion for better debugging 2025-09-09 10:42:10 +02:00
Wojtek Figat
24e088fc08 Fix compilation warnings 2025-09-09 10:23:07 +02:00
Wojtek Figat
14a69a11df Add Android native crashes caching 2025-09-07 23:50:41 +02:00
Chandler Cox
e27880c1e6 Make plugins into their own folders in VSCode. Order VSCode plugin folders with Engine at the bottom. 2025-08-02 09:28:49 -05:00
Chandler Cox
6f15ef7690 Fix location of clip start call. 2025-08-01 15:15:54 -05:00
Chandler Cox
0e3a22faa0 Fix spelling in comment. 2025-08-01 15:11:06 -05:00
Chandler Cox
0dc1e04c89 Add slider to audio debug editor for selecting time. 2025-08-01 15:07:49 -05:00
Chandler Cox
5c7712daad Add audio clip started and finished events to audio source 2025-08-01 15:07:25 -05:00
Chandler Cox
52b64540ab Add extra index guard logic 2025-06-28 10:46:11 -05:00
Chandler Cox
b9cfd054c1 Remove unused variable 2025-06-27 21:38:10 -05:00
Chandler Cox
53d4ea51af Add prefab UI viewport scaling. 2025-06-27 21:18:53 -05:00
xxSeys1
a4d3ede368 fix context menu on reroute node 2025-06-15 02:08:47 +02:00
xxSeys1
92edb996f2 properly handle connecting to a box that already has a connection 2025-06-14 17:20:28 +02:00
xxSeys1
2e0c35e6e4 fix out of range error when searching visject cm 2025-06-14 01:04:35 +02:00
xxSeys1
baba151d8a fix context menu 2025-06-14 00:54:16 +02:00
xxSeys1
b44d4107c0 fixes 2025-06-13 22:25:02 +02:00
xxSeys1
f40c67ddf0 add support to move visject socket connections 2025-06-13 22:05:57 +02:00
xxSeys1
ec154b4998 remove unnecessary returns xml doc comment 2025-06-12 19:31:32 +02:00
xxSeys1
6997cbeb47 add options for viewport icons 2025-06-11 13:08:59 +02:00
xxSeys1
c4130aa20f fix and improve show all commands on " " behavior 2025-06-04 15:23:42 +02:00
xxSeys1
c9fe9213b3 add showing all commands if prompt is whitespace(s) 2025-06-02 23:25:50 +02:00
xxSeys1
608839b6a5 set width of command suggestions based on longest command 2025-06-02 22:33:22 +02:00
Norite SC
f71bdd0962 Create GPUTextureEditor.cs 2025-05-13 01:13:16 +02:00
xxSeys1
47a6da9e40 add editor option for disabled transform gizmo brightness 2025-04-27 15:56:34 +02:00
Chandler Cox
40dae18b76 Add new issue and request templates. 2025-04-24 18:48:29 -05:00
fc96b248cb Ignore invalid VelocityChanged velocity values in audio backend 2025-04-05 20:17:33 +03:00
36c1909111 Build OpenAL with PipeWire backend enabled 2025-04-05 20:17:32 +03:00
643fe639e5 Update OpenAL to 1.24.3 2025-04-05 20:17:32 +03:00
78dffc9ad1 Add override for building CMake project with custom configuration 2025-04-05 20:17:32 +03:00
xxSeys1
1dfd717093 serialize display info and color 2025-04-02 23:38:04 +02:00
xxSeys1
68ef6f08c6 minor style fixes 2025-04-02 19:40:27 +02:00
xxSeys1
a0b80c6096 add getters for more commonly used vehicle fields 2025-04-02 19:29:11 +02:00
xxSeys1
59ac8a3f60 move anti roll bars into Vehicle display group 2025-04-02 19:21:24 +02:00
xxSeys1
dd281bbca8 add wheel information debug draw 2025-04-02 19:12:36 +02:00
xxSeys1
2e48be97b6 add getter for steering 2025-04-02 17:24:13 +02:00
Andre Mohren
0b7550e5ca Implement creation of new projects from within the editor gui. 2025-04-02 15:10:11 +02:00
xxSeys1
051d363358 add alpha grid background 2025-03-14 15:51:36 +01:00
xxSeys1
9b495bbc68 improve how ColorValueBoxes draw transparent colors 2025-03-13 17:18:11 +01:00
xxSeys1
e665cc7500 add safe margin
4 pixels seemed a bit much, smaller adjustments could lead to the menu still showing
2024-09-16 15:43:46 +02:00
xxSeys1
0a516ac98d make it possible to pan editor when rmb down on node 2024-09-14 15:33:07 +02:00
752 changed files with 16152 additions and 6675 deletions

42
.github/ISSUE_TEMPLATE/1-bug.yaml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: Bug Report
description: File a bug report.
title: "[Bug]: "
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! Please attach any minimal reproduction projects!
- type: textarea
id: description-area
attributes:
label: Description
description: Please provide a description of the bug and what you expected to happen.
validations:
required: true
- type: textarea
id: steps-area
attributes:
label: Steps to reproduce
description: Please provide reproduction steps if possible.
validations:
required: true
- type: dropdown
id: version
attributes:
label: Version
description: What version of Flax are you running?
options:
- '1.8'
- '1.9'
- '1.10'
- '1.11'
- master branch
default: 3
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant logs
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell

View File

@@ -0,0 +1,22 @@
name: Feature Request
description: File a feature request.
title: "[Request]: "
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out a feature request!
- type: textarea
id: description-area
attributes:
label: Description
description: Please provide a description of the feature!
validations:
required: true
- type: textarea
id: benefits-area
attributes:
label: Benefits
description: Please provide what benefits this feature would provide to the engine!
validations:
required: true

View File

@@ -19,7 +19,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
dotnet-version: 9.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=8 -arch=ARM64 -platform=iOS -configuration=Release -buildtargets=FlaxGame
./Development/Scripts/Mac/CallBuildTool.sh -build -log -dotnet=9 -arch=ARM64 -platform=iOS -configuration=Release -buildtargets=FlaxGame

BIN
Content/Editor/Camera/M_Camera.flax (Stored with Git LFS)

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.

BIN
Content/Editor/DefaultFontMaterial.flax (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

BIN
Content/Editor/Gizmo/Material.flax (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

BIN
Content/Editor/Gizmo/MaterialWire.flax (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Content/Editor/Highlight Material.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Editor/Icons/IconsMaterial.flax (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

View File

@@ -6,6 +6,7 @@
@3
#include "./Flax/Common.hlsl"
#include "./Flax/Stencil.hlsl"
#include "./Flax/MaterialCommon.hlsl"
#include "./Flax/GBufferCommon.hlsl"
@7
@@ -14,10 +15,13 @@ META_CB_BEGIN(0, Data)
float4x4 WorldMatrix;
float4x4 InvWorld;
float4x4 SvPositionToWorld;
float3 Padding0;
uint RenderLayersMask;
@1META_CB_END
// Use depth buffer for per-pixel decal layering
Texture2D DepthBuffer : register(t0);
Texture2D<uint2> StencilBuffer : register(t1);
// Material shader resources
@2
@@ -200,6 +204,14 @@ void PS_Decal(
#endif
)
{
// Stencil masking
uint stencilObjectLayer = STENCIL_BUFFER_OBJECT_LAYER(STENCIL_BUFFER_LOAD(StencilBuffer, SvPosition.xy));
if ((RenderLayersMask & (1 << stencilObjectLayer)) == 0)
{
clip(-1);
return;
}
float2 screenUV = SvPosition.xy * ScreenSize.zw;
SvPosition.z = SAMPLE_RT(DepthBuffer, screenUV).r;

View File

@@ -27,6 +27,7 @@ TextureCube EnvProbe : register(t__SRV__);
TextureCube SkyLightTexture : register(t__SRV__);
Buffer<float4> ShadowsBuffer : register(t__SRV__);
Texture2D<float> ShadowMap : register(t__SRV__);
Texture3D VolumetricFogTexture : register(t__SRV__);
@4// Forward Shading: Utilities
// Public accessors for lighting data, use them as data binding might change but those methods will remain.
LightData GetDirectionalLight() { return DirectionalLight; }
@@ -151,7 +152,25 @@ void PS_Forward(
#if USE_FOG && MATERIAL_SHADING_MODEL != SHADING_MODEL_UNLIT
// Calculate exponential height fog
float4 fog = GetExponentialHeightFog(ExponentialHeightFog, materialInput.WorldPosition, ViewPos, 0, gBuffer.ViewPos.z);
#if DIRECTX && FEATURE_LEVEL < FEATURE_LEVEL_SM6
// TODO: fix D3D11/D3D10 bug with incorrect distance
float fogSceneDistance = distance(materialInput.WorldPosition, ViewPos);
#else
float fogSceneDistance = gBuffer.ViewPos.z;
#endif
float4 fog = GetExponentialHeightFog(ExponentialHeightFog, materialInput.WorldPosition, ViewPos, 0, fogSceneDistance);
if (ExponentialHeightFog.VolumetricFogMaxDistance > 0)
{
// Sample volumetric fog and mix it in
float2 screenUV = materialInput.SvPosition.xy * ScreenSize.zw;
float3 viewVector = materialInput.WorldPosition - ViewPos;
float sceneDepth = length(viewVector);
float depthSlice = sceneDepth / ExponentialHeightFog.VolumetricFogMaxDistance;
float3 volumeUV = float3(screenUV, depthSlice);
float4 volumetricFog = VolumetricFogTexture.SampleLevel(SamplerLinearClamp, volumeUV, 0);
fog = CombineVolumetricFog(fog, volumetricFog);
}
// Apply fog to the output color
#if MATERIAL_BLEND == MATERIAL_BLEND_OPAQUE

View File

@@ -21,7 +21,7 @@ float4 ViewInfo;
float4 ScreenSize;
float4 ViewSize;
float3 ViewPadding0;
float UnscaledTimeParam;
float ScaledTimeParam;
@1META_CB_END
// Shader resources

View File

@@ -645,7 +645,7 @@ VertexOutput VS_Ribbon(RibbonInput input, uint vertexIndex : SV_VertexID)
materialInput.TBN = output.TBN;
materialInput.TwoSidedSign = 1;
materialInput.SvPosition = output.Position;
materialInput.PreSkinnedPosition = Position;
materialInput.PreSkinnedPosition = position;
materialInput.PreSkinnedNormal = tangentToLocal[2].xyz;
materialInput.InstanceOrigin = output.InstanceOrigin;
materialInput.InstanceParams = output.InstanceParams;

View File

@@ -20,7 +20,7 @@ float4 ScreenSize;
float4 TemporalAAJitter;
float4x4 InverseViewProjectionMatrix;
float3 ViewPadding0;
float UnscaledTimeParam;
float ScaledTimeParam;
@1META_CB_END
// Shader resources

Binary file not shown.

Binary file not shown.

BIN
Content/Editor/Primitives/Cube.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Editor/SpriteMaterial.flax (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Content/Editor/TexturePreviewMaterial.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Editor/Wires Debug Material.flax (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

BIN
Content/Engine/DefaultMaterial.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Engine/DefaultRadialMenu.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Engine/DefaultTerrainMaterial.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Engine/SingleColorMaterial.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Engine/SkyboxMaterial.flax (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

BIN
Content/Shaders/ColorGrading.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/Fog.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/GI/GlobalSurfaceAtlas.flax (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

BIN
Content/Shaders/MotionBlur.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/Reflections.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/SDF.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/SSR.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/Sky.flax (Stored with Git LFS)

Binary file not shown.

BIN
Content/Shaders/VolumetricFog.flax (Stored with Git LFS)

Binary file not shown.

View File

@@ -4,7 +4,7 @@
"Major": 1,
"Minor": 11,
"Revision": 0,
"Build": 6800
"Build": 6805
},
"Company": "Flax",
"Copyright": "Copyright (c) 2012-2025 Wojciech Figat. All rights reserved.",

View File

@@ -15,7 +15,7 @@ if errorlevel 1 goto BuildToolFailed
:: Build bindings for all editor configurations
echo Building C# bindings...
Binaries\Tools\Flax.Build.exe -build -BuildBindingsOnly -arch=x64 -platform=Windows --buildTargets=FlaxEditor
Binaries\Tools\Flax.Build.exe -build -BuildBindingsOnly -arch=x64 -platform=Windows --buildTargets=FlaxEditor,FlaxGame
popd
echo Done!

View File

@@ -1,19 +0,0 @@
<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/flaxengine/FlaxEngine/issues?q=is%3Aissue
-->
**Issue description:**
<!-- What happened, and what was expected. -->
<!-- Log file, can be found in the project directory's `Logs` folder (optional) -->
**Steps to reproduce:**
<!-- Enter minimal reproduction steps if available. -->
**Minimal reproduction project:**
<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->
**Flax version:**
<!-- Specify version number. -->

View File

@@ -49,7 +49,7 @@ Follow the instructions below to compile and run the engine from source.
* 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 Vulkan SDK ([https://vulkan.lunarg.com/](https://vulkan.lunarg.com/))
* Ubuntu: `sudo apt install vulkan-sdk`
* Ubuntu: `sudo apt install vulkan-sdk` (deprecated, follow official docs)
* Fedora: `sudo dnf install vulkan-headers vulkan-tools vulkan-validation-layers`
* Arch: `sudo pacman -S vulkan-headers vulkan-tools vulkan-validation-layers`
* Install Git with LFS
@@ -60,7 +60,7 @@ Follow the instructions below to compile and run the engine from source.
* Ubuntu: `sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev zlib1g-dev`
* Fedora: `sudo dnf install libX11-devel libXcursor-devel libXinerama-devel ghc-zlib-devel`
* Arch: `sudo pacman -S base-devel libx11 libxcursor libxinerama zlib`
* Install Clang compiler (version 6 or later):
* Install Clang compiler (version 14 or later):
* Ubuntu: `sudo apt-get install clang lldb lld`
* Fedora: `sudo dnf install clang llvm lldb lld`
* Arch: `sudo pacman -S clang lldb lld`

View File

@@ -117,7 +117,8 @@ namespace FlaxEditor.Content.Create
private static bool IsValid(Type type)
{
return (type.IsPublic || type.IsNestedPublic) && !type.IsAbstract && !type.IsGenericType;
var controlTypes = Editor.Instance.CodeEditing.Controls.Get();
return (type.IsPublic || type.IsNestedPublic) && !type.IsAbstract && !type.IsGenericType && controlTypes.Contains(new ScriptType(type));
}
}

View File

@@ -749,7 +749,7 @@ namespace FlaxEditor.Content
}
// Draw short name
Render2D.PushClip(ref textRect);
Render2D.PushClip(textRect);
var scale = 0.95f * view.ViewScale;
Render2D.DrawText(style.FontMedium, ShowFileExtension || view.ShowFileExtensions ? FileName : ShortName, textRect, style.Foreground, nameAlignment, TextAlignment.Center, TextWrapping.WrapWords, 1f, scale);
Render2D.PopClip();

View File

@@ -281,6 +281,13 @@ namespace FlaxEditor.Content
private void CacheData()
{
if (!_asset)
{
_parameters = Utils.GetEmptyArray<ScriptMemberInfo>();
_methods = Utils.GetEmptyArray<ScriptMemberInfo>();
_attributes = Utils.GetEmptyArray<Attribute>();
return;
}
if (_parameters != null)
return;
if (_asset.WaitForLoaded())
@@ -344,13 +351,13 @@ namespace FlaxEditor.Content
}
/// <inheritdoc />
public string Name => Path.GetFileNameWithoutExtension(_asset.Path);
public string Name => _asset ? Path.GetFileNameWithoutExtension(_asset.Path) : null;
/// <inheritdoc />
public string Namespace => string.Empty;
/// <inheritdoc />
public string TypeName => JsonSerializer.GetStringID(_asset.ID);
public string TypeName => _asset ? JsonSerializer.GetStringID(_asset.ID) : null;
/// <inheritdoc />
public bool IsPublic => true;

View File

@@ -130,6 +130,11 @@ namespace FlaxEditor.Content
eyeAdaptation.Mode = EyeAdaptationMode.None;
eyeAdaptation.OverrideFlags |= EyeAdaptationSettingsOverride.Mode;
preview.PostFxVolume.EyeAdaptation = eyeAdaptation;
var antiAliasing = preview.PostFxVolume.AntiAliasing;
antiAliasing.Mode = AntialiasingMode.FastApproximateAntialiasing;
antiAliasing.OverrideFlags |= AntiAliasingSettingsOverride.Mode;
preview.PostFxVolume.AntiAliasing = antiAliasing;
}
}
}

View File

@@ -263,7 +263,7 @@ namespace FlaxEditor.Content.Thumbnails
// Create render task but disabled for now
_output = GPUDevice.Instance.CreateTexture("ThumbnailsOutput");
var desc = GPUTextureDescription.New2D(PreviewsCache.AssetIconSize, PreviewsCache.AssetIconSize, PreviewsCache.AssetIconsAtlasFormat);
_output.Init(ref desc);
_output.Init(desc);
_task = Object.New<RenderTask>();
_task.Order = 50; // Render this task later
_task.Enabled = false;

View File

@@ -15,26 +15,32 @@
#include "Editor/ProjectInfo.h"
#include "Editor/Utilities/EditorUtilities.h"
GDKPlatformTools::GDKPlatformTools()
String GetGDK()
{
// Find GDK
Platform::GetEnvironmentVariable(TEXT("GameDKLatest"), _gdkPath);
if (_gdkPath.IsEmpty() || !FileSystem::DirectoryExists(_gdkPath))
String gdk;
Platform::GetEnvironmentVariable(TEXT("GameDKLatest"), gdk);
if (gdk.IsEmpty() || !FileSystem::DirectoryExists(gdk))
{
_gdkPath.Clear();
Platform::GetEnvironmentVariable(TEXT("GRDKLatest"), _gdkPath);
if (_gdkPath.IsEmpty() || !FileSystem::DirectoryExists(_gdkPath))
gdk.Clear();
Platform::GetEnvironmentVariable(TEXT("GRDKLatest"), gdk);
if (gdk.IsEmpty() || !FileSystem::DirectoryExists(gdk))
{
_gdkPath.Clear();
gdk.Clear();
}
else
{
if (_gdkPath.EndsWith(TEXT("GRDK\\")))
_gdkPath.Remove(_gdkPath.Length() - 6);
else if (_gdkPath.EndsWith(TEXT("GRDK")))
_gdkPath.Remove(_gdkPath.Length() - 5);
if (gdk.EndsWith(TEXT("GRDK\\")))
gdk.Remove(gdk.Length() - 6);
else if (gdk.EndsWith(TEXT("GRDK")))
gdk.Remove(gdk.Length() - 5);
}
}
return gdk;
}
GDKPlatformTools::GDKPlatformTools()
{
_gdkPath = GetGDK();
}
DotNetAOTModes GDKPlatformTools::UseAOT() const
@@ -121,7 +127,7 @@ bool GDKPlatformTools::OnPostProcess(CookingData& data, GDKPlatformSettings* pla
validName.Add('\0');
sb.Append(TEXT("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"));
sb.Append(TEXT("<Game configVersion=\"0\">\n"));
sb.Append(TEXT("<Game configVersion=\"1\">\n"));
sb.AppendFormat(TEXT(" <Identity Name=\"{0}\" Publisher=\"{1}\" Version=\"{2}\"/>\n"),
validName.Get(),
platformSettings->PublisherName.HasChars() ? platformSettings->PublisherName : TEXT("CN=") + gameSettings->CompanyName,

View File

@@ -10,9 +10,10 @@
#include "Engine/Serialization/JsonTools.h"
#include "Engine/Serialization/JsonWriters.h"
#include "Editor/Cooker/PlatformTools.h"
#include "Engine/Engine/Globals.h"
#include "Editor/Editor.h"
#include "Editor/ProjectInfo.h"
#include "Engine/Engine/Globals.h"
#include "Editor/Utilities/EditorUtilities.h"
#if PLATFORM_MAC
#include <sys/stat.h>
#endif
@@ -127,7 +128,7 @@ bool CompileScriptsStep::DeployBinaries(CookingData& data, const String& path, c
const String dst = dstPath / StringUtils::GetFileName(file);
if (dst == file)
continue;
if (FileSystem::CopyFile(dst, file))
if (EditorUtilities::CopyFileIfNewer(dst, file))
{
data.Error(String::Format(TEXT("Failed to copy file from {0} to {1}."), file, dst));
return true;

View File

@@ -526,6 +526,7 @@ 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;
@@ -1367,7 +1368,10 @@ bool CookAssetsStep::Perform(CookingData& data)
{
typeName = e.TypeName;
}
LOG(Info, "{0}: {1:>4} assets of total size {2}", typeName, e.Count, Utilities::BytesToText(e.ContentSize));
if (e.Count == 1)
LOG(Info, "{0}: 1 asset of total size {1}", typeName, Utilities::BytesToText(e.ContentSize));
else
LOG(Info, "{0}: {1:>4} assets of total size {2}", typeName, e.Count, Utilities::BytesToText(e.ContentSize));
}
LOG(Info, "");
}

View File

@@ -265,7 +265,7 @@ bool DeployDataStep::Perform(CookingData& data)
}
if (version.IsEmpty())
{
data.Error(String::Format(TEXT("Failed to find supported .NET {} version (min {}) for the current host platform."), maxVer, minVer));
data.Error(String::Format(TEXT("Failed to find supported .NET {} version (min {}) for {} platform."), maxVer, minVer, platformName));
return true;
}
}

View File

@@ -59,6 +59,7 @@ bool PrecompileAssembliesStep::Perform(CookingData& data)
data.StepProgress(infoMsg, 0);
// Override Newtonsoft.Json with AOT-version (one that doesn't use System.Reflection.Emit)
// TODO: remove it since EngineModule does properly reference AOT lib now
EditorUtilities::CopyFileIfNewer(data.ManagedCodeOutputPath / TEXT("Newtonsoft.Json.dll"), Globals::StartupFolder / TEXT("Source/Platforms/DotNet/AOT/Newtonsoft.Json.dll"));
FileSystem::DeleteFile(data.ManagedCodeOutputPath / TEXT("Newtonsoft.Json.xml"));
FileSystem::DeleteFile(data.ManagedCodeOutputPath / TEXT("Newtonsoft.Json.pdb"));

View File

@@ -87,8 +87,11 @@ namespace FlaxEditor.CustomEditors
var targetTypeType = TypeUtils.GetType(targetType);
if (canUseRefPicker)
{
// TODO: add generic way of CustomEditor for ref pickers (use it on AssetRefEditor/GPUTextureEditor/...)
if (typeof(Asset).IsAssignableFrom(targetTypeType))
return new AssetRefEditor();
if (typeof(GPUTexture).IsAssignableFrom(targetTypeType))
return new GPUTextureEditor();
if (typeof(FlaxEngine.Object).IsAssignableFrom(targetTypeType))
return new FlaxObjectRefEditor();
}

View File

@@ -60,14 +60,14 @@ namespace FlaxEditor.CustomEditors.Dedicated
if (prefab && !prefab.WaitForLoaded())
{
var prefabObjectId = actor.PrefabObjectID;
var prefabInstance = prefab.GetDefaultInstance(ref prefabObjectId);
var prefabInstance = prefab.GetDefaultInstance(prefabObjectId);
if (prefabInstance != null)
{
// Use default prefab instance as a reference for the editor
Values.SetReferenceValue(prefabInstance);
// Display prefab UI (when displaying object inside Prefab Window then display only nested prefabs)
prefab.GetNestedObject(ref prefabObjectId, out var nestedPrefabId, out var nestedPrefabObjectId);
prefab.GetNestedObject(prefabObjectId, out var nestedPrefabId, out var nestedPrefabObjectId);
var nestedPrefab = FlaxEngine.Content.Load<Prefab>(nestedPrefabId);
var panel = layout.UniformGrid();
panel.CustomControl.Height = 20.0f;
@@ -207,7 +207,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
{
var actor = (Actor)Values[0];
var prefabObjectId = actor.PrefabObjectID;
var prefabInstance = prefab.GetDefaultInstance(ref prefabObjectId);
var prefabInstance = prefab.GetDefaultInstance(prefabObjectId);
if (prefabInstance != null)
{
Values.SetReferenceValue(prefabInstance);
@@ -525,7 +525,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
var restored = actor.AddScript(removed.PrefabObject.GetType());
var prefabId = actor.PrefabID;
var prefabObjectId = restored.PrefabObjectID;
Script.Internal_LinkPrefab(FlaxEngine.Object.GetUnmanagedPtr(restored), ref prefabId, ref prefabObjectId);
Script.Internal_LinkPrefab(FlaxEngine.Object.GetUnmanagedPtr(restored), prefabId, prefabObjectId);
string data = JsonSerializer.Serialize(removed.PrefabObject);
JsonSerializer.Deserialize(restored, data);
@@ -547,7 +547,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
string data = JsonSerializer.Serialize(removedActor.PrefabObject);
JsonSerializer.Deserialize(restored, data);
Presenter.Owner.SceneContext.Spawn(restored, parentActor, removedActor.OrderInParent);
Actor.Internal_LinkPrefab(FlaxEngine.Object.GetUnmanagedPtr(restored), ref prefabId, ref prefabObjectId);
Actor.Internal_LinkPrefab(FlaxEngine.Object.GetUnmanagedPtr(restored), prefabId, prefabObjectId);
return;
}

View File

@@ -13,6 +13,8 @@ namespace FlaxEditor.CustomEditors.Dedicated
public class AudioSourceEditor : ActorEditor
{
private Label _infoLabel;
private Slider _slider;
private AudioSource.States _slideStartState;
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
@@ -28,6 +30,13 @@ namespace FlaxEditor.CustomEditors.Dedicated
_infoLabel = playbackGroup.Label(string.Empty).Label;
_infoLabel.AutoHeight = true;
// Play back slider
var sliderElement = playbackGroup.CustomContainer<Slider>();
_slider = sliderElement.CustomControl;
_slider.ThumbSize = new Float2(_slider.ThumbSize.X * 0.5f, _slider.ThumbSize.Y);
_slider.SlidingStart += OnSlidingStart;
_slider.SlidingEnd += OnSlidingEnd;
var grid = playbackGroup.UniformGrid();
var gridControl = grid.CustomControl;
gridControl.ClipChildren = false;
@@ -40,6 +49,38 @@ namespace FlaxEditor.CustomEditors.Dedicated
}
}
private void OnSlidingEnd()
{
foreach (var value in Values)
{
if (value is AudioSource audioSource && audioSource.Clip)
{
switch (_slideStartState)
{
case AudioSource.States.Playing:
audioSource.Play();
break;
case AudioSource.States.Paused:
case AudioSource.States.Stopped:
audioSource.Pause();
break;
default: break;
}
}
}
}
private void OnSlidingStart()
{
foreach (var value in Values)
{
if (value is AudioSource audioSource && audioSource.Clip)
{
_slideStartState = audioSource.State;
}
}
}
/// <inheritdoc />
public override void Refresh()
{
@@ -51,7 +92,29 @@ namespace FlaxEditor.CustomEditors.Dedicated
foreach (var value in Values)
{
if (value is AudioSource audioSource && audioSource.Clip)
{
text += $"Time: {audioSource.Time:##0.0}s / {audioSource.Clip.Length:##0.0}s\n";
_slider.Maximum = audioSource.Clip.Length;
_slider.Minimum = 0;
if (_slider.IsSliding)
{
if (audioSource.State != AudioSource.States.Playing)
{
// Play to move slider correctly
audioSource.Play();
audioSource.Time = _slider.Value;
}
else
{
audioSource.Time = _slider.Value;
}
}
else
{
_slider.Value = audioSource.Time;
}
}
}
_infoLabel.Text = text;
}

View File

@@ -1,6 +1,7 @@
// Copyright (c) Wojciech Figat. All rights reserved.
using FlaxEngine;
using FlaxEngine.GUI;
namespace FlaxEditor.CustomEditors.Dedicated
{
@@ -11,7 +12,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
[CustomEditor(typeof(EnvironmentProbe)), DefaultEditor]
public class EnvironmentProbeEditor : ActorEditor
{
private FlaxEngine.GUI.Button _bake;
private Button _bake;
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
@@ -20,8 +21,9 @@ namespace FlaxEditor.CustomEditors.Dedicated
if (Values.HasDifferentTypes == false)
{
layout.Space(10);
_bake = layout.Button("Bake").Button;
var group = layout.Group("Bake");
group.Panel.ItemsMargin = new Margin(Utilities.Constants.UIMargin * 2);
_bake = group.Button("Bake").Button;
_bake.Clicked += BakeButtonClicked;
}
}

View File

@@ -0,0 +1,68 @@
// Copyright (c) Wojciech Figat. All rights reserved.
using FlaxEditor.GUI.ContextMenu;
using FlaxEngine;
using FlaxEngine.GUI;
namespace FlaxEditor.CustomEditors.Dedicated
{
/// <summary>
/// Basic editor/viewer for <see cref="GPUTexture"/>.
/// </summary>
[CustomEditor(typeof(GPUTexture)), DefaultEditor]
public class GPUTextureEditor : CustomEditor
{
private Image _image;
/// <inheritdoc />
public override DisplayStyle Style => DisplayStyle.Inline;
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
{
_image = new Image
{
Brush = new GPUTextureBrush(),
Size = new Float2(200, 100),
Parent = layout.ContainerControl,
};
_image.Clicked += OnImageClicked;
}
private void OnImageClicked(Image image, MouseButton button)
{
var texture = Values[0] as GPUTexture;
if (!texture || button != MouseButton.Right)
return;
var menu = new ContextMenu();
menu.AddButton("Save...", () => Screenshot.Capture(Values[0] as GPUTexture));
menu.AddButton("Enlarge", () => _image.Size *= 2);
menu.AddButton("Shrink", () => _image.Size /= 2).Enabled = _image.Height > 32;
var location = image.PointFromScreen(Input.MouseScreenPosition);
menu.Show(image, location);
}
/// <inheritdoc />
public override void Refresh()
{
base.Refresh();
var texture = Values[0] as GPUTexture;
((GPUTextureBrush)_image.Brush).Texture = texture;
if (texture)
{
var desc = texture.Description;
#if BUILD_RELEASE
var name = string.Empty;
#else
var name = texture.Name;
#endif
_image.TooltipText = $"{name}\nType: {texture.ResourceType}\nSize: {desc.Width}x{desc.Height}\nFormat: {desc.Format}\nMemory: {Utilities.Utils.FormatBytesCount(texture.MemoryUsage)}";
}
else
{
_image.TooltipText = "None";
}
}
}
}

View File

@@ -164,11 +164,11 @@ namespace FlaxEditor.CustomEditors.Dedicated
var button2Rect = new Rectangle(button1Rect.Right + 2, 1, 14, 14);
// Deselect
if (isSelected && button1Rect.Contains(ref location))
if (isSelected && button1Rect.Contains(location))
Value = new ModelInstanceActor.MeshReference { Actor = null, LODIndex = -1, MeshIndex = -1 };
// Picker dropdown menu
if ((isSelected ? button2Rect : button1Rect).Contains(ref location))
if ((isSelected ? button2Rect : button1Rect).Contains(location))
ShowDropDownMenu();
return base.OnMouseUp(location, button);

View File

@@ -40,7 +40,7 @@ public class ModelPrefabEditor : GenericEditor
if (prefab)
{
var prefabObjectId = modelPrefab.PrefabObjectID;
var prefabObject = prefab.GetDefaultInstance(ref prefabObjectId);
var prefabObject = prefab.GetDefaultInstance(prefabObjectId);
if (prefabObject.PrefabID == _prefabId)
break;
_prefabId = prefabObject.PrefabID;

View File

@@ -36,6 +36,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
{
ScriptName = scriptName;
TooltipText = "Create a new script";
DrawHighlights = false;
}
}
@@ -70,7 +71,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
var buttonHeight = (textSize.Y < 18) ? 18 : textSize.Y + 4;
_addScriptsButton = new Button
{
TooltipText = "Add new scripts to the actor",
TooltipText = "Add new scripts to the actor.",
AnchorPreset = AnchorPresets.MiddleCenter,
Text = buttonText,
Parent = this,
@@ -114,7 +115,16 @@ namespace FlaxEditor.CustomEditors.Dedicated
cm.TextChanged += text =>
{
if (!IsValidScriptName(text))
{
// Remove NewScriptItems
List<Control> newScriptItems = cm.ItemsPanel.Children.FindAll(c => c is NewScriptItem);
foreach (var item in newScriptItems)
{
cm.ItemsPanel.RemoveChild(item);
}
return;
}
if (!cm.ItemsPanel.Children.Any(x => x.Visible && x is not NewScriptItem))
{
// If there are no visible items, that means the search failed so we can find the create script button or create one if it's the first time
@@ -876,7 +886,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
// Add drag button to the group
var scriptDrag = new DragImage
{
TooltipText = "Script reference",
TooltipText = "Script reference.",
AutoFocus = true,
IsScrollable = false,
Color = FlaxEngine.GUI.Style.Current.ForegroundGrey,
@@ -904,9 +914,11 @@ namespace FlaxEditor.CustomEditors.Dedicated
// Remove drop down arrows and containment lines if no objects in the group
if (group.Children.Count == 0)
{
group.Panel.Close();
group.Panel.ArrowImageOpened = null;
group.Panel.ArrowImageClosed = null;
group.Panel.EnableContainmentLines = false;
group.Panel.CanOpenClose = false;
}
// Scripts arrange bar

View File

@@ -1,6 +1,7 @@
// Copyright (c) Wojciech Figat. All rights reserved.
using FlaxEngine;
using FlaxEngine.GUI;
namespace FlaxEditor.CustomEditors.Dedicated
{
@@ -19,8 +20,9 @@ namespace FlaxEditor.CustomEditors.Dedicated
if (Values.HasDifferentTypes == false)
{
// Add 'Bake' button
layout.Space(10);
var button = layout.Button("Bake");
var group = layout.Group("Bake");
group.Panel.ItemsMargin = new Margin(Utilities.Constants.UIMargin * 2);
var button = group.Button("Bake");
button.Button.Clicked += BakeButtonClicked;
}
}

View File

@@ -123,6 +123,8 @@ namespace FlaxEditor.CustomEditors.Editors
{
base.Refresh();
if (Picker == null)
return;
var differentValues = HasDifferentValues;
Picker.DifferentValues = differentValues;
if (!differentValues)
@@ -190,7 +192,7 @@ namespace FlaxEditor.CustomEditors.Editors
public override bool OnMouseDown(Float2 location, MouseButton button)
{
if (DropdownRect.Contains(ref location))
if (DropdownRect.Contains(location))
{
Focus();
ShowPicker();
@@ -204,7 +206,7 @@ namespace FlaxEditor.CustomEditors.Editors
{
base.OnMouseMove(location);
if (DropdownRect.Contains(ref location))
if (DropdownRect.Contains(location))
Cursor = CursorType.Default;
else
Cursor = CursorType.IBeam;

View File

@@ -71,7 +71,7 @@ namespace FlaxEditor.CustomEditors.Editors
menu.AddButton("Copy", linkedEditor.Copy);
var b = menu.AddButton("Duplicate", () => Editor.Duplicate(Index));
b.Enabled = linkedEditor.CanPaste && !Editor._readOnly;
b.Enabled = !Editor._readOnly && Editor._canResize;
b = menu.AddButton("Paste", linkedEditor.Paste);
b.Enabled = linkedEditor.CanPaste && !Editor._readOnly;
@@ -155,7 +155,7 @@ namespace FlaxEditor.CustomEditors.Editors
/// <inheritdoc />
public override bool OnMouseDown(Float2 location, MouseButton button)
{
if (button == MouseButton.Left && _arrangeButtonRect.Contains(ref location))
if (button == MouseButton.Left && _arrangeButtonRect.Contains(location))
{
_arrangeButtonInUse = true;
Focus();
@@ -371,7 +371,7 @@ namespace FlaxEditor.CustomEditors.Editors
/// <inheritdoc />
public override bool OnMouseDown(Float2 location, MouseButton button)
{
if (button == MouseButton.Left && _arrangeButtonRect.Contains(ref location))
if (button == MouseButton.Left && _arrangeButtonRect.Contains(location))
{
_arrangeButtonInUse = true;
Focus();
@@ -407,7 +407,7 @@ namespace FlaxEditor.CustomEditors.Editors
menu.AddButton("Copy", linkedEditor.Copy);
var b = menu.AddButton("Duplicate", () => Editor.Duplicate(Index));
b.Enabled = linkedEditor.CanPaste && !Editor._readOnly;
b.Enabled = !Editor._readOnly && Editor._canResize;
var paste = menu.AddButton("Paste", linkedEditor.Paste);
paste.Enabled = linkedEditor.CanPaste && !Editor._readOnly;
@@ -422,7 +422,8 @@ namespace FlaxEditor.CustomEditors.Editors
moveDownButton.Enabled = Index + 1 < Editor.Count;
}
menu.AddButton("Remove", OnRemoveClicked);
b = menu.AddButton("Remove", OnRemoveClicked);
b.Enabled = !Editor._readOnly && Editor._canResize;
menu.Show(panel, location);
}
@@ -649,7 +650,7 @@ namespace FlaxEditor.CustomEditors.Editors
panel.Panel.Size = new Float2(0, 18);
panel.Panel.Margin = new Margin(0, 0, Utilities.Constants.UIMargin, 0);
var removeButton = panel.Button("-", "Remove the last item");
var removeButton = panel.Button("-", "Remove the last item.");
removeButton.Button.Size = new Float2(16, 16);
removeButton.Button.Enabled = size > _minCount;
removeButton.Button.AnchorPreset = AnchorPresets.TopRight;
@@ -660,7 +661,7 @@ namespace FlaxEditor.CustomEditors.Editors
Resize(Count - 1);
};
var addButton = panel.Button("+", "Add a new item");
var addButton = panel.Button("+", "Add a new item.");
addButton.Button.Size = new Float2(16, 16);
addButton.Button.Enabled = (!NotNullItems || size > 0) && size < _maxCount;
addButton.Button.AnchorPreset = AnchorPresets.TopRight;

View File

@@ -321,11 +321,11 @@ namespace FlaxEditor.CustomEditors.Editors
var button2Rect = new Rectangle(button1Rect.Right + 2, 1, 14, 14);
// Deselect
if (_value != null && button1Rect.Contains(ref location))
if (_value != null && button1Rect.Contains(location))
Value = null;
// Picker dropdown menu
if (_supportsPickDropDown && (isSelected ? button2Rect : button1Rect).Contains(ref location))
if (_supportsPickDropDown && (isSelected ? button2Rect : button1Rect).Contains(location))
{
ShowDropDownMenu();
return true;

View File

@@ -247,7 +247,7 @@ namespace FlaxEditor.CustomEditors.Editors
/// <returns>The items.</returns>
protected virtual List<ItemInfo> GetItemsForType(ScriptType type)
{
return GetItemsForType(type, type.IsClass, true);
return GetItemsForType(type, type.IsClass, true, true);
}
/// <summary>
@@ -273,10 +273,14 @@ namespace FlaxEditor.CustomEditors.Editors
var attributes = p.GetAttributes(true);
var showInEditor = attributes.Any(x => x is ShowInEditorAttribute);
// Skip properties without getter or setter
// Skip properties without getter
if (!p.HasGet || (!p.HasSet && !showInEditor && !usePropertiesWithoutSetter))
continue;
// Skip getter-only properties declared in built-in types
if (!p.HasSet && usePropertiesWithoutSetter && p.Type.DeclaringType.Assembly == typeof(Editor).Assembly)
continue;
// Skip hidden fields, handle special attributes
if ((!p.IsPublic && !showInEditor) || attributes.Any(x => x is HideInEditorAttribute))
continue;

View File

@@ -3,6 +3,7 @@
using System;
using FlaxEditor.GUI;
using FlaxEditor.Scripting;
using FlaxEngine;
using FlaxEngine.Utilities;
namespace FlaxEditor.CustomEditors.Editors
@@ -81,9 +82,13 @@ namespace FlaxEditor.CustomEditors.Editors
private OptionType[] _options;
private ScriptType _type;
private Elements.PropertiesListElement _typeItem;
private ScriptType Type => Values[0] == null ? Values.Type : TypeUtils.GetObjectType(Values[0]);
/// <inheritdoc />
public override bool RevertValueWithChildren => false; // Always revert value for a whole object
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
{
@@ -98,7 +103,8 @@ namespace FlaxEditor.CustomEditors.Editors
_type = type;
// Type
var typeEditor = layout.ComboBox(TypeComboBoxName, "Type of the object value. Use it to change the object.");
_typeItem = layout.AddPropertyItem(TypeComboBoxName, "Type of the object value. Use it to change the object.");
var typeEditor = _typeItem.ComboBox();
for (int i = 0; i < _options.Length; i++)
{
typeEditor.ComboBox.AddItem(_options[i].Name);
@@ -126,6 +132,8 @@ namespace FlaxEditor.CustomEditors.Editors
// Value
var values = new CustomValueContainer(type, (instance, index) => instance);
if (Values.HasReferenceValue)
values.SetReferenceValue(Values.ReferenceValue);
values.AddRange(Values);
var editor = CustomEditorsUtil.CreateEditor(type);
var style = editor.Style;
@@ -170,6 +178,12 @@ namespace FlaxEditor.CustomEditors.Editors
{
base.Refresh();
// Show prefab diff when reference value type is different
var color = Color.Transparent;
if (Values.HasReferenceValue && CanRevertReferenceValue && Values[0]?.GetType() != Values.ReferenceValue?.GetType())
color = FlaxEngine.GUI.Style.Current.BackgroundSelected;
_typeItem.Labels[0].HighlightStripColor = color;
// Check if type has been modified outside the editor (eg. from code)
if (Type != _type)
{

View File

@@ -104,7 +104,7 @@ namespace FlaxEditor.CustomEditors.Editors
public event Action<TypePickerControl> TypePickerValueChanged;
/// <summary>
/// The custom callback for types validation. Cane be used to implement a rule for types to pick.
/// The custom callback for types validation. Can be used to implement a rule for types to pick.
/// </summary>
public Func<ScriptType, bool> CheckValid;
@@ -219,11 +219,11 @@ namespace FlaxEditor.CustomEditors.Editors
var button2Rect = new Rectangle(button1Rect.Right + 2, 1, 14, 14);
// Deselect
if (_value && button1Rect.Contains(ref location) && _type == ScriptType.Null)
if (_value && button1Rect.Contains(location) && _type == ScriptType.Null)
Value = ScriptType.Null;
// Picker dropdown menu
if ((isSelected && _type == ScriptType.Null ? button2Rect : button1Rect).Contains(ref location))
if ((isSelected && _type == ScriptType.Null ? button2Rect : button1Rect).Contains(location))
ShowDropDownMenu();
return base.OnMouseUp(location, button);
@@ -353,7 +353,13 @@ namespace FlaxEditor.CustomEditors.Editors
}
if (!string.IsNullOrEmpty(typeReference.CheckMethod))
{
var parentType = ParentEditor.Values[0].GetType();
var parentEditor = ParentEditor;
// Find actual parent editor if parent editor is collection editor
while (parentEditor.GetType().IsAssignableTo(typeof(CollectionEditor)))
parentEditor = parentEditor.ParentEditor;
var parentType = parentEditor.Values[0].GetType();
var method = parentType.GetMethod(typeReference.CheckMethod, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
if (method != null)
{

View File

@@ -268,8 +268,8 @@ bool Editor::CheckProjectUpgrade()
// Check if last version was older
else if (lastVersion.Major < FLAXENGINE_VERSION_MAJOR || (lastVersion.Major == FLAXENGINE_VERSION_MAJOR && lastVersion.Minor < FLAXENGINE_VERSION_MINOR))
{
LOG(Warning, "The project was opened with the older editor version last time");
const auto result = MessageBox::Show(TEXT("The project was opened with the older editor version last time. Loading it may modify existing data so older editor version won't open it. Do you want to perform a backup before or cancel operation?"), TEXT("Project upgrade"), MessageBoxButtons::YesNoCancel, MessageBoxIcon::Question);
LOG(Warning, "The project was last opened with an older editor version");
const auto result = MessageBox::Show(TEXT("The project was last opened with an older editor version.\nLoading it may modify existing data, which can result in older editor versions being unable to open it.\n\nDo you want to perform a backup before or cancel the operation?"), TEXT("Project upgrade"), MessageBoxButtons::YesNoCancel, MessageBoxIcon::Question);
if (result == DialogResult::Yes)
{
if (BackupProject())
@@ -291,8 +291,8 @@ bool Editor::CheckProjectUpgrade()
// Check if last version was newer
else if (lastVersion.Major > FLAXENGINE_VERSION_MAJOR || (lastVersion.Major == FLAXENGINE_VERSION_MAJOR && lastVersion.Minor > FLAXENGINE_VERSION_MINOR))
{
LOG(Warning, "The project was opened with the newer editor version last time");
const auto result = MessageBox::Show(TEXT("The project was opened with the newer editor version last time. Loading it may fail and corrupt existing data. Do you want to perform a backup before or cancel operation?"), TEXT("Project upgrade"), MessageBoxButtons::YesNoCancel, MessageBoxIcon::Warning);
LOG(Warning, "The project was last opened with a newer editor version");
const auto result = MessageBox::Show(TEXT("The project was last opened with a newer editor version.\nLoading it may fail and corrupt existing data.\n\nDo you want to perform a backup before loading or cancel the operation?"), TEXT("Project upgrade"), MessageBoxButtons::YesNoCancel, MessageBoxIcon::Warning);
if (result == DialogResult::Yes)
{
if (BackupProject())
@@ -526,6 +526,23 @@ int32 Editor::LoadProduct()
return 12;
}
// Get the last opened project path
String localCachePath;
FileSystem::GetSpecialFolderPath(SpecialFolder::AppData, localCachePath);
String editorConfigPath = localCachePath / TEXT("Flax");
String lastProjectSettingPath = editorConfigPath / TEXT("LastProject.txt");
if (!FileSystem::DirectoryExists(editorConfigPath))
FileSystem::CreateDirectory(editorConfigPath);
String lastProjectPath;
if (FileSystem::FileExists(lastProjectSettingPath))
File::ReadAllText(lastProjectSettingPath, lastProjectPath);
if (!FileSystem::DirectoryExists(lastProjectPath))
lastProjectPath = String::Empty;
// Try to open the last project when requested
if (projectPath.IsEmpty() && CommandLine::Options.LastProject.IsTrue() && !lastProjectPath.IsEmpty())
projectPath = lastProjectPath;
// Missing project case
if (projectPath.IsEmpty())
{
@@ -541,7 +558,7 @@ int32 Editor::LoadProduct()
Array<String> files;
if (FileSystem::ShowOpenFileDialog(
nullptr,
StringView::Empty,
lastProjectPath,
TEXT("Project files (*.flaxproj)\0*.flaxproj\0All files (*.*)\0*.*\0"),
false,
TEXT("Select project to open in Editor"),
@@ -625,6 +642,10 @@ int32 Editor::LoadProduct()
}
}
// Update the last opened project path
if (lastProjectPath.Compare(Project->ProjectFolderPath) != 0)
File::WriteAllText(lastProjectSettingPath, Project->ProjectFolderPath, Encoding::UTF8);
return 0;
}

View File

@@ -51,6 +51,7 @@ namespace FlaxEditor
private readonly List<EditorModule> _modules = new List<EditorModule>(16);
private bool _isAfterInit, _areModulesInited, _areModulesAfterInitEnd, _isHeadlessMode, _autoExit;
private string _projectToOpen;
private bool _projectIsNew;
private float _lastAutoSaveTimer, _autoExitTimeout = 0.1f;
private Button _saveNowButton;
private Button _cancelSaveButton;
@@ -737,11 +738,12 @@ namespace FlaxEditor
var procSettings = new CreateProcessSettings
{
FileName = Platform.ExecutableFilePath,
Arguments = string.Format("-project \"{0}\"", _projectToOpen),
Arguments = string.Format("-project \"{0}\"" + (_projectIsNew ? " -new" : string.Empty), _projectToOpen),
ShellExecute = true,
WaitForEnd = false,
HiddenWindow = false,
};
_projectIsNew = false;
_projectToOpen = null;
Platform.CreateProcess(ref procSettings);
}
@@ -790,6 +792,24 @@ namespace FlaxEditor
}
}
/// <summary>
/// Creates the given project. Afterwards closes this project with running editor and opens the given project.
/// </summary>
/// <param name="projectFilePath">The project file path.</param>
public void NewProject(string projectFilePath)
{
if (projectFilePath == null)
{
MessageBox.Show("Missing project");
return;
}
// Cache project path and start editor exit (it will open new instance on valid closing)
_projectToOpen = StringUtils.NormalizePath(Path.GetDirectoryName(projectFilePath));
_projectIsNew = true;
Windows.MainWindow.Close(ClosingReason.User);
}
/// <summary>
/// Closes this project with running editor and opens the given project.
/// </summary>
@@ -1036,7 +1056,7 @@ namespace FlaxEditor
if (actor)
{
Internal_GetEditorBoxWithChildren(FlaxEngine.Object.GetUnmanagedPtr(actor), out var box);
BoundingSphere.FromBox(ref box, out sphere);
BoundingSphere.FromBox(box, out sphere);
if (sphere == BoundingSphere.Empty)
sphere = new BoundingSphere(actor.Position, sphere.Radius);
sphere.Radius = Math.Max(sphere.Radius, 15.0f);
@@ -1370,6 +1390,7 @@ namespace FlaxEditor
public void BuildAllMeshesSDF()
{
var models = new List<Model>();
var forceRebuild = Input.GetKey(KeyboardKeys.F);
Scene.ExecuteOnGraph(node =>
{
if (node is StaticModelNode staticModelNode && staticModelNode.Actor is StaticModel staticModel)
@@ -1379,7 +1400,7 @@ namespace FlaxEditor
model != null &&
!models.Contains(model) &&
!model.IsVirtual &&
model.SDF.Texture == null)
(forceRebuild || model.SDF.Texture == null))
{
models.Add(model);
}
@@ -1392,7 +1413,17 @@ namespace FlaxEditor
{
var model = models[i];
Log($"[{i}/{models.Count}] Generating SDF for {model}");
if (!model.GenerateSDF())
float resolutionScale = 1.0f, backfacesThreshold = 0.6f;
int lodIndex = 6;
bool useGPU = true;
var sdf = model.SDF;
if (sdf.Texture != null)
{
// Preserve options set on this model
resolutionScale = sdf.ResolutionScale;
lodIndex = sdf.LOD;
}
if (!model.GenerateSDF(resolutionScale, lodIndex, true, backfacesThreshold, useGPU))
model.Save();
}
});
@@ -1567,7 +1598,7 @@ namespace FlaxEditor
if (dockedTo != null && dockedTo.SelectedTab != gameWin && dockedTo.SelectedTab != null)
result = dockedTo.SelectedTab.Size;
else
result = gameWin.Viewport.Size;
result = gameWin.Viewport.ContentSize;
result *= root.DpiScale;
result = Float2.Round(result);

View File

@@ -96,7 +96,7 @@ namespace FlaxEditor.GUI
private void DoDrag()
{
// Do the drag drop operation if has selected element
if (new Rectangle(Float2.Zero, Size).Contains(ref _mouseDownPos))
if (new Rectangle(Float2.Zero, Size).Contains(_mouseDownPos))
{
if (Validator.SelectedAsset != null)
DoDragDrop(DragAssets.GetDragData(Validator.SelectedAsset));

View File

@@ -62,7 +62,7 @@ namespace FlaxEditor.GUI
for (int i = 0; i < children.Count; i++)
{
if (children[i] is KeyframePoint p)
p.IsSelected = p.Bounds.Intersects(ref selectionRect);
p.IsSelected = p.Bounds.Intersects(selectionRect);
}
_editor.UpdateTangents();
}
@@ -85,7 +85,7 @@ namespace FlaxEditor.GUI
internal void OnMove(Float2 location)
{
// Skip updating keyframes until move actual starts to be meaningful
if (Float2.Distance(ref _movingSelectionStartPosLock, ref location) < 1.5f)
if (Float2.Distance(_movingSelectionStartPosLock, location) < 1.5f)
return;
_movingSelectionStartPosLock = Float2.Minimum;

View File

@@ -689,8 +689,8 @@ namespace FlaxEditor.GUI
if (selectedOnly && !point.IsSelected)
continue;
var pos = point.Point;
Float2.Min(ref posMin, ref pos, out posMin);
Float2.Max(ref posMax, ref pos, out posMax);
Float2.Min(posMin, pos, out posMin);
Float2.Max(posMax, pos, out posMax);
}
// Apply margin around the area
@@ -703,16 +703,16 @@ namespace FlaxEditor.GUI
PointFromKeyframesToContents(ref posMin, ref viewRect);
PointFromKeyframesToContents(ref posMax, ref viewRect);
var tmp = posMin;
Float2.Min(ref posMin, ref posMax, out posMin);
Float2.Max(ref posMax, ref tmp, out posMax);
Float2.Min(posMin, posMax, out posMin);
Float2.Max(posMax, tmp, out posMax);
var contentsSize = posMax - posMin;
// Convert from Contents to Main Panel
posMin = _contents.PointToParent(posMin);
posMax = _contents.PointToParent(posMax);
tmp = posMin;
Float2.Min(ref posMin, ref posMax, out posMin);
Float2.Max(ref posMax, ref tmp, out posMax);
Float2.Min(posMin, posMax, out posMin);
Float2.Max(posMax, tmp, out posMax);
// Update zoom (leave unchanged when focusing a single point)
var zoomMask = EnableZoom;
@@ -941,7 +941,7 @@ namespace FlaxEditor.GUI
{
SetupGrid(out var min, out var max, out var pixelRange);
Render2D.PushClip(ref viewRect);
Render2D.PushClip(viewRect);
if ((ShowAxes & UseMode.Vertical) == UseMode.Vertical)
DrawAxis(Float2.UnitX, viewRect, min.X, max.X, pixelRange.X);
@@ -954,7 +954,7 @@ namespace FlaxEditor.GUI
// Draw curve
if (!_showCollapsed)
{
Render2D.PushClip(ref rect);
Render2D.PushClip(rect);
DrawCurve(ref viewRect);
Render2D.PopClip();
}

View File

@@ -129,11 +129,39 @@ namespace FlaxEditor.GUI.Input
{
base.Draw();
var style = Style.Current;
var r = new Rectangle(0, 0, Width, Height);
bool isTransparent = _value.A < 1;
Render2D.FillRectangle(r, _value);
Render2D.DrawRectangle(r, IsMouseOver || IsNavFocused ? style.BackgroundSelected : Color.Black);
var style = Style.Current;
var fullRect = new Rectangle(0, 0, Width, Height);
var colorRect = new Rectangle(0, 0, isTransparent ? Width * 0.7f : Width, Height);
if (isTransparent)
{
var alphaRect = new Rectangle(colorRect.Right, 0, Width - colorRect.Right, Height);
// Draw checkerboard pattern to part of the color value box
Render2D.FillRectangle(alphaRect, Color.White);
var smallRectSize = 7.9f;
var numHor = Mathf.CeilToInt(alphaRect.Width / smallRectSize);
var numVer = Mathf.CeilToInt(alphaRect.Height / smallRectSize);
for (int i = 0; i < numHor; i++)
{
for (int j = 0; j < numVer; j++)
{
if ((i + j) % 2 == 0)
{
var rect = new Rectangle(alphaRect.X + smallRectSize * i, alphaRect.Y + smallRectSize * j, new Float2(smallRectSize));
Render2D.PushClip(alphaRect);
Render2D.FillRectangle(rect, Color.Gray);
Render2D.PopClip();
}
}
}
Render2D.FillRectangle(alphaRect, _value);
}
Render2D.FillRectangle(colorRect, _value with { A = 1 });
Render2D.DrawRectangle(fullRect, IsMouseOver || IsNavFocused ? style.BackgroundSelected : Color.Black);
}
/// <inheritdoc />

View File

@@ -180,7 +180,7 @@ namespace FlaxEditor.GUI.Input
Focus();
float mousePosition = location.X;
if (_thumbRect.Contains(ref location))
if (_thumbRect.Contains(location))
{
// Start sliding
_isSliding = true;

View File

@@ -51,6 +51,11 @@ namespace FlaxEditor.GUI
/// </summary>
public float SortScore;
/// <summary>
/// Wether the query highlights should be draw.
/// </summary>
public bool DrawHighlights = true;
/// <summary>
/// Occurs when items gets clicked by the user.
/// </summary>
@@ -165,7 +170,7 @@ namespace FlaxEditor.GUI
Render2D.FillRectangle(new Rectangle(Float2.Zero, Size), style.BackgroundHighlighted);
// Draw all highlights
if (_highlights != null)
if (DrawHighlights && _highlights != null)
{
var color = style.ProgressNormal * 0.6f;
for (int i = 0; i < _highlights.Count; i++)

View File

@@ -144,7 +144,7 @@ namespace FlaxEditor.GUI.Timeline
var k = keyframes[i];
var sphere = new BoundingSphere(k.Value, KeyframeSize);
if (sphere.Intersects(ref selectRay))
if (sphere.Intersects(selectRay))
{
SelectKeyframe(_track, i, 0);
return;
@@ -154,7 +154,7 @@ namespace FlaxEditor.GUI.Timeline
{
var t = k.Value + k.TangentIn;
var box = BoundingBox.FromSphere(new BoundingSphere(t, TangentSize));
if (box.Intersects(ref selectRay))
if (box.Intersects(selectRay))
{
SelectKeyframe(_track, i, 1);
return;
@@ -165,7 +165,7 @@ namespace FlaxEditor.GUI.Timeline
{
var t = k.Value + k.TangentOut;
var box = BoundingBox.FromSphere(new BoundingSphere(t, TangentSize));
if (box.Intersects(ref selectRay))
if (box.Intersects(selectRay))
{
SelectKeyframe(_track, i, 2);
return;

View File

@@ -115,7 +115,7 @@ namespace FlaxEditor.GUI.Timeline.GUI
/// <inheritdoc />
public override void OnMouseMove(Float2 location)
{
if (_isMoving && Float2.DistanceSquared(ref location, ref _startMovePos) > 25.0f)
if (_isMoving && Float2.DistanceSquared(location, _startMovePos) > 25.0f)
{
_startMovePos = Float2.Minimum;
var x = PointToParent(location).X;
@@ -387,7 +387,7 @@ namespace FlaxEditor.GUI.Timeline.GUI
{
// Push clipping mask
GetDesireClientArea(out var clientArea);
Render2D.PushClip(ref clientArea);
Render2D.PushClip(clientArea);
var style = Style.Current;
var bounds = new Rectangle(Float2.Zero, Size);

View File

@@ -115,7 +115,7 @@ namespace FlaxEditor.GUI
{
if (Children[i] is KeyframePoint p)
{
p.IsSelected = p.Bounds.Intersects(ref selectionRect);
p.IsSelected = p.Bounds.Intersects(selectionRect);
}
}
}
@@ -401,7 +401,7 @@ namespace FlaxEditor.GUI
Cursor = CursorType.Default;
// Check if no move has been made at all
if (Float2.Distance(ref location, ref _rightMouseDownPos) < 2.0f)
if (Float2.Distance(location, _rightMouseDownPos) < 2.0f)
{
var selectionCount = _editor.SelectionCount;
var point = GetChildAt(location) as KeyframePoint;

View File

@@ -50,14 +50,14 @@ namespace FlaxEditor.GUI.Timeline.GUI
var color = (_timeline.IsMovingPositionHandle ? style.SelectionBorder : style.Foreground).AlphaMultiplied(0.6f);
Matrix3x3.RotationZ(Mathf.PiOverTwo, out var m1);
var m2 = Matrix3x3.Translation2D(0, timeAxisHeaderOffset);
Matrix3x3.Multiply(ref m1, ref m2, out var m3);
Render2D.PushTransform(ref m3);
Matrix3x3.Multiply(m1, m2, out var m3);
Render2D.PushTransform(m3);
// TODO: Convert to its own sprite or 9 slice
Render2D.DrawSprite(icon, new Rectangle(new Float2(10, -icon.Size.X * 0.5f - 1), Size + new Float2(0, 1)), color);
Render2D.FillRectangle(new Rectangle(new Float2(-6, -icon.Size.Y * 0.5f + 7), new Float2(timeAxisOverlap, 5)), color);
Render2D.PopTransform();
var textMatrix = Matrix3x3.Translation2D(12, timeAxisHeaderOffset);
Render2D.PushTransform(ref textMatrix);
Render2D.PushTransform(textMatrix);
Render2D.DrawText(style.FontSmall, labelText, style.Foreground, new Float2(2, -6));
Render2D.PopTransform();

View File

@@ -356,7 +356,7 @@ namespace FlaxEditor.GUI.Timeline
{
Render2D.DrawLine(bounds.UpperLeft, bounds.BottomLeft, moveColor, moveThickness);
}
else if (IsMouseOver && CanResize && MoveLeftEdgeRect.Contains(ref _mouseLocation))
else if (IsMouseOver && CanResize && MoveLeftEdgeRect.Contains(_mouseLocation))
{
Render2D.DrawLine(bounds.UpperLeft, bounds.BottomLeft, Color.Yellow);
}
@@ -364,7 +364,7 @@ namespace FlaxEditor.GUI.Timeline
{
Render2D.DrawLine(bounds.UpperRight, bounds.BottomRight, moveColor, moveThickness);
}
else if (IsMouseOver && CanResize && MoveRightEdgeRect.Contains(ref _mouseLocation))
else if (IsMouseOver && CanResize && MoveRightEdgeRect.Contains(_mouseLocation))
{
Render2D.DrawLine(bounds.UpperRight, bounds.BottomRight, Color.Yellow);
}
@@ -384,8 +384,8 @@ namespace FlaxEditor.GUI.Timeline
_startMoveLocation = Root.MousePosition;
_startMoveStartFrame = StartFrame;
_startMoveDuration = DurationFrames;
_startMoveLeftEdge = MoveLeftEdgeRect.Contains(ref location) && CanResize;
_startMoveRightEdge = MoveRightEdgeRect.Contains(ref location) && CanResize;
_startMoveLeftEdge = MoveLeftEdgeRect.Contains(location) && CanResize;
_startMoveRightEdge = MoveRightEdgeRect.Contains(location) && CanResize;
StartMouseCapture(true);
if (_startMoveLeftEdge || _startMoveRightEdge)
return true;

View File

@@ -337,7 +337,7 @@ namespace FlaxEditor.GUI.Timeline
DebugDraw.DrawSphere(sphere, selected ? Color.Yellow : Color.Red);
sphere.Radius *= 0.95f;
DebugDraw.DrawSphere(sphere, new Color(1, 0, 0, coveredAlpha), 0, false);
if (select && sphere.Intersects(ref selectRay))
if (select && sphere.Intersects(selectRay))
SelectKeyframeGizmo(curveTrack, i, 0);
if (!k.TangentIn.IsZero)
@@ -349,7 +349,7 @@ namespace FlaxEditor.GUI.Timeline
var box = BoundingBox.FromSphere(new BoundingSphere(t, EditCurveTrackGizmo.TangentSize));
DebugDraw.DrawBox(box, selected ? Color.Yellow : Color.AliceBlue);
DebugDraw.DrawBox(box, Color.AliceBlue.AlphaMultiplied(coveredAlpha), 0, false);
if (select && box.Intersects(ref selectRay))
if (select && box.Intersects(selectRay))
SelectKeyframeGizmo(curveTrack, i, 2);
}
@@ -362,7 +362,7 @@ namespace FlaxEditor.GUI.Timeline
var box = BoundingBox.FromSphere(new BoundingSphere(t, EditCurveTrackGizmo.TangentSize));
DebugDraw.DrawBox(box, selected ? Color.Yellow : Color.AliceBlue);
DebugDraw.DrawBox(box, Color.AliceBlue.AlphaMultiplied(coveredAlpha), 0, false);
if (select && box.Intersects(ref selectRay))
if (select && box.Intersects(selectRay))
SelectKeyframeGizmo(curveTrack, i, 2);
}

View File

@@ -2078,7 +2078,7 @@ namespace FlaxEditor.GUI.Timeline
if (button == MouseButton.Right && _isRightMouseButtonDown)
{
_isRightMouseButtonDown = false;
if (Float2.Distance(ref location, ref _rightMouseButtonDownPos) < 4.0f)
if (Float2.Distance(location, _rightMouseButtonDownPos) < 4.0f)
ShowContextMenu(location);
}
@@ -2243,7 +2243,7 @@ namespace FlaxEditor.GUI.Timeline
foreach (var media in _tracks[i].Media)
{
if (media.Bounds.Intersects(ref mediaRect))
if (media.Bounds.Intersects(mediaRect))
{
SelectedMedia.Add(media);
selectionChanged = true;

View File

@@ -810,7 +810,7 @@ namespace FlaxEditor.GUI.Timeline
/// <returns>True if hits it.</returns>
protected virtual bool TestHeaderHit(ref Float2 location)
{
return new Rectangle(0, 0, Width, HeaderHeight).Contains(ref location);
return new Rectangle(0, 0, Width, HeaderHeight).Contains(location);
}
/// <summary>

View File

@@ -208,7 +208,7 @@ namespace FlaxEditor.GUI.Timeline.Tracks
// Hit-test dot
var size = Height - 2.0f;
var rect = new Rectangle(new Float2(size * -0.5f) + Size * 0.5f, new Float2(size));
return rect.Contains(ref location);
return rect.Contains(location);
}
return base.ContainsPoint(ref location, precise);

View File

@@ -527,7 +527,7 @@ namespace FlaxEditor.GUI.Timeline.Tracks
{
_output = GPUDevice.Instance.CreateTexture("CameraCutMedia.Output");
var desc = GPUTextureDescription.New2D(Width, Height, PixelFormat.R8G8B8A8_UNorm);
_output.Init(ref desc);
_output.Init(desc);
}
if (_task == null)
{

View File

@@ -10,6 +10,7 @@ using System.Text;
using FlaxEditor.GUI.Timeline.Undo;
using FlaxEngine;
using FlaxEngine.GUI;
using FlaxEngine.Json;
using FlaxEngine.Utilities;
namespace FlaxEditor.GUI.Timeline.Tracks
@@ -54,7 +55,10 @@ namespace FlaxEditor.GUI.Timeline.Tracks
var paramTypeName = LoadName(stream);
e.EventParamsTypes[i] = TypeUtils.GetManagedType(paramTypeName);
if (e.EventParamsTypes[i] == null)
{
Editor.LogError($"Unknown type {paramTypeName}.");
isInvalid = true;
}
}
if (isInvalid)
@@ -82,7 +86,7 @@ namespace FlaxEditor.GUI.Timeline.Tracks
for (int j = 0; j < paramsCount; j++)
{
stream.Read(dataBuffer, 0, e.EventParamsSizes[j]);
key.Parameters[j] = Marshal.PtrToStructure(handle.AddrOfPinnedObject(), e.EventParamsTypes[j]);
key.Parameters[j] = Utilities.Utils.ByteArrayToStructure(handle.AddrOfPinnedObject(), e.EventParamsTypes[j], e.EventParamsSizes[j]);
}
events[i] = new KeyframesEditor.Keyframe
@@ -125,8 +129,7 @@ namespace FlaxEditor.GUI.Timeline.Tracks
for (int j = 0; j < paramsCount; j++)
{
Marshal.StructureToPtr(key.Parameters[j], ptr, true);
Marshal.Copy(ptr, dataBuffer, 0, e.EventParamsSizes[j]);
Utilities.Utils.StructureToByteArray(key.Parameters[j], e.EventParamsSizes[j], ptr, dataBuffer);
stream.Write(dataBuffer, 0, e.EventParamsSizes[j]);
}
}
@@ -153,7 +156,7 @@ namespace FlaxEditor.GUI.Timeline.Tracks
/// <summary>
/// The event key data.
/// </summary>
public struct EventKey
public struct EventKey : ICloneable
{
/// <summary>
/// The parameters values.
@@ -178,6 +181,26 @@ namespace FlaxEditor.GUI.Timeline.Tracks
sb.Append(')');
return sb.ToString();
}
/// <inheritdoc />
public object Clone()
{
if (Parameters == null)
return new EventKey();
// Deep clone parameter values (especially boxed value types need to be duplicated to avoid referencing the same ones)
var parameters = new object[Parameters.Length];
for (int i = 0; i < parameters.Length; i++)
{
var p = Parameters[i];
if (p == null || p is FlaxEngine.Object)
parameters[i] = Parameters[i];
else
parameters[i] = JsonSerializer.Deserialize(JsonSerializer.Serialize(p), p.GetType());
}
return new EventKey { Parameters = parameters };
}
}
/// <inheritdoc />
@@ -234,6 +257,7 @@ namespace FlaxEditor.GUI.Timeline.Tracks
var time = Timeline.CurrentTime;
if (!TryGetValue(out var value))
value = Events.Evaluate(time);
value = ((ICloneable)value).Clone();
// Find event at the current location
for (int i = Events.Keyframes.Count - 1; i >= 0; i--)

View File

@@ -77,7 +77,7 @@ namespace FlaxEditor.GUI.Timeline.Tracks
{
var time = stream.ReadSingle();
stream.Read(dataBuffer, 0, e.ValueSize);
var value = Marshal.PtrToStructure(handle.AddrOfPinnedObject(), propertyType);
var value = Utilities.Utils.ByteArrayToStructure(handle.AddrOfPinnedObject(), propertyType, e.ValueSize);
keyframes[i] = new KeyframesEditor.Keyframe
{
@@ -142,8 +142,7 @@ namespace FlaxEditor.GUI.Timeline.Tracks
for (int i = 0; i < keyframes.Count; i++)
{
var keyframe = keyframes[i];
Marshal.StructureToPtr(keyframe.Value, ptr, true);
Marshal.Copy(ptr, dataBuffer, 0, e.ValueSize);
Utilities.Utils.StructureToByteArray(keyframe.Value, e.ValueSize, ptr, dataBuffer);
stream.Write(keyframe.Time);
stream.Write(dataBuffer);
}

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