579 Commits

Author SHA1 Message Date
7e969649ae _macdrag precleanup
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
2026-04-04 19:37:15 +03:00
3288fe4006 Fix mouse warping when controlling camera in Editor viewport on macOS 2026-04-04 19:17:26 +03:00
fd334769b2 Handle external application close events 2026-04-04 18:52:49 +03:00
576130f74f Fix destroyed windows removing keyboard focus on macOS 2026-04-04 18:36:51 +03:00
b99c8ddda7 Fix missing window icon on macOS 2026-04-04 16:45:19 +03:00
Wojtek Figat
2fc95bdf57 Merge remote-tracking branch 'origin/master' into 1.12
# Conflicts:
#	Content/Editor/MaterialTemplates/Deformable.shader
#	Flax.flaxproj
#	Source/Engine/Content/Content.h
#	Source/Engine/Serialization/JsonTools.cpp
2026-04-01 17:14:21 +02:00
Wojtek Figat
9a7abd751f Fix crash on invalid unpack node usage in shader graph
#4030
2026-04-01 16:55:28 +02:00
Wojtek Figat
cabae8142d Merge branch 'Zode-visject-larger-inputs' 2026-04-01 16:26:53 +02:00
Wojtek Figat
2d0da37907 Remove ComparisonNode from #3540 that is impl in #3866 2026-04-01 16:26:47 +02:00
Wojtek Figat
42ec33bd9a Fix auto-sizing nodes with hidden default value fields (eg, comparison node)
#3540
2026-04-01 16:25:33 +02:00
Wojtek Figat
806027408a Merge branch 'visject-larger-inputs' of https://github.com/Zode/FlaxEngine into Zode-visject-larger-inputs 2026-04-01 16:02:10 +02:00
Wojtek Figat
dc6d53de7c Try to fix compile error 2026-04-01 16:01:01 +02:00
Wojtek Figat
70f2eee172 Merge branch 'xxSeys1-VISjectIsNowMoreVISuallyAppealingAndLegible' 2026-04-01 15:58:41 +02:00
Wojtek Figat
7737dbc77f Various minor fixes
#3866
2026-04-01 15:58:31 +02:00
Wojtek Figat
9d9d582598 Add undo to preserve connections when changing parameter in param node 2026-04-01 09:50:02 +02:00
Wojtek Figat
f1796dc8c8 Fix and improve layout of various Visject nodes and elements
#3866
2026-04-01 09:49:29 +02:00
Wojtek Figat
ebb4ff1dc2 Move UseFixedSize property from node archetype to flags and optimize unnecessary layouts during node loading
#3866
2026-03-31 22:47:10 +02:00
Wojtek Figat
ea5e7f1416 Add hover highlight to Visject surface boxes
#3866
2026-03-31 21:46:21 +02:00
Wojtek Figat
917e62621d Restore textures background back to Visject surface
#3866
2026-03-31 21:45:29 +02:00
Wojtek Figat
a88e3265cd Merge branch 'VISjectIsNowMoreVISuallyAppealingAndLegible' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-VISjectIsNowMoreVISuallyAppealingAndLegible 2026-03-31 15:16:55 +02:00
Wojtek Figat
b2d1d0f1d9 Fix sending replication message to newly connected clients for objects that were not spawned
#4029
2026-03-31 13:13:33 +02:00
Wojtek Figat
c6204fc274 Fix binary asset dependencies tracking when dependent asset gets loaded later on
#3951

Adds additional cache for dependencies tracking to update them when other asset gets loaded later on.
Remove critical-section from `LoadAssetTask` that was causing some deadlocks (data access is already atomic there).
2026-03-31 12:03:18 +02:00
Wojtek Figat
8b383d4dbe Fix regression on Large Worlds build and bunch of warnings 2026-03-30 23:50:03 +02:00
Wojtek Figat
7b695bf6bf Fix compilation regression 2026-03-30 22:44:38 +02:00
Wojtek Figat
327547a895 Rename FlaxStorage::AllowDataModifications to IsReadOnly 2026-03-30 22:40:37 +02:00
Wojtek Figat
e2fbd83086 Optimize VariantType name allocs to use static type when possible 2026-03-30 21:56:01 +02:00
Wojtek Figat
d96e1297f7 Optimize MMethod::GetParameterIsOut to cache all parameters in a single bit-flag 2026-03-30 19:56:32 +02:00
Wojtek Figat
2748216190 Fix using Dictionary as virtual method parameter in scripting bindings 2026-03-30 19:55:44 +02:00
Wojtek Figat
b2457b6ee6 Fix Variant array element typename 2026-03-30 19:55:13 +02:00
Wojtek Figat
bf20f5d2bf Fix scripting bindings in searching virtual methods to invoke when there is a name and parameter count collision
#3649
2026-03-30 19:54:47 +02:00
Wojtek Figat
767854a2af Fix shader error when using Position Offset in deformable material
#4028
2026-03-30 10:18:15 +02:00
Wojtek Figat
243173df3c Fix pasted ghost prefab objects when paste target is not defined
#3945
2026-03-30 10:14:50 +02:00
Wojtek Figat
408c6d96b1 Minor imporvements 2026-03-30 10:14:25 +02:00
Wojtek Figat
039407b6ee Fix broken prefab linkage when duplicating nested prefab instance root
#3945
2026-03-30 10:14:07 +02:00
Wojtek Figat
71ff0c6362 Fix root linkage for prefab instances copy pasted in Editor
#3945
2026-03-30 10:13:25 +02:00
Wojtek Figat
b3aeab777f Fix invalid CanRenderer when canvas actor is gone
#3945
2026-03-30 00:13:49 +02:00
Wojtek Figat
b8110e9db3 Add = to text box separators 2026-03-30 00:13:24 +02:00
Wojtek Figat
f500fcd6fd Optimize actors copy/paste data to use a single JSON for all objects
#3945
2026-03-28 23:39:43 +01:00
Saas
bda0dee371 fix curve node 2026-03-28 22:32:55 +01:00
Saas
ec756fe626 fix custom code node size 2026-03-28 22:16:31 +01:00
Saas
b78ff57f6a fix custom code nodes 2026-03-28 22:04:41 +01:00
Saas
9fa9e75e08 fix decorator size when surface is loaded 2026-03-28 21:28:09 +01:00
Wojtek Figat
095f7277e2 Minor fixes 2026-03-28 15:13:52 +01:00
Saas
f26dbf530c fix skeleton blend mask node to resize when asset reference is (dis-) connected 2026-03-28 13:47:14 +01:00
Wojtek Figat
76378156f7 Fix crash when applying prefab changes
#3755
2026-03-28 00:31:46 +01:00
Wojtek Figat
c12948c6cc Fix crash when applying prefab changes using default instance (invalid)
#3754
2026-03-28 00:04:03 +01:00
Wojtek Figat
e99dc8dce4 Fix missing doc warning 2026-03-27 23:54:43 +01:00
Wojtek Figat
258ba233d5 Attempt to fix time precision issue in long game run
#3865
2026-03-27 23:52:11 +01:00
Wojtek Figat
2b538e4864 Fix direction gizmo size on different FOV and fix event
#4025
2026-03-27 23:19:27 +01:00
Wojtek Figat
a0dc300a7b Merge branch 'Tryibion-add-content-tree-view' 2026-03-27 22:20:19 +01:00
Wojtek Figat
9f54bca831 Fix regression in HDR screen space reflections 2026-03-27 18:23:17 +01:00
Wojtek Figat
bb2ee7260f Optimize code in draw calls batching for shadow 2026-03-27 17:59:25 +01:00
Wojtek Figat
1bef4d00ad Fix deprecated compilation errors on the latest macOS SDK 2026-03-27 17:26:05 +01:00
Wojtek Figat
81176c98a1 Rebuild tint for macOS with SPIRV reader 2026-03-27 17:25:36 +01:00
Chandler Cox
6c4fc44163 Fix arrow rect issue. 2026-03-27 10:59:06 -05:00
Chandler Cox
a41f2e9260 Merge branch 'master' into add-content-tree-view 2026-03-27 10:48:08 -05:00
Wojtek Figat
cc9e41fe44 Dont build tint by default 2026-03-27 11:29:16 +01:00
Wojtek Figat
4d77ced41d Go back with min .NET version 2026-03-27 11:24:39 +01:00
Wojtek Figat
54202eeb8a Merge remote-tracking branch 'origin/1.12' into 1.12 2026-03-27 11:22:32 +01:00
Wojtek Figat
0e1c5cd6f8 Bump up build number 2026-03-27 11:16:25 +01:00
Wojtek Figat
8f50d9faec Fix terrain collision geometry order to match heights buffer
#3844
2026-03-27 11:06:11 +01:00
Wojtek Figat
5249864af4 Merge branch 'xxSeys1-DirectionGizmoPolish' 2026-03-27 10:40:01 +01:00
Wojtek Figat
3e5ceb1e1e Merge branch 'DirectionGizmoPolish' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-DirectionGizmoPolish 2026-03-27 10:39:11 +01:00
Wojtek Figat
ed46025a11 Merge branch 'xxSeys1-112InIssueTemplate' 2026-03-27 10:35:14 +01:00
Wojtek Figat
706b24e1c8 Merge branch '112InIssueTemplate' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-112InIssueTemplate 2026-03-27 10:35:09 +01:00
Wojtek Figat
f5651de725 Add NDK 27 as minimum for Android to fix 16kb page alignment issue on libc++_shared.so 2026-03-27 10:16:32 +01:00
Wojtek Figat
51ff2969e1 Ignore signal SIG34 in Linux tests 2026-03-27 08:52:11 +01:00
Wojtek Figat
5773dc47f4 Restore no cursor clipping in Locked mode on non-SDL input to avoid issues 2026-03-26 23:52:24 +01:00
Wojtek Figat
c30c56e8eb Restore windows lock during input events processing in non-SDL verison for now 2026-03-26 23:49:30 +01:00
Wojtek Figat
eab7794e3b Merge remote-tracking branch 'origin/master' into 1.12
# Conflicts:
#	Source/Engine/Content/Storage/FlaxStorage.cpp
#	global.json
2026-03-26 23:44:33 +01:00
Wojtek Figat
b347cd2f54 Disable SDL on Mac and Windows for now 2026-03-26 23:32:51 +01:00
Wojtek Figat
78052fbaec Refactor engine configuration to support platform-specific namespaces in config files 2026-03-26 23:27:51 +01:00
Wojtek Figat
557dc9b649 Add transparency support to dragging windows without SDL 2026-03-26 22:08:41 +01:00
Wojtek Figat
9fbcce13b3 Add tint shader compiler dependency to manually build it for Mac with SPIR-V reader
Official binary doesn't include it, only WGSL reader which blocks usage in Flax.
2026-03-26 21:43:51 +01:00
Wojtek Figat
6d433d4ef7 Add normalization to Reflections debug view to be usable in HDR scenes 2026-03-26 19:16:16 +01:00
Wojtek Figat
7531b1fdbd Fix rendering crash when D24_8Stencil format is not supported (lol) 2026-03-26 19:12:58 +01:00
Wojtek Figat
58586ca4f0 Add small improvement to terrain normals 2026-03-26 17:17:13 +01:00
Wojtek Figat
09a0573932 Fix MeshAccessor.Stream count for items not aligned to buffer start 2026-03-26 17:14:14 +01:00
Wojtek Figat
b6789ee523 Add various improvements to MeshAccessor such as ComputeNormals and ComputeTangents
https://forum.flaxengine.com/t/how-to-create-procedural-generated-geometry-using-meshaccessor/2420
2026-03-26 17:13:46 +01:00
Wojtek Figat
f1b6c13ba9 Fix PixelFormatSampler.Write` in C# to actually work 2026-03-26 15:33:55 +01:00
Wojtek Figat
ccc8d209da Fix MeshAccessor to validate buffer existence in C# API 2026-03-26 15:33:14 +01:00
Wojtek Figat
e624e1ba69 Fix missing Custom Global Code code generation in Defines stage 2026-03-26 14:14:15 +01:00
Wojtek Figat
d0cc88f82a Try to fix random hdiutil failure in Continuous Delivery on Github Action 2026-03-26 14:08:03 +01:00
Wojtek Figat
a48ce78733 Fix crash when loading CollisionData before physics init
#3971
2026-03-26 12:28:31 +01:00
Wojtek Figat
d1f6440a76 Fix stack overflow on mac when cooking game with too small stack size 2026-03-26 10:55:11 +01:00
Wojtek Figat
5ccc33719e Add basis universal and Web build support for macOS 2026-03-26 10:47:52 +01:00
Wojtek Figat
0f09cad1cf Update PhysX with new slim Build
Rebuild for win64 and android only
2026-03-26 09:33:56 +01:00
Wojtek Figat
f92ec30e1b Fix crash when using convex mesh collider with negative scale
#3853
2026-03-26 09:26:42 +01:00
Wojtek Figat
a9fbbaa88e Fix spawned in Editor actor RigidBody to never be static 2026-03-26 09:21:54 +01:00
Saas
3db3eb58a3 add Flax 1.12 to bug report template and tweak wording for some things 2026-03-25 23:16:27 +01:00
Saas
e455c874c6 tweak Z axis color and add brightness option
https://discord.com/channels/437989205315158016/509056735844106251/1486480204242096369
2026-03-25 22:57:17 +01:00
Wojtek Figat
32af903a2d Fix crash when exporting terrain that has missing patch data 2026-03-25 22:31:53 +01:00
Wojtek Figat
c12553812c Update Terrain scripting API 2026-03-25 22:31:36 +01:00
Saas
c9df03d293 fix viewport orientation when clicking on axis 2026-03-25 22:15:38 +01:00
Saas
c71e1d78e0 polish direction gizmo
- slightly change appearance to be more functional and more pleasant on the eyes
- add options to customize appearance in Viewport editor options
2026-03-25 22:12:16 +01:00
Wojtek Figat
a84109df2c Add UnusedStorageLifetime for asset file TTL
#3931
2026-03-25 21:30:07 +01:00
Wojtek Figat
9d0e4e9768 Fix potential stack overflow inside CustomEditor.RebuildLayout
#3720
2026-03-25 18:51:12 +01:00
Wojtek Figat
3f2e6d82c9 Fix regression from 21e2c830e5 when reimport Animation
#3937
2026-03-25 18:44:56 +01:00
Wojtek Figat
56b208ad85 Merge branch 'Tryibion-direction-gizmo' 2026-03-25 18:11:40 +01:00
Wojtek Figat
842b25f80f Fix Direction Gizmo axes placement in ortho view
#3857
2026-03-25 18:11:31 +01:00
Wojtek Figat
27a1db617c Add hover color highlight to match transform gizmo in direction gizmo
Don't snap shapes to pixels to smooth movement during view rotation

#3857
2026-03-25 17:47:56 +01:00
Wojtek Figat
8356009526 Add button to hide direction gizmo
#3857
2026-03-25 17:41:29 +01:00
Wojtek Figat
0cbb2f0525 Add smooth viewport orientation movement to Direction Gizmo
#3857
2026-03-25 17:39:03 +01:00
Wojtek Figat
0ac5e85cd9 Code cleanup #3857 2026-03-25 17:29:25 +01:00
Wojtek Figat
9b5dbe858c Merge branch 'direction-gizmo' of https://github.com/Tryibion/FlaxEngine into Tryibion-direction-gizmo 2026-03-25 17:24:57 +01:00
Wojtek Figat
914e0869b1 Fix warning when building C# lib with newer .NET than base version used on deps 2026-03-25 17:23:11 +01:00
Wojtek Figat
2c742bee41 Fix typo from #3914 2026-03-25 17:22:38 +01:00
Wojtek Figat
a9ac4d427f Merge branch 'xxSeys1-RadialMenuImprovements' 2026-03-25 17:21:24 +01:00
Wojtek Figat
0f332e331d Merge branch 'RadialMenuImprovements' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-RadialMenuImprovements 2026-03-25 17:21:20 +01:00
Wojtek Figat
be69453bfd Merge branch 'xxSeys1-OnlyCreateMaterialSlots' 2026-03-25 17:16:06 +01:00
Wojtek Figat
5e6723aa22 Fix missing init and serialization #2977 2026-03-25 17:16:01 +01:00
Wojtek Figat
c7449c8f95 Merge branch 'OnlyCreateMaterialSlots' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-OnlyCreateMaterialSlots
# Conflicts:
#	Source/Engine/Tools/ModelTool/ModelTool.h
2026-03-25 17:15:47 +01:00
Wojtek Figat
e23cbd1de9 Merge branch 'alsed-prefab_skinned' 2026-03-25 17:12:35 +01:00
Wojtek Figat
0fe297c390 Minor fixes to #3669
Don't change imported model type, only Prefab can do it conditionally.
Add type of `PrefabObject` to extend it in future with Cameras, Lights, etc.
2026-03-25 16:57:38 +01:00
Wojtek Figat
b10303cd8d Merge branch 'prefab_skinned' of https://github.com/alsed/FlaxEngine into alsed-prefab_skinned 2026-03-25 16:22:05 +01:00
Wojtek Figat
9e9715a2ea Merge branch 'xxSeys1-RipAppartAndConnectConnectionsVisject' 2026-03-25 15:52:19 +01:00
Wojtek Figat
a04995174f Merge branch 'RipAppartAndConnectConnectionsVisject' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-RipAppartAndConnectConnectionsVisject
# Conflicts:
#	Source/Editor/Surface/VisjectSurface.Input.cs
2026-03-25 15:49:46 +01:00
Wojtek Figat
e4a97258f3 Merge branch 'xxSeys1-NoClearSearchboxesWhenStuffHappens' 2026-03-25 15:47:31 +01:00
Wojtek Figat
912f5fb4f3 Merge branch 'NoClearSearchboxesWhenStuffHappens' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-NoClearSearchboxesWhenStuffHappens 2026-03-25 15:46:26 +01:00
Wojtek Figat
4d9898770a Attempt to fix Github Action issues 2026-03-25 15:45:51 +01:00
Wojtek Figat
508ccb714c Attempt to fix Github Action issues 2026-03-25 15:18:02 +01:00
Wojtek Figat
0c1da8e13b Attempt to fix Github Action issues 2026-03-25 15:02:58 +01:00
Wojtek Figat
d40573df5b Merge branch 'xxSeys1-FocusSelectedVJControls' 2026-03-25 15:00:00 +01:00
Wojtek Figat
707d19284d Merge branch 'FocusSelectedVJControls' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-FocusSelectedVJControls 2026-03-25 14:56:27 +01:00
Wojtek Figat
5a6b07e4c5 Merge branch 'xxSeys1-PackUnpackAlternativeNodeTitles' 2026-03-25 14:47:10 +01:00
Wojtek Figat
935645d553 Merge branch 'PackUnpackAlternativeNodeTitles' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-PackUnpackAlternativeNodeTitles 2026-03-25 14:44:32 +01:00
Wojtek Figat
d9f2931b9e Merge branch 'xxSeys1-VisjectFixes' 2026-03-25 14:43:31 +01:00
Wojtek Figat
0770f4a216 Merge branch 'VisjectFixes' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-VisjectFixes 2026-03-25 14:43:27 +01:00
Wojtek Figat
ecc9406968 Attempt to fix Github Action issues 2026-03-25 13:54:14 +01:00
Wojtek Figat
d06be3d1d6 Fix crash on invalid prefab data size
#3979
2026-03-25 13:45:21 +01:00
Wojtek Figat
aeecadffb0 Attempt to fix Github Action issues 2026-03-25 13:32:21 +01:00
Wojtek Figat
f3e23b6420 Attempt to fix Github Action issues 2026-03-25 12:45:06 +01:00
Wojtek Figat
7c5b1942e6 Fix MaterialBase::GetParameterValue when parameter is not overridden
#3965
2026-03-25 12:44:42 +01:00
Wojtek Figat
9850761b5c Fix crash when cloth sim is still active 2026-03-25 12:27:50 +01:00
Wojtek Figat
1e1f7ce56d Attempt to fix Github Action issues 2026-03-25 12:16:41 +01:00
Wojtek Figat
64005c2774 Attempt to fix Github Action issues 2026-03-25 09:49:38 +01:00
Wojtek Figat
22ad2d1fab Attempt to fix Github Action issues 2026-03-25 09:34:50 +01:00
Wojtek Figat
9d478b570f Attempt to fix Github Action issues 2026-03-25 09:11:26 +01:00
Wojtek Figat
35fb320ff0 Merge remote-tracking branch 'origin/master' into 1.12 2026-03-24 23:59:41 +01:00
Wojtek Figat
e000a6727e Fix format support on Vulkan 2026-03-24 23:58:01 +01:00
Wojtek Figat
3a3b997e97 Fix compilation regression 2026-03-24 23:46:21 +01:00
Wojtek Figat
f3c957481c Merge remote-tracking branch 'origin/master' into 1.12
# Conflicts:
#	Source/Editor/GUI/Dialogs/ColorPickerDialog.cs
#	Source/Editor/GUI/Dialogs/ColorSelector.cs
2026-03-24 23:41:58 +01:00
Wojtek Figat
e8134803c4 Fix invalid index buffer format returned by MeshAccessor when model is not yet loaded
#4017
2026-03-24 23:13:50 +01:00
Wojtek Figat
7b3cfd989f Add memory profiler category for Cloth 2026-03-24 23:01:09 +01:00
Wojtek Figat
13f5222ec7 Fix MeshAccessor to properly reference model asset data during the usage 2026-03-24 23:00:51 +01:00
Wojtek Figat
29abfbcdc9 Fix Cloth with models that use compressed vertex buffer
#4017
2026-03-24 22:59:21 +01:00
Wojtek Figat
a63e05d444 Fix Cloth to snap to the parent actor on spawn in Editor 2026-03-24 20:10:20 +01:00
Wojtek Figat
f0f1c57ff1 Add scrolling scene tree hierarchy to the newly spawned actor after drag and drop 2026-03-24 19:43:37 +01:00
Wojtek Figat
d2ef0671e3 Fix incorrect terrain debug buffers disposing 2026-03-24 19:32:17 +01:00
Wojtek Figat
5383de10b8 Merge branch 'xxSeys1-NewColorPicker' 2026-03-24 18:58:34 +01:00
Wojtek Figat
1318dde3ca Add new HSV wheel material, maintain Editor icons atlas for now
#3987
2026-03-24 18:58:32 +01:00
Wojtek Figat
90e96678a6 Merge branch 'NewColorPicker' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-NewColorPicker 2026-03-24 18:50:06 +01:00
Wojtek Figat
2e13c6043d Merge branch 'xxSeys1-FixedTimlineZoomAndAutoZoom' 2026-03-24 18:40:13 +01:00
Wojtek Figat
32d0241f54 Merge branch 'FixedTimlineZoomAndAutoZoom' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-FixedTimlineZoomAndAutoZoom 2026-03-24 18:35:23 +01:00
Wojtek Figat
e8fe1cd044 Merge branch 'xxSeys1-PhysicsSphereCullFix' 2026-03-24 18:34:33 +01:00
Wojtek Figat
956a9b8fab Merge branch 'PhysicsSphereCullFix' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-PhysicsSphereCullFix 2026-03-24 18:34:30 +01:00
Wojtek Figat
5732290c29 Merge branch 'ThePhantomMask-Fix-Dropdown' 2026-03-24 18:34:05 +01:00
Wojtek Figat
601b40dd86 Merge branch 'Fix-Dropdown' of https://github.com/ThePhantomMask/FlaxEngine into ThePhantomMask-Fix-Dropdown 2026-03-24 18:33:56 +01:00
Wojtek Figat
7f1add4bdd Fix missing Length in Vector4 2026-03-24 18:26:45 +01:00
Wojtek Figat
fa17d83501 Fix showing internal surface parameters (eg. Base Model in Anim Graph)
#3936
2026-03-24 18:25:40 +01:00
Wojtek Figat
99d3da467e Fix deadlock when hot-reloading scripts in Editor while Animation asset gets auto-saved
#3942
2026-03-24 17:45:06 +01:00
Wojtek Figat
b54794255a Fix .pch files rebuilds after MSVC toolchain updates 2026-03-24 17:14:30 +01:00
Wojtek Figat
ce5dd6bc16 Fix render image output flags when UAV is not supported 2026-03-24 17:00:26 +01:00
Wojtek Figat
45feda8f07 Fix Firefox and Safari bug with missing bind group layout 2026-03-24 16:59:49 +01:00
Wojtek Figat
bd4c20d9ce Add auto-converting unsupported GPU texture format at runtime (excluding compressed textures) 2026-03-24 15:57:50 +01:00
Wojtek Figat
cc89a1e1ca Add check for minimum browser version when running on Web 2026-03-24 15:23:33 +01:00
Wojtek Figat
df6b550c3d Add Web to engine build distro 2026-03-24 01:01:46 +01:00
Wojtek Figat
0cb5e3421a Revert "Optimize Visject native graph connections loading with less loops"
This reverts commit 1e44bb1832.
2026-03-24 00:31:22 +01:00
Wojtek Figat
4d5bf4ec0c Fix SSR with HiZ on WebGPU on Android device when R32_Float cannnot be sampled 2026-03-24 00:26:47 +01:00
Wojtek Figat
88fe9ba186 Fix WebGPU crashes when resizing canvas 2026-03-23 18:37:58 +01:00
Wojtek Figat
b756c16018 Add renaming underlying GPU resource (eg. for pooled render targets) 2026-03-23 18:37:18 +01:00
Wojtek Figat
1e44bb1832 Optimize Visject native graph connections loading with less loops 2026-03-23 18:29:01 +01:00
Wojtek Figat
3baec506e2 Optimize various initial pre-allocs to happen within memory tracing 2026-03-23 18:25:05 +01:00
Wojtek Figat
90a0cc0e03 Add warning about Web platform being not finished yet 2026-03-23 18:19:53 +01:00
Saas
a346e258d3 make "Flow" group archetype color more legible 2026-03-21 12:53:10 +01:00
Saas
c673e9f52d minor fixes 2026-03-20 20:18:12 +01:00
Saas
1bd86ca28b temporary fix for "Copy Node" node size 2026-03-20 20:17:10 +01:00
Saas
4594a84753 disable vertex snapping for Blend Points of Animation Blend 1D and 2D 2026-03-20 19:07:11 +01:00
Saas
a1af870874 fix surface elements resizing the node 2026-03-20 19:01:52 +01:00
Wojtek Figat
b8d5ea595e Optimize Web app a bit more 2026-03-18 23:22:45 +01:00
Wojtek Figat
5404dff5c2 Rebuild PhysX Vehicle lib for Web without dummy symbol export 2026-03-18 23:09:44 +01:00
Wojtek Figat
a5ec8565e4 Refactor WebGPU ASYNCIFY to use JSPI
Smaller build size and better performance. Also, link time goes down a lot
2026-03-18 23:08:39 +01:00
Saas
e5d526c9af show whole timeline when animation loads 2026-03-18 16:55:45 +01:00
Saas
cb9e09c21b fix Show whole timeline button 2026-03-18 16:55:35 +01:00
Wojtek Figat
750fd1f941 Optimize Web export size 2026-03-17 23:31:34 +01:00
Saas
1308465280 fix sphere with negative radius getting culled to early in physics collider debug draw 2026-03-17 22:02:36 +01:00
Wojtek Figat
a38633c453 Add basic WebThread impl 2026-03-16 23:03:02 +01:00
Wojtek Figat
3949cba83c Add Emscripten heap memory size and max limit stats to profiler 2026-03-16 22:29:19 +01:00
Wojtek Figat
e10d784e83 Add custom HTML shell template to Web export 2026-03-16 22:09:21 +01:00
Wojtek Figat
0f5c5dcf3e Fix memory issues on Web 2026-03-16 16:42:30 +01:00
Wojtek Figat
ed3a827b5f Implement GPUDeviceWebGPU::WaitForGPU 2026-03-16 16:41:39 +01:00
Wojtek Figat
7f49cae9af Optimize LOG() macro to use stack-allocated buffer for shorter texts 2026-03-16 16:41:16 +01:00
Wojtek Figat
427f4647fc Fix various issues in WebGPU backend 2026-03-16 16:39:18 +01:00
Saas
d5d10aa329 fix handling controls during resizing 2026-03-15 19:53:09 +01:00
Saas
5b2b1930d2 fix Particle Emitter node to not auto resize 2026-03-15 17:03:01 +01:00
Saas
5655cc8f42 account for surface node elements when auto resizing 2026-03-15 16:59:09 +01:00
Saas
8bad080d59 Merge remote-tracking branch 'upstream/master' into VISjectIsNowMoreVISuallyAppealingAndLegible 2026-03-15 14:43:11 +01:00
Saas
0237235dcb draw close button using Render2D to make it look good even when zoomed in a lot 2026-03-15 14:41:50 +01:00
Wojtek Figat
a5bbf0dbde Add option for experimental use of thread in Web
Might not run well in certain browsers, requires rebuilding all dependencies for Web with `pthread` enabled.
Disabled by default (for now).
2026-03-14 22:11:36 +01:00
Saas
5ec018b904 fix particle module changing size after certain user actions 2026-03-14 19:05:35 +01:00
Saas
f2a13b64d4 fix reroute node output box moving on connection change 2026-03-14 19:00:12 +01:00
Saas
44ecac7ffc make debug text more legible 2026-03-14 16:52:56 +01:00
Saas
60076d48c7 fix box alignment for nodes with fixed size and adjust some node sizes 2026-03-14 16:38:56 +01:00
Saas
2fbeac6077 disable decorator node shadows 2026-03-14 16:29:43 +01:00
Phantom
57355a741e Merge branch 'master' into Fix-Dropdown 2026-03-14 15:31:38 +01:00
Phantom
14d6273a2f fix #2 on Dropdown 2026-03-14 15:29:31 +01:00
Saas
0cec65f35f disable vertex snapping while drawing box to fix snapping artefacts when zooming surface 2026-03-14 14:46:10 +01:00
Saas
fcdd05dede fix straight connection sprite rotation offset at some angles 2026-03-14 14:20:30 +01:00
Saas
e008c7e2b4 fix behavior tree nodes 2026-03-14 14:20:00 +01:00
Wojtek Figat
f42a9a760a Adjust new Z Axis color in Transform 2026-03-13 23:27:21 +01:00
Wojtek Figat
80767d65ae Fix camera preview placement in editor preview when resizing window 2026-03-13 23:27:03 +01:00
Wojtek Figat
21b2e59fbb Fix ValueBox regression on mouse cursor hover 2026-03-13 23:26:03 +01:00
Wojtek Figat
5fb1ad078b Change default editor windows decorations in SDL on Windows to ClientSide for all windows 2026-03-13 23:23:36 +01:00
Wojtek Figat
1fc5316d12 Adjust new Z Axis color in Transform 2026-03-13 23:21:30 +01:00
Wojtek Figat
1ceb781903 Fix camera preview placement in editor preview when resizing window 2026-03-13 23:21:08 +01:00
Saas
d3891688f0 fix boxes positioning and remove unused constants 2026-03-13 21:59:53 +01:00
Phantom
f876068086 Fix Text Color Highlighted 2026-03-13 20:09:57 +01:00
Wojtek Figat
6ae68bc6cc Add PhysX and NvCloth to Web 2026-03-13 17:49:11 +01:00
Wojtek Figat
a8e7faec3c Add default icon to Web exported files 2026-03-13 10:21:42 +01:00
Wojtek Figat
ab6e291976 Update file 2026-03-13 10:21:26 +01:00
Wojtek Figat
2cb12e3c0f Add SIMD support to Web with SSE4.2 2026-03-13 10:21:21 +01:00
Wojtek Figat
c91c209974 Build msdfgen for Web and Consoles 2026-03-13 09:55:49 +01:00
Wojtek Figat
45a8d82a83 Merge remote-tracking branch 'origin/master' into 1.12
# Conflicts:
#	Content/Shaders/GI/DDGI.flax
#	Content/Shaders/GUI.flax
#	Flax.flaxproj
#	Source/Editor/Windows/AboutDialog.cs
#	Source/Engine/Serialization/Stream.cpp
#	Source/Shaders/GUICommon.hlsl
2026-03-13 08:09:16 +01:00
Wojtek Figat
b41d25cbce Add msdfgen build for iOS and Mac 2026-03-13 00:12:07 +01:00
Wojtek Figat
3d201ec73f Add msdfgen build for Linux 2026-03-12 23:56:50 +01:00
Wojtek Figat
fa91e3e3ab Update asset 2026-03-12 23:32:37 +01:00
Wojtek Figat
38c87c158a Merge branch 'ThePhantomMask-Improve-HighlightedPopUpColor' 2026-03-12 22:54:54 +01:00
Wojtek Figat
241d37130a Merge branch 'Improve-HighlightedPopUpColor' of https://github.com/ThePhantomMask/FlaxEngine into ThePhantomMask-Improve-HighlightedPopUpColor 2026-03-12 22:54:34 +01:00
Wojtek Figat
21981f666f Merge branch 'fibref-flax-msdf-font' 2026-03-12 22:52:49 +01:00
Wojtek Figat
afe917a7f3 Improve e7016564b1 to reduce recompilation on commit changes 2026-03-12 22:51:29 +01:00
Wojtek Figat
d2a03b90ec Add another utility 2026-03-12 22:50:54 +01:00
Wojtek Figat
88587fb6a4 Add utility function to GUICommon.hlsl for MSDF fonts sampling in shaders
#3944
2026-03-12 20:24:03 +01:00
Phantom
895758d27d Merge branch 'master' into Improve-HighlightedPopUpColor 2026-03-12 17:34:46 +01:00
Wojtek Figat
48d86ac7ae Update engine assets 2026-03-12 17:23:39 +01:00
Wojtek Figat
bc3cddc774 Build msdfgen for Windows and Android with a minor cleanup for a build script
#3944
2026-03-12 17:23:29 +01:00
Wojtek Figat
d784fddf95 Code style cleanup for #3944 2026-03-12 17:22:43 +01:00
Wojtek Figat
fc7abbf541 Merge branch 'flax-msdf-font' of https://github.com/fibref/FlaxEngine into fibref-flax-msdf-font 2026-03-12 16:25:55 +01:00
Wojtek Figat
8b4f8de988 Fix Control.LocalLocation to use parent control GetDesireClientArea rather than Bounds
#3889
2026-03-12 15:27:31 +01:00
Wojtek Figat
549ed76e7c Add warning when importing texture that is non-power-of-two and cannot generate mip maps 2026-03-12 14:32:11 +01:00
Wojtek Figat
e7016564b1 Add Git repository branch name and commit hash injection into generated code module metadata 2026-03-12 14:27:34 +01:00
Wojtek Figat
8318a9c1d0 Fix crash when unloading scene during tick of that scene 2026-03-12 13:39:01 +01:00
Phantom
6b1490dac4 Merge branch 'master' into Improve-HighlightedPopUpColor 2026-03-12 12:26:26 +01:00
Wojtek Figat
5c51652e16 Merge branch 'xxSeys1-NewActorAndUiTransformEditorSkin' 2026-03-12 11:26:28 +01:00
Wojtek Figat
6736f2f77a Merge branch 'NewActorAndUiTransformEditorSkin' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-NewActorAndUiTransformEditorSkin 2026-03-12 11:07:48 +01:00
Wojtek Figat
ab685ccc8c Merge branch 'Tryibion-remove-ui-move-size' 2026-03-12 11:06:46 +01:00
Wojtek Figat
b5d841ffc9 Use total rotation from #3758 in #3760 2026-03-12 11:06:42 +01:00
Wojtek Figat
cb17bcd2ff Merge branch 'remove-ui-move-size' of https://github.com/Tryibion/FlaxEngine into Tryibion-remove-ui-move-size 2026-03-12 11:03:51 +01:00
Wojtek Figat
f17b7b3c79 Merge branch 'Tryibion-better-handle-rot' 2026-03-12 10:53:00 +01:00
Wojtek Figat
1374a0440b Merge branch 'better-handle-rot' of https://github.com/Tryibion/FlaxEngine into Tryibion-better-handle-rot 2026-03-12 10:49:52 +01:00
Wojtek Figat
7fa40eba83 Fix Render2D.DrawRectangle to avoid alpha overdraw on the corners when thickness is large 2026-03-12 10:10:47 +01:00
Wojtek Figat
62e492452d Add UI editor grid toggle 2026-03-12 09:26:23 +01:00
Wojtek Figat
30d7588d9c Fix UI panel controls missing in Editor 2026-03-12 08:53:30 +01:00
Wojtek Figat
e736048fab Ensure probe count is never out of bounds
#3963
2026-03-12 08:41:06 +01:00
Wojtek Figat
14e59281e4 Merge branch 'Tryibion-fix-inverse-squ-light' 2026-03-12 00:00:31 +01:00
Wojtek Figat
895dcf4aa6 Add auto-converting old point/spot lights brightness when using Inverse Squared Falloff to match new shader math
#3907
2026-03-12 00:00:28 +01:00
Wojtek Figat
6d9d606085 Add UNITS_TO_METERS_SCALE to shader sources for world units scale
#3907
2026-03-11 23:56:47 +01:00
Wojtek Figat
a94b9f9426 Merge branch 'fix-inverse-squ-light' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-inverse-squ-light 2026-03-11 23:35:19 +01:00
Wojtek Figat
ace84ae29f Add limit to max DDGI cascade updates per-frame to 2
#3963
2026-03-11 23:31:44 +01:00
Wojtek Figat
22c88eb59d Fix blocky terrain SDF
#3975
2026-03-11 19:25:18 +01:00
Wojtek Figat
96bbae8e28 Fix Global SDF update when changing Draw Modes of the model
Refactor `DrawModes` field in `StaticModel` and `FoliageType` into property with getter/setter

#3949
2026-03-11 16:01:56 +01:00
Wojtek Figat
479c5f896c Fix MeshAccelerationStructure to use MeshAccessor for proper mesh format access
#3984
2026-03-11 13:43:26 +01:00
Wojtek Figat
0d3642f39d Merge branch 'Tryibion-text-box-allow-char' 2026-03-11 09:39:15 +01:00
Wojtek Figat
e47e1998a1 Merge branch 'text-box-allow-char' of https://github.com/Tryibion/FlaxEngine into Tryibion-text-box-allow-char 2026-03-11 09:39:10 +01:00
Wojtek Figat
62492c7607 Fix importing file when target location already exists
#3579
2026-03-11 09:38:49 +01:00
Chandler Cox
c3aecc1a11 Add allowable characters enum to text box 2026-03-10 19:47:09 -05:00
Phantom
6629ead842 Merge branch 'master' into Improve-HighlightedPopUpColor 2026-03-11 01:22:58 +01:00
Wojtek Figat
14dd70fb3d Merge branch 'xxSeys1-SplineEditorImprovements' 2026-03-10 22:59:22 +01:00
Wojtek Figat
2000a95fa7 Merge branch 'SplineEditorImprovements' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-SplineEditorImprovements 2026-03-10 22:58:02 +01:00
Wojtek Figat
68ac2f4c79 Merge branch 'GoaLitiuM-lastproject' 2026-03-10 22:49:53 +01:00
Wojtek Figat
05aaf0dc99 Merge branch 'lastproject' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-lastproject 2026-03-10 22:49:46 +01:00
Wojtek Figat
f33db8647a Merge branch 'xxSeys1-DoubleClickSplitterToReset' 2026-03-10 22:35:03 +01:00
Wojtek Figat
0ade65036e Merge branch 'DoubleClickSplitterToReset' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-DoubleClickSplitterToReset 2026-03-10 22:29:07 +01:00
Wojtek Figat
b8bb40fcf8 Merge branch 'GoaLitiuM-codeeditor_fixes' 2026-03-10 22:22:10 +01:00
Wojtek Figat
0d133cfbdc Minor fixes to #3870 2026-03-10 22:22:02 +01:00
Wojtek Figat
337fea0f69 Merge branch 'codeeditor_fixes' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-codeeditor_fixes 2026-03-10 22:09:28 +01:00
Wojtek Figat
ee23196548 Merge branch 'GoaLitiuM-editor_load_scene_state_fix' 2026-03-10 22:03:10 +01:00
Wojtek Figat
394dc31bb0 Merge branch 'editor_load_scene_state_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-editor_load_scene_state_fix 2026-03-10 22:03:07 +01:00
Wojtek Figat
deadb6f6d0 Merge branch 'Tryibion-loop-behavior' 2026-03-10 21:53:45 +01:00
Wojtek Figat
a6c6be9c2e Merge branch 'loop-behavior' of https://github.com/Tryibion/FlaxEngine into Tryibion-loop-behavior 2026-03-10 21:53:41 +01:00
Wojtek Figat
93a38566ea Merge branch 'xxSeys1-NewOrthoPerspectiveToggle' 2026-03-10 21:13:41 +01:00
Wojtek Figat
2a2f046f30 Don't snap vertices in camera projection icon for better quality #3875 2026-03-10 21:13:36 +01:00
Wojtek Figat
73b4b0dcee Merge branch 'NewOrthoPerspectiveToggle' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-NewOrthoPerspectiveToggle 2026-03-10 20:02:30 +01:00
Wojtek Figat
b930ae0ca9 Merge branch 'Tryibion-req-actor-inherited-type' 2026-03-10 20:01:41 +01:00
Wojtek Figat
8cdb6d77ab Merge branch 'req-actor-inherited-type' of https://github.com/Tryibion/FlaxEngine into Tryibion-req-actor-inherited-type 2026-03-10 20:01:37 +01:00
Wojtek Figat
afc4d0f3d3 Add Dead Zone to virtual input action for better usage with gamepad sticks/triggers
#3660
2026-03-10 19:58:50 +01:00
Wojtek Figat
3bbaa7025a Fix crash when destroying actor that was left in enabled state
#3880
2026-03-10 17:01:57 +01:00
Wojtek Figat
5509bc4989 Add option to render Canvas into GPUTexture
#3601
2026-03-10 16:29:39 +01:00
Wojtek Figat
3cfa110a48 Merge remote-tracking branch 'origin/master' into 1.12
# Conflicts:
#	Source/Editor/Options/InterfaceOptions.cs
#	Source/Engine/Audio/OpenAL/AudioBackendOAL.cpp
#	Source/Engine/Graphics/Graphics.cpp
#	Source/Engine/GraphicsDevice/Vulkan/CmdBufferVulkan.cpp
#	Source/Engine/GraphicsDevice/Vulkan/CmdBufferVulkan.h
#	Source/Engine/GraphicsDevice/Vulkan/Config.h
#	Source/Engine/GraphicsDevice/Vulkan/GPUDeviceVulkan.cpp
#	Source/Engine/GraphicsDevice/Vulkan/GPUDeviceVulkan.h
#	Source/Engine/GraphicsDevice/Vulkan/QueueVulkan.cpp
2026-03-10 15:08:43 +01:00
Wojtek Figat
1ab3917332 Merge remote-tracking branch 'origin/1.12' into 1.12 2026-03-10 14:59:33 +01:00
Wojtek Figat
2fb1e5bef7 Merge branch 'alsed-linux_dds_support' into 1.12 2026-03-10 14:44:18 +01:00
Wojtek Figat
a4cb839c6f Minor fixes to #3637 2026-03-10 14:43:57 +01:00
Wojtek Figat
3b1960b977 Merge branch 'linux_dds_support' of https://github.com/alsed/FlaxEngine into alsed-linux_dds_support 2026-03-10 14:39:54 +01:00
Wojtek Figat
116f15f4ae Merge branch 'Tryibion-script-recycle' into 1.12 2026-03-10 14:16:11 +01:00
Wojtek Figat
a0bb8efc2b Adjustment for deleteFileSafety in #3992 2026-03-10 14:16:08 +01:00
Wojtek Figat
90ffc4e5f9 Merge branch 'script-recycle' of https://github.com/Tryibion/FlaxEngine into Tryibion-script-recycle 2026-03-10 14:13:25 +01:00
Wojtek Figat
bf11575346 Merge commit 'ee38f8856229595aee6a1d79020c479605dfa66b' into 1.12 2026-03-10 13:31:20 +01:00
Wojtek Figat
8dc8371a7f Fix headless mode on Linux 2026-03-10 13:30:43 +01:00
Wojtek Figat
ee38f88562 Ensure to fail Github Action test on Linux when gdb detects the crash 2026-03-10 13:23:51 +01:00
Wojtek Figat
e90de5d815 Add gdb package 2026-03-10 13:00:03 +01:00
Wojtek Figat
7fe7a8dd0e Typo 2026-03-10 12:41:35 +01:00
Wojtek Figat
8afc25b19c Attempt to get crash info on Linux Test failure due to segmentation fault 2026-03-10 12:35:28 +01:00
Wojtek Figat
37a39e750f Attempt to fix Linux headless Test run with SDL 2026-03-10 11:25:22 +01:00
Wojtek Figat
59a9137a54 Fix Github Actions 2026-03-10 10:49:33 +01:00
Phantom
f4c1e81f64 Merge branch 'master' into Improve-HighlightedPopUpColor 2026-03-09 18:56:30 +01:00
Wojtek Figat
7391af1c37 Merge branch 'xxSeys1-ObsoleteInScriptsEditor' 2026-03-08 22:47:02 +01:00
Wojtek Figat
c376f220ca Minor adjustments to #3846 2026-03-08 22:46:53 +01:00
Wojtek Figat
5ce0a1535f Merge branch 'ObsoleteInScriptsEditor' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-ObsoleteInScriptsEditor
# Conflicts:
#	Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs
2026-03-08 22:40:35 +01:00
Wojtek Figat
06bf9def8e Merge branch 'xxSeys1-CopyParameterNames' 2026-03-08 22:37:23 +01:00
Wojtek Figat
57489abc3a Minor adjustment to #3934 2026-03-08 22:37:17 +01:00
Wojtek Figat
200aca93d3 Merge branch 'CopyParameterNames' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-CopyParameterNames 2026-03-08 22:33:19 +01:00
Wojtek Figat
f8eae517f0 Merge branch 'xxSeys1-ClearerParticleAgeNodes' 2026-03-08 22:25:24 +01:00
Wojtek Figat
3a651bc660 Merge branch 'ClearerParticleAgeNodes' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-ClearerParticleAgeNodes 2026-03-08 22:25:20 +01:00
Wojtek Figat
4b7828f686 Merge branch 'xxSeys1-CreateAssetOptions' 2026-03-08 22:21:56 +01:00
Wojtek Figat
befb74297a Merge branch 'CreateAssetOptions' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-CreateAssetOptions 2026-03-08 22:19:07 +01:00
Wojtek Figat
c0e16cd34a Merge branch 'xxSeys1-PreSkinningVertexPosMoreClear' 2026-03-08 22:13:34 +01:00
Wojtek Figat
e710a6e2d1 Adjust naming 2026-03-08 22:13:31 +01:00
Wojtek Figat
c378cd1d47 Merge branch 'PreSkinningVertexPosMoreClear' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-PreSkinningVertexPosMoreClear 2026-03-08 22:08:50 +01:00
Wojtek Figat
cd74b300f1 Merge branch 'Tryibion-textbox-max' 2026-03-08 22:07:56 +01:00
Wojtek Figat
26cd07933e Another attempt 2026-03-08 00:04:18 +01:00
Wojtek Figat
c4342b0a20 Add SPIR-V compression with LZ4 of Vulkan shaders (35% avg smaller) 2026-03-07 23:24:40 +01:00
Wojtek Figat
3038c56af4 Attempt to fix iOS cooking issue on Linux 2026-03-07 23:18:03 +01:00
Wojtek Figat
3dc3e25649 Fix deprecation warnings 2026-03-07 23:17:42 +01:00
Wojtek Figat
e7071fbe43 Dummy attempt get more info about segmentation fault 2026-03-07 23:17:21 +01:00
Wojtek Figat
01670ec6ae Attempt to fix Github Action on Linux Tests 2026-03-07 22:41:07 +01:00
Chandler Cox
4d4571ee55 Allow -1 for Max textbox length
Allow -1 to be "no" length or max length. add bottom limit of -1.
2026-03-06 20:02:24 -06:00
Chandler Cox
83bbb4f6ba Add recycle bin to script deleting. 2026-03-06 19:39:49 -06:00
Wojtek Figat
a406d6dba2 Disable running native Linux tests until it's fixed (Windows will be enough) and compile just for Large Worlds on Linux to test it 2026-03-07 00:34:40 +01:00
Wojtek Figat
72bd624384 Fix creating textures when running in headless/null mode 2026-03-07 00:32:26 +01:00
Wojtek Figat
82a02698df Fix boolean command line parsing from int 2026-03-07 00:07:41 +01:00
Wojtek Figat
befac36a4f Check for SDL on Linux that is breaking tests, add missing file for Web libs 2026-03-06 23:41:41 +01:00
Wojtek Figat
1282dffca9 Add packages to other Github Actions on Linux that are used by Editor 2026-03-06 20:23:36 +01:00
Wojtek Figat
b291cd93c3 Fix libportal include path and glib include path on Ubuntu 22 2026-03-06 20:04:34 +01:00
Wojtek Figat
28257296b9 Enable Web builds on Linux 2026-03-06 17:57:43 +01:00
Wojtek Figat
164e380672 Merge branch '1.12' of https://gitlab.flaxengine.com/flax/flaxengine into 1.12 2026-03-06 17:40:00 +01:00
Wojtek Figat
438a9e4c3d Merge remote-tracking branch 'origin/1.12' into 1.12 2026-03-06 17:35:22 +01:00
Wojtek Figat
5942209114 Add basis lib for Web 2026-03-06 17:35:08 +01:00
Wojtek Figat
06788055fe Rebuild vorbis and ogg libs for Linux 2026-03-06 16:42:41 +01:00
Wojtek Figat
26838609db Build Linux deps 2026-03-06 16:29:47 +01:00
Wojtek Figat
b408a8ce21 Fix WebGPU in non-Debug builds 2026-03-06 14:45:00 +01:00
Wojtek Figat
6fcc963cf6 Cleanup dependency modules code a bit 2026-03-06 12:20:16 +01:00
Wojtek Figat
0fa3472f24 Refactor Texture Data function to be reusable 2026-03-06 11:40:43 +01:00
Wojtek Figat
c0056f3d9d Fix running Editor or Game target with console on Windows 2026-03-06 11:11:45 +01:00
Wojtek Figat
b8fcb51aa3 Fix loading cube texture import settings 2026-03-06 11:10:58 +01:00
Wojtek Figat
341dc08f7c Fix dependencies building to check for target platform build support, not the host platform 2026-03-06 11:10:40 +01:00
Wojtek Figat
f0873411df Minor fix for Web no threads 2026-03-06 11:10:13 +01:00
Wojtek Figat
94789712e8 Add basis_universal support for textures on Web
Add implementation for loading interchange texture formats with multiple runtime formats support
2026-03-06 11:09:29 +01:00
Saas
d163064f95 fix hv wheel selector 2026-03-05 20:33:18 +01:00
Saas
64c2d64d84 increase distante for slot into connection feature 2026-03-05 20:14:48 +01:00
Saas
a9c510c296 tweak some group archetype colors 2026-03-05 19:49:29 +01:00
Saas
1ef35c3f94 clear up naming of "Pre-skinning Local Vertex Pos" 2026-03-04 23:57:21 +01:00
Saas
23c3edcab9 small cleanup 2026-03-04 23:37:33 +01:00
Saas
2c98d80506 fix node auto resizing 2026-03-04 23:15:09 +01:00
Wojtek Figat
ac36840037 Add basic options for texture compression on Web 2026-03-04 22:49:15 +01:00
Phantom
dfdcd47ad7 Merge branch 'master' into Improve-HighlightedPopUpColor 2026-03-04 22:33:45 +01:00
Wojtek Figat
414c650550 Fixes for WebGPU 2026-03-04 22:00:50 +01:00
Wojtek Figat
2d9ca4c335 Skip threaded physics actors update when single-threaded mode 2026-03-04 21:30:31 +01:00
Wojtek Figat
6c19996f95 Update engine assets 2026-03-04 21:28:01 +01:00
Wojtek Figat
377d5c00aa Add Compute shaders support to WebGPU 2026-03-04 21:27:42 +01:00
Saas
93ca9f1cb0 Merge remote-tracking branch 'upstream/master' into VISjectIsNowMoreVISuallyAppealingAndLegible 2026-03-04 19:12:11 +01:00
Saas
c62b3f7624 improve color picker layout and accept color behaviour
- Color will accept on close dialog or focus loss
- Color will cancel on ESC press
- Increased saved colors count from 8 to 10
- Moved RGB and HSV into tabbed interface
- Moved eyedropper icon
- Removed "Auto Accept Color Picker Change" option since there are no "Cancel" or "OK" button anymore
- Made sure to reset cursor type when the color picker is closed
2026-03-04 17:53:27 +01:00
Wojtek Figat
5fb9cf3be1 Fix shadows from wireframe materials 2026-03-04 16:55:45 +01:00
Wojtek Figat
ceebc68d18 Add ShaderProfileFeatures for more expendable shader feature sets 2026-03-04 16:55:04 +01:00
Saas
66b4c64f98 polish sliders and wheel
- Hide mouse cursor when clicking on wheel or sliders
- Move mouse position to knob position when letting go of slider or wheel
- Show mouse again when letting go of slider or wheel (obviously)
- Provide some visual feedback when the clicks on the wheel or sliders
- Make sliders wider
- Add alpha grid background to alpha slider
2026-03-04 15:17:47 +01:00
Wojtek Figat
aff8090adb Add LZ4 compression to WebGPU shaders 2026-03-04 09:15:53 +01:00
Wojtek Figat
cee1b72f2f Fix regression from 7b7a92758f
#3932
2026-03-04 00:02:06 +01:00
Saas
b9b11b3c2a loop Hue value box 2026-03-03 23:49:16 +01:00
Saas
feca1c7994 replace HW with material instead of sprite 2026-03-03 23:44:24 +01:00
Wojtek Figat
bd39e449d7 Merge branch 'Tryibion-fix-kin-call' 2026-03-03 23:41:45 +01:00
Wojtek Figat
836e1d4f39 Merge branch 'fix-kin-call' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-kin-call 2026-03-03 23:41:41 +01:00
Wojtek Figat
792393345d Merge branch 'xxSeys1-CaretBlinkSpeedTweak' 2026-03-03 23:32:13 +01:00
Wojtek Figat
66be7ebc50 Merge branch 'CaretBlinkSpeedTweak' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-CaretBlinkSpeedTweak 2026-03-03 23:32:10 +01:00
Wojtek Figat
f8b161c04e Merge branch 'GoaLitiuM-string_ref_temp' 2026-03-03 23:30:33 +01:00
Wojtek Figat
bac361baf6 Merge branch 'string_ref_temp' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-string_ref_temp 2026-03-03 23:30:20 +01:00
Wojtek Figat
10bcf9c9a3 Fix Vulkan timeout to be larger (5s)
#3967
2026-03-03 23:29:10 +01:00
Wojtek Figat
075727ab53 Merge branch 'envision3d-patch-1' into 1.12 2026-03-03 23:12:19 +01:00
Wojtek Figat
5a4e94d263 Merge branch 'patch-1' of https://github.com/envision3d/FlaxEngine into envision3d-patch-1 2026-03-03 23:12:15 +01:00
Wojtek Figat
ad3c2be510 Add timer and occlusion queries support to WebGPU 2026-03-03 21:35:42 +01:00
Wojtek Figat
5641bf63e8 Add validation of adapter limits for WebGPU 2026-03-03 16:03:14 +01:00
Wojtek Figat
79a17d8fe3 Add message box to Web via alert 2026-03-03 15:01:36 +01:00
Wojtek Figat
6814a43418 Various changes for WebGPU and hardware instancing support 2026-03-03 14:51:15 +01:00
Wojtek Figat
6891256afe Fix mouse cursor lock regression in cooked game 2026-03-03 10:51:38 +01:00
Wojtek Figat
17b097b1a3 Update engine materials and shaders 2026-03-03 10:30:20 +01:00
Wojtek Figat
a96c7e631e Fix some material nodes on WebGPU 2026-03-03 10:29:29 +01:00
Wojtek Figat
9df5da2a88 Fix compilation warnings from a925c7410a 2026-03-03 10:25:57 +01:00
Wojtek Figat
3e63551e90 Fix hashing pinter on 32-bit systems 2026-03-03 09:48:45 +01:00
Wojtek Figat
2a426e2812 Optimize AtmospherePreCompute to reduce memory usage after sky cache LUTs are rendered 2026-03-03 09:48:29 +01:00
Wojtek Figat
c4f4983f6d Add WebGPU bind groups caching 2026-03-03 09:47:59 +01:00
Wojtek Figat
a925c7410a Deprecate old GPU limits 2026-03-03 08:36:35 +01:00
Chandler Cox
f7e2f3a4d5 Only set kinematic target if rigid body has kinematic flag. 2026-03-02 19:20:15 -06:00
Wojtek Figat
b1befacb84 Fix material templates for WebGPU 2026-03-02 23:06:14 +01:00
Wojtek Figat
23ebb0e754 Fix particles on WebGPU to respect format support flags properly 2026-03-02 23:06:01 +01:00
5f9e8dedec Pass String reference values via temporary values 2026-03-02 23:40:41 +02:00
Wojtek Figat
3b2015e816 Fix creating new particle system or scene animation assets after deprecated code removal 2026-03-02 20:47:57 +01:00
Wojtek Figat
f1e851e1b8 Fix WebGPU by moving user to Australia 2026-03-02 20:37:11 +01:00
Wojtek Figat
b191d3918e Fix rendering various visuals on WebGPU 2026-03-02 20:36:33 +01:00
Saas
db46050b16 tweak caret blink speed 2026-03-01 11:01:55 +01:00
Chandler Cox
24a11ac2a8 Add tree view mode for content window. 2026-02-28 12:38:07 -06:00
fibref
1cf69361a1 fix MSDF font alignment 2026-02-28 10:13:03 +08:00
envision3d
689fab2ba4 add linux platform case to fix build 2026-02-26 16:46:46 -06:00
Wojtek Figat
b36c757753 Fix WebGPU error when sampling depth texture in shader which requires explicit UnfilterableFloat sampler type 2026-02-26 16:59:25 +01:00
Wojtek Figat
63f19aa4d6 Fix minor issues 2026-02-26 15:52:41 +01:00
Wojtek Figat
8728d88dde Fix vertex layouts binding to match vertex shader inputs on WebGPU 2026-02-26 15:50:36 +01:00
Wojtek Figat
f6888b099e Add cubemap and texture arrays copy/update in WebGPU 2026-02-26 13:27:35 +01:00
Wojtek Figat
239ceb75a9 Fix binding various resources to shaders in WebGPU 2026-02-26 12:23:07 +01:00
Wojtek Figat
20c9ed27fb Add sampler slots usage and inputs/outputs count to GPU shader program bindings meta 2026-02-26 12:02:52 +01:00
Wojtek Figat
ac4526744a Add GPU profile events to WebGPU and use the by default in non-Release builds 2026-02-26 11:08:12 +01:00
Wojtek Figat
d2a8ac54cf Fix depth stencil view format when binding to shader to use depth-only aspect but still render to both 2026-02-26 11:07:19 +01:00
Wojtek Figat
153b16ebd7 Add various graphics improvements 2026-02-25 18:23:49 +01:00
Wojtek Figat
b535791c66 Implement bind groups in WebGPU to provide resources to shaders 2026-02-25 18:22:55 +01:00
Phantom
6ed7e8fa40 Merge branch 'master' into Improve-HighlightedPopUpColor 2026-02-25 17:26:20 +01:00
Wojtek Figat
9d95bbaa8c Add GPU data upload allocator with shared page pool 2026-02-24 23:18:07 +01:00
Wojtek Figat
e41ec4ebfd Add verbosity level to platform log for better integration with Web and Android platforms 2026-02-24 20:09:09 +01:00
Wojtek Figat
195d5b1aa2 Fixes and missing changes 2026-02-24 17:59:42 +01:00
Wojtek Figat
7ea3fb1500 Fix shaders codebase to compile into WGSL 2026-02-24 17:56:14 +01:00
Wojtek Figat
9be8589437 Add shader compiler for WebGPU
Use existing Vulkan compiler to generate SPIR-V and convert it into WGSL with tint compiler
https://github.com/google/dawn/releases/tag/v20260219.200501
2026-02-24 17:55:26 +01:00
Wojtek Figat
ff81d339ef Fix missing doppler factor in cooked game with OpenAL backend
#3959
2026-02-23 17:24:59 +01:00
Wojtek Figat
7858225565 Update docs for #3948 2026-02-23 17:19:14 +01:00
Wojtek Figat
83bd1deafd Optimize shadow maps rendering by using new Graphics.Shadows.MinObjectPixelSize to skip sub-pixel objects 2026-02-23 16:53:17 +01:00
Wojtek Figat
9158e1c270 Improve stack trace printing when module name is not provided 2026-02-23 11:51:15 +01:00
Wojtek Figat
f0d182771d Add missing define 2026-02-23 11:50:44 +01:00
Wojtek Figat
6081ed35bc Add initial base implementation for WebGPU rendering backend 2026-02-23 11:49:45 +01:00
Wojtek Figat
4ca10c7869 Fix mouse position on Web to match canvas coordinates, not entire window 2026-02-22 22:05:13 +01:00
Wojtek Figat
9fc31b1021 Run Web main loop at vsync to avoid browser throttling
This could be customized in future (depending on VSync usage).
2026-02-20 23:51:05 +01:00
Wojtek Figat
366a5162b7 DIsable screensaver blocking via SDL in Editor 2026-02-20 23:50:13 +01:00
Wojtek Figat
6fd58c418e Fixes and updates to graphics api 2026-02-20 23:49:49 +01:00
Wojtek Figat
08d9ae0ae6 Add callstack capturing on Web platform 2026-02-20 23:47:30 +01:00
Wojtek Figat
27eb53e1a1 Fix web window to maintain canvas size on start 2026-02-20 23:47:01 +01:00
Wojtek Figat
31b5685251 Add GPU_ENABLE_PRELOADING_RESOURCES and use it on Web/Android/iOS to reduce engine resources preloading 2026-02-20 23:45:56 +01:00
Wojtek Figat
894cf2c886 Fix missing JS symbols in Web build of the main module 2026-02-20 23:44:20 +01:00
Wojtek Figat
5b3079acde Fix texture GPU resource debug name in non-Release game builds to match the path in project 2026-02-20 23:43:29 +01:00
fibref
0f49503abd add native MSDF font support for Render2D 2026-02-19 15:41:48 +08:00
fibref
be4e1edc3e fix flipped color of MSDF fonts 2026-02-19 15:12:25 +08:00
Wojtek Figat
1982694ef0 Fix Release build for Web 2026-02-17 19:07:43 +01:00
Wojtek Figat
8b475e9f54 Restore profiler for Web for engine stats in non-Release builds 2026-02-17 18:50:24 +01:00
Wojtek Figat
2b546eb4b3 Add OpenAL audio to Web 2026-02-17 18:43:52 +01:00
Wojtek Figat
69cefb6822 Fix miliseconds in date on Emscripten and skip SDL create process (unsupported) 2026-02-17 15:07:42 +01:00
Wojtek Figat
9772227146 Add shared libraries support for Web to load game module (C++) 2026-02-17 15:07:11 +01:00
Wojtek Figat
34bddc7db1 Minor fix 2026-02-17 13:43:54 +01:00
Wojtek Figat
7ff4ce18ff Add web platform icons to editor atlas 2026-02-17 13:21:00 +01:00
Wojtek Figat
6e7a7c9350 Fix Screen.CursorLock in Editor to skip when viewport is unfocused 2026-02-17 11:46:20 +01:00
Wojtek Figat
2a9c6bbd1d Refactor engine main loop to allow external stepping in Web 2026-02-16 22:32:02 +01:00
Wojtek Figat
0835a6559c Fix Web build issues 2026-02-16 21:31:12 +01:00
Wojtek Figat
489c4a3661 Add packaging game files and bundling them into final Web app 2026-02-16 17:41:43 +01:00
Wojtek Figat
43dca143fa Add env vars impl to Web platform 2026-02-16 16:11:12 +01:00
Wojtek Figat
6bd13feba6 Add various fixes 2026-02-16 16:11:00 +01:00
Wojtek Figat
d1557e5292 Add support for running engine with a single-thread only (content, jobs, drawing, physics) 2026-02-16 16:10:31 +01:00
fibref
c9fbafe014 Merge branch 'FlaxEngine:master' into flax-msdf-font 2026-02-16 22:48:19 +08:00
fibref
0612b923e1 fix msdf font layout issue 2026-02-16 19:52:12 +08:00
Wojtek Figat
6f13a33be2 Add LTO and Sanitizers support to Web build 2026-02-16 12:00:24 +01:00
Wojtek Figat
4ccf969f7a Add various fixes for Web 2026-02-16 11:59:44 +01:00
Wojtek Figat
3d206e06d0 Fix ThreadLocal when thread count limit is low on a target platform or if it's only main-thread 2026-02-16 11:59:12 +01:00
Wojtek Figat
25e90deed6 Fix Web (and consoles) to run without exceptions throw/catch support 2026-02-16 11:50:52 +01:00
Wojtek Figat
7bc687194f Fix Web to run without dotnet 2026-02-16 11:49:34 +01:00
fibref
d3bd377264 update msdfgen 2026-02-16 11:04:22 +08:00
fibref
974c55418b fix msdfgen build on Linux (Mac not tested) 2026-02-15 20:35:34 +08:00
Saas
0870a86a3a remove non parameters from parameter list 2026-02-14 18:56:58 +01:00
Saas
dd2e2c5b3a add some utility for copying parameter names to parameter right click menu 2026-02-14 18:35:13 +01:00
fibref
75a1b14beb initial support for MSDF font 2026-02-14 22:12:26 +08:00
Wojtek Figat
8a760dc1e2 Fix typo 2026-02-14 00:07:41 +01:00
Wojtek Figat
fc0b885a14 Fix missing Length in Vector4 2026-02-14 00:07:34 +01:00
Wojtek Figat
f12ad5c874 Add **Web platform with Emscripten** 2026-02-14 00:07:21 +01:00
Wojtek Figat
fd0584b406 Fix build regression from 865a26cbbe 2026-02-12 22:03:13 +01:00
Wojtek Figat
374f6e40bb Merge remote-tracking branch 'origin/1.12' into 1.12 2026-02-12 20:26:54 +01:00
Wojtek Figat
9c9e17a9d9 Fix warning when building C# lib with newer .NET than base version used on deps 2026-02-12 18:26:43 +01:00
Wojtek Figat
865a26cbbe Remove deprecated CommonValue
Deprecated on 31th July 2020
2026-02-12 18:26:08 +01:00
Wojtek Figat
56e825cad4 Build SDL for macOS (x64 and arm64) 2026-02-12 17:23:38 +01:00
Wojtek Figat
1df608e902 Remove deprecated NetworkDriverType 2026-02-12 16:43:01 +01:00
Phantom
c631c37a34 Merge branch 'master' into Improve-HighlightedPopUpColor 2026-02-11 09:38:34 +01:00
Phantom
07b6d3558a Merge branch 'master' into Improve-HighlightedPopUpColor 2026-02-10 17:09:22 +01:00
Saas
2a21141dd4 focus whole graph if no selection 2026-02-09 15:56:37 +01:00
Saas
eac9f67bc1 Merge remote-tracking branch 'upstream/master' into FocusSelectedVJControls 2026-02-09 15:52:27 +01:00
Saas
b19611e3d2 steal right fix from Tryibions PR 2026-02-07 19:58:26 +01:00
Chandler Cox
37e776e407 Add HideInEditor attribute to DirectionGizmo 2026-02-06 21:56:25 -06:00
Phantom
05a0a6b539 Merge branch 'master' into Improve-HighlightedPopUpColor 2026-02-05 19:42:54 +01:00
Saas
3adda3629e don't try to auto connect to comments and particle emitter nodes 2026-02-04 23:29:41 +01:00
Saas
a57fe6c04d add lazy connect feature to visject 2026-02-04 21:31:03 +01:00
Saas
29b043342a don't fall into the trap of moving nodes with NoMove flag again 2026-02-04 14:11:23 +01:00
Saas
8d8bf87c69 move nodes if needed and add undo support 2026-02-04 13:52:37 +01:00
Phantom
ca54313bd8 Merge branch 'master' into Improve-HighlightedPopUpColor 2026-02-04 05:19:47 +01:00
Phantom
7a96c1ff76 Merge branch 'master' into Improve-HighlightedPopUpColor 2026-02-03 23:26:34 +01:00
Phantom
83c15c05bb Merge branch 'master' into Improve-HighlightedPopUpColor 2026-02-03 23:06:53 +01:00
Saas
ab88a6339a add ripping apart connection with reconnect and auto connect when node is dropped over existing connection 2026-02-03 21:36:32 +01:00
Saas
b27e556363 expose material instance 2026-02-02 21:35:40 +01:00
Saas
b0a0c5b66c change selectedSegment to int 2026-02-02 12:52:54 +01:00
Saas
f1d5c0257f improve radial menu control
- Add AllowChangeSelectionWhenOutside to allow changing the selection from the outside the menu
- Expose UpdateAngle() to get *some* kind of controller support
- Expose `SelectedSegment`
- Improve various doc comments
2026-02-02 12:50:24 +01:00
Phantom
ae46520edf Merge branch 'master' into Improve-HighlightedPopUpColor 2026-02-02 10:31:24 +01:00
Chandler Cox
5d9d64e6e7 Fix missing scale for inverse squared setting for lights. 2026-01-27 22:10:22 -06:00
Phantom
4e8f54bb61 Merge branch 'master' into Improve-HighlightedPopUpColor 2026-01-24 15:29:34 +01:00
fibref
0eac545271 Merge branch 'FlaxEngine:master' into flax-msdf-font 2026-01-24 20:14:30 +08:00
Phantom
ec0877004c Merge branch 'master' into Improve-HighlightedPopUpColor 2026-01-12 22:56:49 +01:00
Phantom
b171071893 Merge branch 'master' into Improve-HighlightedPopUpColor 2026-01-05 06:30:42 +01:00
Phantom
91fd32b708 Merge branch 'master' into Improve-HighlightedPopUpColor 2025-12-29 22:54:40 +01:00
Saas
3279016067 tweak some node spacing 2025-12-20 20:39:54 +01:00
Saas
a92d2b6ca2 add slight background grid 2025-12-20 16:58:35 +01:00
Saas
a98a76f6e5 fix box spacing and (auto calculate) node height
- Work in progress but enough progress to commit because it basically works, it's just a bit ugly
- Node height is now recalculated every time a new element is added to the node
- Introduced `Archetype.UseFixedSize` for special nodes like *Color Gradient* or *Curve* that must rely on hardcoded size for now because the auto sizing does not take elements like the gradient editor or curve editor into account (ideally in the future it will)
- Fixed input and output box spacing (still some 1px offsets that I'm unsure where they are from, could be placebo though)
2025-12-20 00:02:11 +01:00
Saas
564c9ff0ca improve orthographic/ perspective viewport cam toggle 2025-12-19 19:00:55 +01:00
Saas
21d46dad07 change how connected boxes are drawn 2025-12-18 22:55:56 +01:00
71b222e0b0 Fix Editor project file generation to use custom code editor arguments 2025-12-18 23:52:21 +02:00
5921f60af2 Get code editor name through CodeEditingManager 2025-12-18 23:52:21 +02:00
39269583c3 Fix default code editor not using Visual Studio as fallback editor 2025-12-18 23:52:21 +02:00
cba3899c62 Fix invalid code editor when selected editor is not detected 2025-12-18 23:52:21 +02:00
Saas
cfda18ea9d propagate disabled node boxes across reroute nodes 2025-12-18 22:41:55 +01:00
Saas
31b1ceb9f0 increase selection outline width 2025-12-18 19:57:58 +01:00
Saas
d3d67fddcc add node shadow
- rectangular shadow (can be disabled...)
- ... for example for nodes with more complex shapes like reroute
2025-12-18 19:54:31 +01:00
Saas
e272870803 increase max zoom 2025-12-18 19:51:17 +01:00
Saas
d8c90184b9 add script only on prefab instance header button
- add some padding to `AddHeaderButton()`
- Add visual indicator (Header button) if script is only in prefab instance and not part of the prefab
2025-12-18 17:19:41 +01:00
Saas
5b1ca13225 choose darker mouse over color 2025-12-18 12:22:24 +01:00
Saas
0d8ac5b7ac implement review
- Remove trailing tooltip "."
- Add `AddSettingsButton` method
- Simplify loop into LINQ expression
2025-12-18 12:17:22 +01:00
Saas
b714668f4c improve visject graph readability
- Separate size for boxes (the circle thingie to connect to) and box rows
- Smaller boxes (circle thingie)
- Smaller footer
- Smaller and color header
- Left align header text
- Replace background with solid color
- Adjust node `ArchetypeColor`s (former `FooterColor`) to keep header title readable over colored header
2025-12-17 18:54:37 +01:00
f6e9cf644a Verify the last project path before using it 2025-12-17 03:45:15 +02:00
604bfb5fe6 Add -lastproject editor command-line option to open the last project 2025-12-17 03:30:19 +02:00
b3ea47b989 Use last opened project as initial directory in project file dialog 2025-12-17 03:30:19 +02:00
5d368e59a0 Fix SpecialFolder::AppData on Apple systems 2025-12-17 03:30:19 +02:00
3afd3ce2d5 Use XDG user directories on Linux special paths 2025-12-17 03:30:19 +02:00
Chandler Cox
1b9f6ed20f Fix large world build. 2025-12-16 18:16:58 -06:00
Chandler Cox
2c5cc7fcc0 Fix double drawing. 2025-12-16 17:32:35 -06:00
Chandler Cox
b9f177d1ab Add ensure capacity to lists. 2025-12-16 17:12:54 -06:00
Chandler Cox
9708601d3b Small cleanup. 2025-12-15 21:46:03 -06:00
Chandler Cox
d671f57952 Change to container control for anchoring. 2025-12-15 21:41:45 -06:00
Chandler Cox
56e6df261d Add hovering and selecting. 2025-12-15 21:22:11 -06:00
Chandler Cox
88b02105b3 Add direction gizmo. 2025-12-15 20:36:35 -06:00
Phantom
0094216ff8 Renaming Luminance name to Brightness 2025-12-15 14:29:57 +01:00
Phantom
298ee284e1 Merge branch 'master' into Improve-HighlightedPopUpColor 2025-12-15 00:49:49 +01:00
Phantom
7f2f73afd8 Added Luminance property and updated authors
-Added public Luminance property in Color.cs to calculate colour brightness.
-Refactored Dropdown.cs to use Luminance instead of manual calculation.
-Updated author list in AboutDialog.cs by adding ‘Michael Salvini’.
2025-12-15 00:48:42 +01:00
9f8b15f0d5 Fix Editor state after loading a scene without compiled game modules 2025-12-14 19:33:50 +02:00
Phantom
bb2e22ecf2 Improved readability of highlighted text in drop-down menus
TextColorHighlighted is now automatically lightened if too dark, by calculating brightness and interpolating towards white. This ensures better readability of selected items in drop-down menus.
2025-12-14 13:14:45 +01:00
Saas
b5b1d84b3f fix silent crash sometimes occurring when dragging and dropping connections 2025-12-12 22:44:13 +01:00
Saas
4b62395d69 add script obsolete icon to script editor 2025-12-10 18:41:57 +01:00
Chandler Cox
bbaa2dfc73 Fix pibot relative movement. 2025-11-29 16:13:46 -06:00
Chandler Cox
ab22b88a53 Better calculation for moving ui by the widgets. 2025-11-29 15:57:35 -06:00
Saas
206b948ee1 add "Split" for Unpack nodes 2025-11-02 13:36:21 +01:00
Saas
fbad6ba75c add alternative node titles to pack/unpack nodes
Now every pack/ unpack node can be found by searching:
- Make
- Construct
- Compose

-  Break
- Deconstruct
- Decompose
2025-11-02 00:50:07 +01:00
Saas
bf3403449d disable format nodes option when either a) all selected nodes have NoMove or b) clicked on node has NoMove 2025-11-01 18:18:18 +01:00
Saas
d13b98b205 fix Auto Format Nodes to only produce one undo step 2025-11-01 17:55:21 +01:00
Saas
1188150163 prevent node formatting tools from moving nodes with NoMove flag 2025-11-01 17:24:10 +01:00
Saas
e78191cc82 fix error when clearing vj context menu 2025-11-01 17:04:58 +01:00
frank
eb978c767e extend msdfgen buildscript for Mac and Android (not tested) 2025-11-01 20:33:46 +08:00
fibref
661dc8ea1c Merge branch 'FlaxEngine:master' into flax-msdf-font 2025-11-01 19:39:37 +08:00
Saas
b6696564f5 tweak colors to be less bright 2025-10-31 18:22:30 +01:00
Saas
316e5b2845 also apply color to border if focused/ selected in ui editor 2025-10-31 18:10:00 +01:00
Saas
c1738bcb0a make the ui editor look like the actor transform editor 2025-10-31 18:02:35 +01:00
Saas
7b3e41efae change how to the actor transform editor looks 2025-10-31 18:02:22 +01:00
fibref
3cef8cfd61 Merge branch 'FlaxEngine:master' into flax-msdf-font 2025-10-26 14:37:20 +08:00
Chandler Cox
09964df198 Removing moving the control when trying to resize it. 2025-10-24 16:19:33 -05:00
Chandler Cox
dd8e6bf694 Change handles back to outside of control. 2025-10-24 15:40:45 -05:00
Chandler Cox
58cd3e82f6 Better rotation on UI handles which handles total parent rotation. 2025-10-24 14:55:38 -05:00
Saas
5dd9171316 fix default value 2025-10-17 21:58:55 +02:00
Saas
d6b1478bf1 make double clicking properties splitter bar auto resize split 2025-10-16 20:04:05 +02:00
Saas
e5bd90f58b revert icon scaling 2025-10-15 19:51:24 +02:00
Saas
d1972a56e2 improve spline editor
- Move "Selected Point" section above keyframes so it is always accessible, even when keyframe array editor is expanded
- Improve icon scaling when editor becomes thin
2025-10-13 18:27:30 +02:00
Saas
69a7e1f25c expand tooltip to hint at being able to create a new folder on shift + left click 2025-10-12 19:57:05 +02:00
Saas
b43ed886b9 add option for what happens with unavailable entries and fix menu positioning 2025-10-12 19:52:18 +02:00
frank
18a0e8d612 add msdfgen for windows 2025-10-07 16:15:07 +08:00
Saas
ec08a6ca72 Reapply "Merge branch 'NoClearSearchboxesWhenStuffHappens' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-NoClearSearchboxesWhenStuffHappens"
This reverts commit 537d8b57ca.
2025-10-03 20:44:35 +02:00
Saas
7b7d7aaf3d Merge remote-tracking branch 'upstream/master' into NoClearSearchboxesWhenStuffHappens 2025-10-03 20:44:04 +02:00
Saas
2d4843b1f4 fix reloading scripts expanding scene tree
#3701
2025-10-03 20:41:52 +02:00
Saas
7ba01a413f Revert "fix reloading scripts expands all folders"
This reverts commit 2516820e4a.
2025-10-03 18:50:41 +02:00
Saas
2516820e4a fix reloading scripts expands all folders 2025-10-03 18:46:18 +02:00
Saas
0917a743cd Re- add particle prefix and improve some descriptions 2025-09-21 17:07:13 +02:00
Saas
1dd96ae9cb add undo to MoveSelectedNodes (do TODO) 2025-09-19 23:04:43 +02:00
Saas
07c1dfc613 add focus selected visject controls functionality 2025-09-19 20:23:47 +02:00
Saas
fb5cedc575 make particle age/ lifetime nodes more clear 2025-09-19 16:32:59 +02:00
alsed
05f08db66e Fixed a crash when model with no Bones was imported as Skinned Model 2025-09-08 01:28:49 -03:00
alsed
52ee8b3953 better comment for animated prefab and remove unused code in remap blendshapes 2025-09-07 20:40:28 -03:00
alsed
a8768f918e Add more conditions for skeleton import and add blendshapes for prefab recognition 2025-09-07 13:45:21 -03:00
alsed
e52b7170ce fix segfault when generating mipmaps for cubetextures 2025-09-04 11:11:44 -04:00
alsed
dd7233aaf7 Adds support for Cubemaps textures 2025-09-02 22:23:42 -04:00
Chandler Cox
cd0878f810 Simplify code 2025-09-02 20:47:04 -05:00
Chandler Cox
f588d6da51 Add ability to loop root node in behavior trees. 2025-09-02 20:33:41 -05:00
alsed
9a363e2882 Implement prefab detection of skinned models 2025-08-30 08:51:21 -04:00
Chandler Cox
2901e3898c Add IncludeInheritedTypes to RequireActor 2025-08-29 16:03:44 -05:00
alsed
c63200cba0 bool error corrected 2025-08-13 11:23:56 -04:00
alsed
c8a02ac607 cleanup 2025-08-13 09:22:30 -04:00
alsed
09a304c214 Add support for dds in linux 2025-08-12 19:18:07 -04:00
Zode
4bacceb19f Make comparisons automatically expand if needed so it contains the inputs 2025-06-09 22:49:30 +03:00
Zode
846065007b Make visject inputboxes uniform size of 50 pixels 2025-06-09 22:49:13 +03:00
xxSeys1
c45cba18a6 fix menu positioning 2025-05-04 21:18:00 +02:00
xxSeys1
fccd43502b add create file Content Panel toolstrip button 2025-05-04 21:14:10 +02:00
xxSeys1
d2dba124df add model import option to only create material slots
but not import actual materials
2024-10-09 13:12:48 +02:00
865 changed files with 64833 additions and 7932 deletions

View File

@@ -5,7 +5,7 @@ body:
- type: markdown - type: markdown
attributes: attributes:
value: | value: |
Thanks for taking the time to fill out this bug report! Please attach any minimal reproduction projects! Thanks for taking the time to fill out this bug report! Please attach a minimal reproduction project if available!
- type: textarea - type: textarea
id: description-area id: description-area
attributes: attributes:
@@ -17,19 +17,19 @@ body:
id: steps-area id: steps-area
attributes: attributes:
label: Steps to reproduce label: Steps to reproduce
description: Please provide reproduction steps if possible. description: Please provide reproduction steps if available.
validations: validations:
required: true required: true
- type: dropdown - type: dropdown
id: version id: version
attributes: attributes:
label: Version label: Version
description: What version of Flax are you running? description: What version of Flax did you experience the bug in?
options: options:
- '1.8'
- '1.9' - '1.9'
- '1.10' - '1.10'
- '1.11' - '1.11'
- '1.12'
- master branch - master branch
default: 3 default: 3
validations: validations:

View File

@@ -5,7 +5,7 @@ body:
- type: markdown - type: markdown
attributes: attributes:
value: | value: |
Thanks for taking the time to fill out a feature request! Thank you for taking the time to submit this feature request!
- type: textarea - type: textarea
id: description-area id: description-area
attributes: attributes:
@@ -17,6 +17,6 @@ body:
id: benefits-area id: benefits-area
attributes: attributes:
label: Benefits label: Benefits
description: Please provide what benefits this feature would provide to the engine! description: Please list what benefits this feature would provide to the engine!
validations: validations:
required: true required: true

18
.github/data/bt.sh vendored Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/sh
# https://gist.github.com/ongardie/aa15f1f0d0e6b59890a9
gdb -q --batch \
-ex 'handle SIGHUP nostop pass' \
-ex 'handle SIGQUIT nostop pass' \
-ex 'handle SIGPIPE nostop pass' \
-ex 'handle SIGALRM nostop pass' \
-ex 'handle SIGTERM nostop pass' \
-ex 'handle SIGUSR1 nostop pass' \
-ex 'handle SIGUSR2 nostop pass' \
-ex 'handle SIGCHLD nostop pass' \
-ex 'handle SIG34 nostop pass' \
-ex 'set print thread-events off' \
-return-child-result \
-ex 'run' \
-ex 'thread apply all bt' \
--tty=/dev/stdout \
--args $*

View File

@@ -4,6 +4,7 @@ on: [push, pull_request]
env: env:
DOTNET_NOLOGO: true DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: false DOTNET_CLI_TELEMETRY_OPTOUT: false
DOTNET_ROLL_FORWARD: 'minor'
jobs: jobs:
@@ -19,7 +20,7 @@ jobs:
- name: Setup .NET - name: Setup .NET
uses: actions/setup-dotnet@v3 uses: actions/setup-dotnet@v3
with: with:
dotnet-version: 8.0.x dotnet-version: 8.0.419
- name: Setup .NET Workload - name: Setup .NET Workload
run: | run: |
dotnet workload install android dotnet workload install android
@@ -33,4 +34,7 @@ jobs:
git lfs pull git lfs pull
- name: Build - name: Build
run: | run: |
PowerShell "(Get-Content global.json).Replace('latestMajor', 'minor') | Set-Content global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/global.json).Replace('latestMajor', 'minor') | Set-Content Source/Tools/Flax.Build/global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/Flax.Build.csproj).Replace('LatestMajor', 'Minor') | Set-Content Source/Tools/Flax.Build/Flax.Build.csproj"
.\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -dotnet=8 -arch=ARM64 -platform=Android -configuration=Release -buildtargets=FlaxGame .\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -dotnet=8 -arch=ARM64 -platform=Android -configuration=Release -buildtargets=FlaxGame

View File

@@ -45,7 +45,8 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev libwayland-dev sudo apt-get update
sudo apt-get install -y --fix-missing libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev libwayland-dev
- name: Setup Vulkan - name: Setup Vulkan
uses: ./.github/actions/vulkan uses: ./.github/actions/vulkan
- name: Setup .NET - name: Setup .NET

View File

@@ -4,6 +4,7 @@ on: [push, pull_request]
env: env:
DOTNET_NOLOGO: true DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: false DOTNET_CLI_TELEMETRY_OPTOUT: false
DOTNET_ROLL_FORWARD: 'minor'
jobs: jobs:
@@ -19,7 +20,7 @@ jobs:
- name: Setup .NET - name: Setup .NET
uses: actions/setup-dotnet@v3 uses: actions/setup-dotnet@v3
with: with:
dotnet-version: 8.0.x dotnet-version: 8.0.419
- name: Print .NET info - name: Print .NET info
run: | run: |
dotnet --info dotnet --info
@@ -30,6 +31,9 @@ jobs:
git lfs pull git lfs pull
- name: Build - name: Build
run: | run: |
PowerShell "(Get-Content global.json).Replace('latestMajor', 'minor') | Set-Content global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/global.json).Replace('latestMajor', 'minor') | Set-Content Source/Tools/Flax.Build/global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/Flax.Build.csproj).Replace('LatestMajor', 'Minor') | Set-Content Source/Tools/Flax.Build/Flax.Build.csproj"
.\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -dotnet=8 -arch=x64 -platform=Windows -configuration=Development -buildtargets=FlaxEditor .\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -dotnet=8 -arch=x64 -platform=Windows -configuration=Development -buildtargets=FlaxEditor
# Game # Game
@@ -44,7 +48,7 @@ jobs:
- name: Setup .NET - name: Setup .NET
uses: actions/setup-dotnet@v3 uses: actions/setup-dotnet@v3
with: with:
dotnet-version: 8.0.x dotnet-version: 8.0.419
- name: Print .NET info - name: Print .NET info
run: | run: |
dotnet --info dotnet --info
@@ -55,4 +59,7 @@ jobs:
git lfs pull git lfs pull
- name: Build - name: Build
run: | run: |
PowerShell "(Get-Content global.json).Replace('latestMajor', 'minor') | Set-Content global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/global.json).Replace('latestMajor', 'minor') | Set-Content Source/Tools/Flax.Build/global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/Flax.Build.csproj).Replace('LatestMajor', 'Minor') | Set-Content Source/Tools/Flax.Build/Flax.Build.csproj"
.\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -dotnet=8 -arch=x64 -platform=Windows -configuration=Release -buildtargets=FlaxGame .\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -dotnet=8 -arch=x64 -platform=Windows -configuration=Release -buildtargets=FlaxGame

View File

@@ -7,6 +7,7 @@ on:
env: env:
DOTNET_NOLOGO: true DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: false DOTNET_CLI_TELEMETRY_OPTOUT: false
DOTNET_ROLL_FORWARD: 'minor'
GIT_LFS_PULL_OPTIONS: '-c lfs.concurrenttransfers=1 -c lfs.transfer.maxretries=2 -c http.version="HTTP/1.1" -c lfs.activitytimeout=60' GIT_LFS_PULL_OPTIONS: '-c lfs.concurrenttransfers=1 -c lfs.transfer.maxretries=2 -c http.version="HTTP/1.1" -c lfs.activitytimeout=60'
jobs: jobs:
@@ -27,13 +28,16 @@ jobs:
- name: Setup .NET - name: Setup .NET
uses: actions/setup-dotnet@v3 uses: actions/setup-dotnet@v3
with: with:
dotnet-version: 8.0.x dotnet-version: 8.0.419
- name: Print .NET info - name: Print .NET info
run: | run: |
dotnet --info dotnet --info
dotnet workload --info dotnet workload --info
- name: Build - name: Build
run: | run: |
PowerShell "(Get-Content global.json).Replace('latestMajor', 'minor') | Set-Content global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/global.json).Replace('latestMajor', 'minor') | Set-Content Source/Tools/Flax.Build/global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/Flax.Build.csproj).Replace('LatestMajor', 'Minor') | Set-Content Source/Tools/Flax.Build/Flax.Build.csproj"
.\PackageEditor.bat -arch=x64 -platform=Windows -deployOutput=Output -dotnet=8 .\PackageEditor.bat -arch=x64 -platform=Windows -deployOutput=Output -dotnet=8
- name: Upload - name: Upload
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
@@ -60,13 +64,16 @@ jobs:
- name: Setup .NET - name: Setup .NET
uses: actions/setup-dotnet@v3 uses: actions/setup-dotnet@v3
with: with:
dotnet-version: 8.0.x dotnet-version: 8.0.419
- name: Print .NET info - name: Print .NET info
run: | run: |
dotnet --info dotnet --info
dotnet workload --info dotnet workload --info
- name: Build - name: Build
run: | run: |
PowerShell "(Get-Content global.json).Replace('latestMajor', 'minor') | Set-Content global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/global.json).Replace('latestMajor', 'minor') | Set-Content Source/Tools/Flax.Build/global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/Flax.Build.csproj).Replace('LatestMajor', 'Minor') | Set-Content Source/Tools/Flax.Build/Flax.Build.csproj"
.\PackagePlatforms.bat -arch=x64 -platform=Windows -deployOutput=Output -dotnet=8 .\PackagePlatforms.bat -arch=x64 -platform=Windows -deployOutput=Output -dotnet=8
- name: Upload - name: Upload
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
@@ -88,7 +95,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y --fix-missing libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev sudo apt-get install -y --fix-missing libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev libwayland-dev
- name: Setup Vulkan - name: Setup Vulkan
uses: ./.github/actions/vulkan uses: ./.github/actions/vulkan
- name: Setup .NET - name: Setup .NET
@@ -120,7 +127,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y --fix-missing libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev sudo apt-get install -y --fix-missing libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev libwayland-dev
- name: Setup Vulkan - name: Setup Vulkan
uses: ./.github/actions/vulkan uses: ./.github/actions/vulkan
- name: Setup .NET - name: Setup .NET

View File

@@ -4,6 +4,7 @@ on: [push, pull_request]
env: env:
DOTNET_NOLOGO: true DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: false DOTNET_CLI_TELEMETRY_OPTOUT: false
DOTNET_ROLL_FORWARD: 'minor'
jobs: jobs:
@@ -29,25 +30,22 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y --fix-missing libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev libwayland-dev sudo apt-get install -y --fix-missing libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev libwayland-dev gdb
chmod +x .github/data/bt.sh
- name: Build - name: Build
run: | run: |
./GenerateProjectFiles.sh -vs2022 -log -verbose -printSDKs -dotnet=8 ./GenerateProjectFiles.sh -vs2022 -log -verbose -printSDKs -dotnet=8
./Development/Scripts/Linux/CallBuildTool.sh -build -log -dotnet=8 -arch=x64 -platform=Linux -configuration=Development -buildtargets=FlaxTestsTarget ./Development/Scripts/Linux/CallBuildTool.sh -build -log -dotnet=8 -arch=x64 -platform=Linux -configuration=Development -buildtargets=FlaxTestsTarget -UseLargeWorlds=true
dotnet msbuild Source/Tools/Flax.Build.Tests/Flax.Build.Tests.csproj /m /t:Restore,Build /p:Configuration=Debug /p:Platform=AnyCPU /nologo dotnet msbuild Source/Tools/Flax.Build.Tests/Flax.Build.Tests.csproj /m /t:Restore,Build /p:Configuration=Debug /p:Platform=AnyCPU /nologo
dotnet msbuild Source/Tools/Flax.Build.Tests/Flax.Build.Tests.csproj /m /t:Restore,Build /p:Configuration=Debug /p:Platform=AnyCPU /nologo dotnet msbuild Source/Tools/Flax.Build.Tests/Flax.Build.Tests.csproj /m /t:Restore,Build /p:Configuration=Debug /p:Platform=AnyCPU /nologo
- name: Test - name: Test
run: | run: |
${GITHUB_WORKSPACE}/Binaries/Editor/Linux/Development/FlaxTests ${GITHUB_WORKSPACE}/.github/data/bt.sh ./Binaries/Editor/Linux/Development/FlaxTests -headless
dotnet test -f net8.0 Binaries/Tests/Flax.Build.Tests.dll dotnet test -f net8.0 Binaries/Tests/Flax.Build.Tests.dll
cp Binaries/Editor/Linux/Development/FlaxEngine.CSharp.dll Binaries/Tests cp Binaries/Editor/Linux/Development/FlaxEngine.CSharp.dll Binaries/Tests
cp Binaries/Editor/Linux/Development/FlaxEngine.CSharp.runtimeconfig.json Binaries/Tests cp Binaries/Editor/Linux/Development/FlaxEngine.CSharp.runtimeconfig.json Binaries/Tests
cp Binaries/Editor/Linux/Development/Newtonsoft.Json.dll Binaries/Tests cp Binaries/Editor/Linux/Development/Newtonsoft.Json.dll Binaries/Tests
dotnet test -f net8.0 Binaries/Tests/FlaxEngine.CSharp.dll dotnet test -f net8.0 Binaries/Tests/FlaxEngine.CSharp.dll
- name: Test UseLargeWorlds
run: |
./Development/Scripts/Linux/CallBuildTool.sh -build -log -dotnet=8 -arch=x64 -platform=Linux -configuration=Development -buildtargets=FlaxTestsTarget -UseLargeWorlds=true
${GITHUB_WORKSPACE}/Binaries/Editor/Linux/Development/FlaxTests
# Tests on Windows # Tests on Windows
tests-windows: tests-windows:
@@ -59,7 +57,7 @@ jobs:
- name: Setup .NET - name: Setup .NET
uses: actions/setup-dotnet@v3 uses: actions/setup-dotnet@v3
with: with:
dotnet-version: 8.0.x dotnet-version: 8.0.419
- name: Print .NET info - name: Print .NET info
run: | run: |
dotnet --info dotnet --info
@@ -70,6 +68,9 @@ jobs:
git lfs pull git lfs pull
- name: Build - name: Build
run: | run: |
PowerShell "(Get-Content global.json).Replace('latestMajor', 'minor') | Set-Content global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/global.json).Replace('latestMajor', 'minor') | Set-Content Source/Tools/Flax.Build/global.json"
PowerShell "(Get-Content Source/Tools/Flax.Build/Flax.Build.csproj).Replace('LatestMajor', 'Minor') | Set-Content Source/Tools/Flax.Build/Flax.Build.csproj"
.\GenerateProjectFiles.bat -vs2022 -log -verbose -printSDKs -dotnet=8 .\GenerateProjectFiles.bat -vs2022 -log -verbose -printSDKs -dotnet=8
.\Development\Scripts\Windows\CallBuildTool.bat -build -log -dotnet=8 -arch=x64 -platform=Windows -configuration=Development -buildtargets=FlaxTestsTarget .\Development\Scripts\Windows\CallBuildTool.bat -build -log -dotnet=8 -arch=x64 -platform=Windows -configuration=Development -buildtargets=FlaxTestsTarget
dotnet msbuild Source\Tools\Flax.Build.Tests\Flax.Build.Tests.csproj /m /t:Restore,Build /p:Configuration=Debug /p:Platform=AnyCPU /nologo dotnet msbuild Source\Tools\Flax.Build.Tests\Flax.Build.Tests.csproj /m /t:Restore,Build /p:Configuration=Debug /p:Platform=AnyCPU /nologo
@@ -77,7 +78,7 @@ jobs:
shell: pwsh shell: pwsh
run: | run: |
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
.\Binaries\Editor\Win64\Development\FlaxTests.exe .\Binaries\Editor\Win64\Development\FlaxTests.exe -headless
if(!$?) { Write-Host "Tests failed with exit code $LastExitCode" -ForegroundColor Red; Exit $LastExitCode } if(!$?) { Write-Host "Tests failed with exit code $LastExitCode" -ForegroundColor Red; Exit $LastExitCode }
dotnet test -f net8.0 Binaries\Tests\Flax.Build.Tests.dll dotnet test -f net8.0 Binaries\Tests\Flax.Build.Tests.dll
xcopy /y Binaries\Editor\Win64\Development\FlaxEngine.CSharp.dll Binaries\Tests xcopy /y Binaries\Editor\Win64\Development\FlaxEngine.CSharp.dll Binaries\Tests

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/HSWheel.flax LFS Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -42,10 +42,10 @@ struct MaterialInput
float2 SvPositionToDecalUV(float4 svPosition) float2 SvPositionToDecalUV(float4 svPosition)
{ {
float2 screenUV = svPosition.xy * ScreenSize.zw; float2 screenUV = svPosition.xy * ScreenSize.zw;
svPosition.z = SAMPLE_RT(DepthBuffer, screenUV).r; svPosition.z = SAMPLE_RT_DEPTH(DepthBuffer, screenUV);
float4 positionHS = mul(float4(svPosition.xyz, 1), SvPositionToWorld); float4 positionHS = PROJECT_POINT(float4(svPosition.xyz, 1), SvPositionToWorld);
float3 positionWS = positionHS.xyz / positionHS.w; float3 positionWS = positionHS.xyz / positionHS.w;
float3 positionOS = mul(float4(positionWS, 1), InvWorld).xyz; float3 positionOS = PROJECT_POINT(float4(positionWS, 1), InvWorld).xyz;
return positionOS.xz + 0.5f; return positionOS.xz + 0.5f;
} }
@@ -182,10 +182,10 @@ META_VS_IN_ELEMENT(POSITION, 0, R32G32B32_FLOAT, 0, 0, PER_VERTEX, 0, true)
void VS_Decal(in float3 Position : POSITION0, out float4 SvPosition : SV_Position) void VS_Decal(in float3 Position : POSITION0, out float4 SvPosition : SV_Position)
{ {
// Compute world space vertex position // Compute world space vertex position
float3 worldPosition = mul(float4(Position.xyz, 1), WorldMatrix).xyz; float3 worldPosition = PROJECT_POINT(float4(Position.xyz, 1), WorldMatrix).xyz;
// Compute clip space position // Compute clip space position
SvPosition = mul(float4(worldPosition.xyz, 1), ViewProjectionMatrix); SvPosition = PROJECT_POINT(float4(worldPosition.xyz, 1), ViewProjectionMatrix);
} }
// Pixel Shader function for decals rendering // Pixel Shader function for decals rendering
@@ -213,11 +213,11 @@ void PS_Decal(
} }
float2 screenUV = SvPosition.xy * ScreenSize.zw; float2 screenUV = SvPosition.xy * ScreenSize.zw;
SvPosition.z = SAMPLE_RT(DepthBuffer, screenUV).r; SvPosition.z = SAMPLE_RT_DEPTH(DepthBuffer, screenUV);
float4 positionHS = mul(float4(SvPosition.xyz, 1), SvPositionToWorld); float4 positionHS = PROJECT_POINT(float4(SvPosition.xyz, 1), SvPositionToWorld);
float3 positionWS = positionHS.xyz / positionHS.w; float3 positionWS = positionHS.xyz / positionHS.w;
float3 positionOS = mul(float4(positionWS, 1), InvWorld).xyz; float3 positionOS = PROJECT_POINT(float4(positionWS, 1), InvWorld).xyz;
clip(0.5 - abs(positionOS.xyz)); clip(0.5 - abs(positionOS.xyz));
float2 decalUVs = positionOS.xz + 0.5f; float2 decalUVs = positionOS.xz + 0.5f;

View File

@@ -308,7 +308,7 @@ VertexOutput VS_SplineModel(ModelInput input)
world = mul(world, WorldMatrix); world = mul(world, WorldMatrix);
// Compute clip space position // Compute clip space position
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix); output.Position = PROJECT_POINT(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
// Pass vertex attributes // Pass vertex attributes
output.Geometry.TexCoord = input.TexCoord0; output.Geometry.TexCoord = input.TexCoord0;
@@ -337,8 +337,7 @@ VertexOutput VS_SplineModel(ModelInput input)
// Apply world position offset per-vertex // Apply world position offset per-vertex
#if USE_POSITION_OFFSET #if USE_POSITION_OFFSET
output.Geometry.WorldPosition += material.PositionOffset; output.Geometry.WorldPosition += material.PositionOffset;
output.Geometry.PrevWorldPosition += material.PositionOffset; output.Position = PROJECT_POINT(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
#endif #endif
// Get tessalation multiplier (per vertex) // Get tessalation multiplier (per vertex)

View File

@@ -67,7 +67,7 @@ float Rand(inout uint seed)
float3 ReprojectPosition(float2 uv, float rawDepth) float3 ReprojectPosition(float2 uv, float rawDepth)
{ {
uv = uv * float2(2.0, -2.0) + float2(-1.0, 1.0); uv = uv * float2(2.0, -2.0) + float2(-1.0, 1.0);
float4 pos = mul(float4(uv.x, uv.y, rawDepth, 1.0f), InvViewProjectionMatrix); float4 pos = PROJECT_POINT(float4(uv.x, uv.y, rawDepth, 1.0f), InvViewProjectionMatrix);
return pos.xyz / pos.w; return pos.xyz / pos.w;
} }
@@ -158,7 +158,7 @@ void SpawnParticle(Context context)
@4} @4}
// Main entry point for the particles simulation and spawning // Main entry point for the particles simulation and spawning
META_CS(true, FEATURE_LEVEL_SM5) META_CS(true, AUTO)
[numthreads(THREAD_GROUP_SIZE, 1, 1)] [numthreads(THREAD_GROUP_SIZE, 1, 1)]
void CS_Main(uint3 dispatchThreadId : SV_DispatchThreadID) void CS_Main(uint3 dispatchThreadId : SV_DispatchThreadID)
{ {

View File

@@ -227,7 +227,7 @@ VertexOutput VS_GUI(Render2DVertex input)
if ((int)input.CustomDataAndClipOrigin.y & 1) if ((int)input.CustomDataAndClipOrigin.y & 1)
input.Position = (int2)input.Position; input.Position = (int2)input.Position;
output.Position = mul(float4(input.Position, 0, 1), ViewProjectionMatrix); output.Position = PROJECT_POINT(float4(input.Position, 0, 1), ViewProjectionMatrix);
output.WorldPosition = mul(float4(input.Position, 0, 1), WorldMatrix).xyz; output.WorldPosition = mul(float4(input.Position, 0, 1), WorldMatrix).xyz;
output.TexCoord = input.TexCoord; output.TexCoord = input.TexCoord;
output.WindowPos = input.Position; output.WindowPos = input.Position;

View File

@@ -393,7 +393,7 @@ VertexOutput VS_Sprite(SpriteInput input, uint particleIndex : SV_InstanceID)
output.WorldPosition = position + spriteVertexPosition; output.WorldPosition = position + spriteVertexPosition;
// Compute clip space position // Compute clip space position
output.Position = mul(float4(output.WorldPosition.xyz, 1), ViewProjectionMatrix); output.Position = PROJECT_POINT(float4(output.WorldPosition.xyz, 1), ViewProjectionMatrix);
// Pass vertex attributes // Pass vertex attributes
output.TexCoord = input.TexCoord; output.TexCoord = input.TexCoord;
@@ -431,7 +431,7 @@ VertexOutput VS_Sprite(SpriteInput input, uint particleIndex : SV_InstanceID)
// Apply world position offset per-vertex // Apply world position offset per-vertex
#if USE_POSITION_OFFSET #if USE_POSITION_OFFSET
output.WorldPosition += material.PositionOffset; output.WorldPosition += material.PositionOffset;
output.Position = mul(float4(output.WorldPosition.xyz, 1), ViewProjectionMatrix); output.Position = PROJECT_POINT(float4(output.WorldPosition.xyz, 1), ViewProjectionMatrix);
#endif #endif
// Copy interpolants for other shader stages // Copy interpolants for other shader stages
@@ -511,7 +511,7 @@ VertexOutput VS_Model(ModelInput input, uint particleIndex : SV_InstanceID)
output.WorldPosition = mul(float4(input.Position, 1), world).xyz; output.WorldPosition = mul(float4(input.Position, 1), world).xyz;
// Compute clip space position // Compute clip space position
output.Position = mul(float4(output.WorldPosition, 1), ViewProjectionMatrix); output.Position = PROJECT_POINT(float4(output.WorldPosition, 1), ViewProjectionMatrix);
// Pass vertex attributes // Pass vertex attributes
output.TexCoord = input.TexCoord0; output.TexCoord = input.TexCoord0;
@@ -549,7 +549,7 @@ VertexOutput VS_Model(ModelInput input, uint particleIndex : SV_InstanceID)
// Apply world position offset per-vertex // Apply world position offset per-vertex
#if USE_POSITION_OFFSET #if USE_POSITION_OFFSET
output.WorldPosition += material.PositionOffset; output.WorldPosition += material.PositionOffset;
output.Position = mul(float4(output.WorldPosition.xyz, 1), ViewProjectionMatrix); output.Position = PROJECT_POINT(float4(output.WorldPosition.xyz, 1), ViewProjectionMatrix);
#endif #endif
// Copy interpolants for other shader stages // Copy interpolants for other shader stages
@@ -617,7 +617,7 @@ VertexOutput VS_Ribbon(RibbonInput input, uint vertexIndex : SV_VertexID)
output.WorldPosition = position + tangentRight * vertexSign * (ribbonWidth.xxx * 0.5f); output.WorldPosition = position + tangentRight * vertexSign * (ribbonWidth.xxx * 0.5f);
// Compute clip space position // Compute clip space position
output.Position = mul(float4(output.WorldPosition.xyz, 1), ViewProjectionMatrix); output.Position = PROJECT_POINT(float4(output.WorldPosition.xyz, 1), ViewProjectionMatrix);
// Pass vertex attributes // Pass vertex attributes
output.ParticleIndex = particleIndex; output.ParticleIndex = particleIndex;
@@ -655,7 +655,7 @@ VertexOutput VS_Ribbon(RibbonInput input, uint vertexIndex : SV_VertexID)
// Apply world position offset per-vertex // Apply world position offset per-vertex
#if USE_POSITION_OFFSET #if USE_POSITION_OFFSET
output.WorldPosition += material.PositionOffset; output.WorldPosition += material.PositionOffset;
output.Position = mul(float4(output.WorldPosition.xyz, 1), ViewProjectionMatrix); output.Position = PROJECT_POINT(float4(output.WorldPosition.xyz, 1), ViewProjectionMatrix);
#endif #endif
// Copy interpolants for other shader stages // Copy interpolants for other shader stages

View File

@@ -342,7 +342,7 @@ VertexOutput VS(ModelInput input)
output.Geometry.PrevWorldPosition = mul(float4(input.Position.xyz, 1), object.PrevWorldMatrix).xyz; output.Geometry.PrevWorldPosition = mul(float4(input.Position.xyz, 1), object.PrevWorldMatrix).xyz;
// Compute clip space position // Compute clip space position
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix); output.Position = PROJECT_POINT(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
// Pass vertex attributes // Pass vertex attributes
output.Geometry.TexCoords01 = float4(input.TexCoord0, input.TexCoord1); output.Geometry.TexCoords01 = float4(input.TexCoord0, input.TexCoord1);
@@ -378,7 +378,7 @@ VertexOutput VS(ModelInput input)
#if USE_POSITION_OFFSET #if USE_POSITION_OFFSET
output.Geometry.WorldPosition += material.PositionOffset; output.Geometry.WorldPosition += material.PositionOffset;
output.Geometry.PrevWorldPosition += material.PositionOffset; output.Geometry.PrevWorldPosition += material.PositionOffset;
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix); output.Position = PROJECT_POINT(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
#endif #endif
// Get tessalation multiplier (per vertex) // Get tessalation multiplier (per vertex)
@@ -412,7 +412,7 @@ float4 VS_Depth(ModelInput_PosOnly input) : SV_Position
// Transform vertex position into the screen // Transform vertex position into the screen
float3 worldPosition = mul(float4(input.Position.xyz, 1), object.WorldMatrix).xyz; float3 worldPosition = mul(float4(input.Position.xyz, 1), object.WorldMatrix).xyz;
float4 position = mul(float4(worldPosition, 1), ViewProjectionMatrix); float4 position = PROJECT_POINT(float4(worldPosition, 1), ViewProjectionMatrix);
return position; return position;
} }
@@ -518,7 +518,7 @@ VertexOutput VS_Skinned(ModelInput_Skinned input)
#endif #endif
// Compute clip space position // Compute clip space position
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix); output.Position = PROJECT_POINT(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
// Pass vertex attributes // Pass vertex attributes
output.Geometry.TexCoords01 = float4(input.TexCoord0, input.TexCoord1); output.Geometry.TexCoords01 = float4(input.TexCoord0, input.TexCoord1);
@@ -549,7 +549,7 @@ VertexOutput VS_Skinned(ModelInput_Skinned input)
#if USE_POSITION_OFFSET #if USE_POSITION_OFFSET
output.Geometry.WorldPosition += material.PositionOffset; output.Geometry.WorldPosition += material.PositionOffset;
output.Geometry.PrevWorldPosition += material.PositionOffset; output.Geometry.PrevWorldPosition += material.PositionOffset;
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix); output.Position = PROJECT_POINT(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
#endif #endif
// Get tessalation multiplier (per vertex) // Get tessalation multiplier (per vertex)

View File

@@ -388,7 +388,7 @@ VertexOutput VS(TerrainVertexInput input)
output.Geometry.WorldPosition = mul(float4(position, 1), worldMatrix).xyz; output.Geometry.WorldPosition = mul(float4(position, 1), worldMatrix).xyz;
// Compute clip space position // Compute clip space position
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix); output.Position = PROJECT_POINT(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
// Pass vertex attributes // Pass vertex attributes
#if USE_SMOOTH_LOD_TRANSITION #if USE_SMOOTH_LOD_TRANSITION
@@ -436,7 +436,7 @@ VertexOutput VS(TerrainVertexInput input)
// Apply world position offset per-vertex // Apply world position offset per-vertex
#if USE_POSITION_OFFSET #if USE_POSITION_OFFSET
output.Geometry.WorldPosition += material.PositionOffset; output.Geometry.WorldPosition += material.PositionOffset;
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix); output.Position = PROJECT_POINT(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
#endif #endif
// Get tessalation multiplier (per vertex) // Get tessalation multiplier (per vertex)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -4,7 +4,7 @@
"Major": 1, "Major": 1,
"Minor": 12, "Minor": 12,
"Revision": 0, "Revision": 0,
"Build": 6905 "Build": 6910
}, },
"Company": "Flax", "Company": "Flax",
"Copyright": "Copyright (c) 2012-2026 Wojciech Figat. All rights reserved.", "Copyright": "Copyright (c) 2012-2026 Wojciech Figat. All rights reserved.",
@@ -14,6 +14,14 @@
"UseCSharp": true, "UseCSharp": true,
"UseLargeWorlds": false, "UseLargeWorlds": false,
"UseDotNet": true, "UseDotNet": true,
"UseSDL": true "Windows": {
"UseSDL": false,
},
"Mac": {
"UseSDL": false,
},
"Linux": {
"UseSDL": true,
},
} }
} }

View File

@@ -12,6 +12,6 @@ cd "`dirname "$0"`"
bash ./Development/Scripts/Mac/CallBuildTool.sh --genproject "$@" bash ./Development/Scripts/Mac/CallBuildTool.sh --genproject "$@"
# Build bindings for all editor configurations # Build bindings for all editor configurations
#echo Building C# bindings... echo Building C# bindings...
# TODO: Detect the correct architecture here # TODO: Detect the correct architecture here
#Binaries/Tools/Flax.Build -build -BuildBindingsOnly -arch=ARM64 -platform=Mac --buildTargets=FlaxEditor Binaries/Tools/Flax.Build -build -BuildBindingsOnly -arch=ARM64 -platform=Mac --buildTargets=FlaxEditor

View File

@@ -19,7 +19,7 @@ namespace FlaxEditor.Content.GUI
/// <summary> /// <summary>
/// Gets the target node. /// Gets the target node.
/// </summary> /// </summary>
public ContentTreeNode TargetNode { get; } public ContentFolderTreeNode TargetNode { get; }
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ContentNavigationButton"/> class. /// Initializes a new instance of the <see cref="ContentNavigationButton"/> class.
@@ -28,7 +28,7 @@ namespace FlaxEditor.Content.GUI
/// <param name="x">The x position.</param> /// <param name="x">The x position.</param>
/// <param name="y">The y position.</param> /// <param name="y">The y position.</param>
/// <param name="height">The height.</param> /// <param name="height">The height.</param>
public ContentNavigationButton(ContentTreeNode targetNode, float x, float y, float height) public ContentNavigationButton(ContentFolderTreeNode targetNode, float x, float y, float height)
: base(x, y, height) : base(x, y, height)
{ {
TargetNode = targetNode; TargetNode = targetNode;
@@ -147,7 +147,7 @@ namespace FlaxEditor.Content.GUI
ClearItems(); ClearItems();
foreach (var child in Target.TargetNode.Children) foreach (var child in Target.TargetNode.Children)
{ {
if (child is ContentTreeNode node) if (child is ContentFolderTreeNode node)
{ {
if (node.Folder.VisibleInHierarchy) // Respect the filter set by ContentFilterConfig.Filter(...) if (node.Folder.VisibleInHierarchy) // Respect the filter set by ContentFilterConfig.Filter(...)
AddItem(node.Folder.ShortName); AddItem(node.Folder.ShortName);
@@ -180,7 +180,7 @@ namespace FlaxEditor.Content.GUI
var item = _items[index]; var item = _items[index];
foreach (var child in Target.TargetNode.Children) foreach (var child in Target.TargetNode.Children)
{ {
if (child is ContentTreeNode node && node.Folder.ShortName == item) if (child is ContentFolderTreeNode node && node.Folder.ShortName == item)
{ {
Editor.Instance.Windows.ContentWin.Navigate(node); Editor.Instance.Windows.ContentWin.Navigate(node);
return; return;

View File

@@ -59,7 +59,7 @@ namespace FlaxEditor.Content
/// <summary> /// <summary>
/// Gets the content node. /// Gets the content node.
/// </summary> /// </summary>
public ContentTreeNode Node { get; } public ContentFolderTreeNode Node { get; }
/// <summary> /// <summary>
/// The subitems of this folder. /// The subitems of this folder.
@@ -72,7 +72,7 @@ namespace FlaxEditor.Content
/// <param name="type">The folder type.</param> /// <param name="type">The folder type.</param>
/// <param name="path">The path to the item.</param> /// <param name="path">The path to the item.</param>
/// <param name="node">The folder parent node.</param> /// <param name="node">The folder parent node.</param>
internal ContentFolder(ContentFolderType type, string path, ContentTreeNode node) internal ContentFolder(ContentFolderType type, string path, ContentFolderTreeNode node)
: base(path) : base(path)
{ {
FolderType = type; FolderType = type;
@@ -118,7 +118,7 @@ namespace FlaxEditor.Content
get get
{ {
var hasParentFolder = ParentFolder != null; var hasParentFolder = ParentFolder != null;
var isContentFolder = Node is MainContentTreeNode; var isContentFolder = Node is MainContentFolderTreeNode;
return hasParentFolder && !isContentFolder; return hasParentFolder && !isContentFolder;
} }
} }

View File

@@ -45,6 +45,8 @@ namespace FlaxEditor.Content.Thumbnails
{ {
if (item == null) if (item == null)
throw new ArgumentNullException(); throw new ArgumentNullException();
if (_task == null)
return;
// Check if use default icon // Check if use default icon
var defaultThumbnail = item.DefaultThumbnail; var defaultThumbnail = item.DefaultThumbnail;
@@ -223,11 +225,12 @@ namespace FlaxEditor.Content.Thumbnails
/// <inheritdoc /> /// <inheritdoc />
public override void OnInit() public override void OnInit()
{ {
if (Editor.IsHeadlessMode || (GPUDevice.Instance != null && GPUDevice.Instance.RendererType == RendererType.Null))
return;
// Create cache folder // Create cache folder
if (!Directory.Exists(_cacheFolder)) if (!Directory.Exists(_cacheFolder))
{
Directory.CreateDirectory(_cacheFolder); Directory.CreateDirectory(_cacheFolder);
}
// Find atlases in a Editor cache directory // Find atlases in a Editor cache directory
var files = Directory.GetFiles(_cacheFolder, "cache_*.flax", SearchOption.TopDirectoryOnly); var files = Directory.GetFiles(_cacheFolder, "cache_*.flax", SearchOption.TopDirectoryOnly);
@@ -482,7 +485,7 @@ namespace FlaxEditor.Content.Thumbnails
public override void OnUpdate() public override void OnUpdate()
{ {
// Wait some frames before start generating previews (late init feature) // Wait some frames before start generating previews (late init feature)
if (Time.TimeSinceStartup < 1.0f || HasAllAtlasesLoaded() == false) if (Time.TimeSinceStartup < 1.0f || HasAllAtlasesLoaded() == false || _task == null)
return; return;
lock (_requests) lock (_requests)

View File

@@ -0,0 +1,433 @@
// Copyright (c) Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;
using FlaxEditor.GUI;
using FlaxEditor.GUI.Drag;
using FlaxEditor.GUI.Tree;
using FlaxEditor.SceneGraph;
using FlaxEditor.Utilities;
using FlaxEngine;
using FlaxEngine.GUI;
namespace FlaxEditor.Content;
/// <summary>
/// Content folder tree node.
/// </summary>
/// <seealso cref="TreeNode" />
public class ContentFolderTreeNode : TreeNode
{
private DragItems _dragOverItems;
private DragActors _dragActors;
private List<Rectangle> _highlights;
/// <summary>
/// The folder.
/// </summary>
protected ContentFolder _folder;
/// <summary>
/// Whether this node can be deleted.
/// </summary>
public virtual bool CanDelete => true;
/// <summary>
/// Whether this node can be duplicated.
/// </summary>
public virtual bool CanDuplicate => true;
/// <summary>
/// Gets the content folder item.
/// </summary>
public ContentFolder Folder => _folder;
/// <summary>
/// Gets the type of the folder.
/// </summary>
public ContentFolderType FolderType => _folder.FolderType;
/// <summary>
/// Returns true if that folder can import/manage scripts.
/// </summary>
public bool CanHaveScripts => _folder.CanHaveScripts;
/// <summary>
/// Returns true if that folder can import/manage assets.
/// </summary>
/// <returns>True if can contain assets for project, otherwise false</returns>
public bool CanHaveAssets => _folder.CanHaveAssets;
/// <summary>
/// Gets the parent node.
/// </summary>
public ContentFolderTreeNode ParentNode => Parent as ContentFolderTreeNode;
/// <summary>
/// Gets the folder path.
/// </summary>
public string Path => _folder.Path;
/// <summary>
/// Gets the navigation button label.
/// </summary>
public virtual string NavButtonLabel => _folder.ShortName;
/// <summary>
/// Initializes a new instance of the <see cref="ContentFolderTreeNode"/> class.
/// </summary>
/// <param name="parent">The parent node.</param>
/// <param name="path">The folder path.</param>
public ContentFolderTreeNode(ContentFolderTreeNode parent, string path)
: this(parent, parent?.FolderType ?? ContentFolderType.Other, path)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="ContentFolderTreeNode"/> class.
/// </summary>
/// <param name="parent">The parent node.</param>
/// <param name="type">The folder type.</param>
/// <param name="path">The folder path.</param>
protected ContentFolderTreeNode(ContentFolderTreeNode parent, ContentFolderType type, string path)
: base(false, Editor.Instance.Icons.FolderClosed32, Editor.Instance.Icons.FolderOpen32)
{
_folder = new ContentFolder(type, path, this);
Text = _folder.ShortName;
if (parent != null)
{
Folder.ParentFolder = parent.Folder;
Parent = parent;
}
IconColor = Color.Transparent; // Hide default icon, we draw scaled icon manually
UpdateCustomArrowRect();
Editor.Instance?.Windows?.ContentWin?.TryAutoExpandContentNode(this);
}
/// <summary>
/// Updates the custom arrow rectangle so it stays aligned with the current layout.
/// </summary>
private void UpdateCustomArrowRect()
{
var contentWindow = Editor.Instance?.Windows?.ContentWin;
var scale = contentWindow != null && contentWindow.IsTreeOnlyMode ? contentWindow.View.ViewScale : 1.0f;
var arrowSize = Mathf.Clamp(12.0f * scale, 10.0f, 20.0f);
var iconSize = Mathf.Clamp(16.0f * scale, 12.0f, 28.0f);
// Use the current text layout, not just cached values.
var textRect = TextRect;
var iconLeft = textRect.Left - iconSize - 2.0f;
var x = Mathf.Max(iconLeft - arrowSize - 2.0f, 0.0f);
var y = Mathf.Max((HeaderHeight - arrowSize) * 0.5f, 0.0f);
CustomArrowRect = new Rectangle(x, y, arrowSize, arrowSize);
}
/// <inheritdoc />
public override void PerformLayout(bool force = false)
{
base.PerformLayout(force);
UpdateCustomArrowRect();
}
/// <summary>
/// Shows the rename popup for the item.
/// </summary>
public void StartRenaming()
{
if (!_folder.CanRename)
return;
// Start renaming the folder
Editor.Instance.Windows.ContentWin.ScrollingOnTreeView(false);
var dialog = RenamePopup.Show(this, TextRect, _folder.ShortName, false);
dialog.Tag = _folder;
dialog.Renamed += popup =>
{
Editor.Instance.Windows.ContentWin.Rename((ContentFolder)popup.Tag, popup.Text);
Editor.Instance.Windows.ContentWin.ScrollingOnTreeView(true);
};
dialog.Closed += popup => { Editor.Instance.Windows.ContentWin.ScrollingOnTreeView(true); };
}
/// <summary>
/// Updates the query search filter.
/// </summary>
/// <param name="filterText">The filter text.</param>
public void UpdateFilter(string filterText)
{
bool noFilter = string.IsNullOrWhiteSpace(filterText);
// Update itself
bool isThisVisible;
if (noFilter)
{
// Clear filter
_highlights?.Clear();
isThisVisible = true;
}
else
{
var text = Text;
if (QueryFilterHelper.Match(filterText, text, out QueryFilterHelper.Range[] ranges))
{
// Update highlights
if (_highlights == null)
_highlights = new List<Rectangle>(ranges.Length);
else
_highlights.Clear();
var style = Style.Current;
var font = style.FontSmall;
var textRect = TextRect;
for (int i = 0; i < ranges.Length; i++)
{
var start = font.GetCharPosition(text, ranges[i].StartIndex);
var end = font.GetCharPosition(text, ranges[i].EndIndex);
_highlights.Add(new Rectangle(start.X + textRect.X, textRect.Y, end.X - start.X, textRect.Height));
}
isThisVisible = true;
}
else
{
// Hide
_highlights?.Clear();
isThisVisible = false;
}
}
// Update children
bool isAnyChildVisible = false;
for (int i = 0; i < _children.Count; i++)
{
if (_children[i] is ContentFolderTreeNode child)
{
child.UpdateFilter(filterText);
isAnyChildVisible |= child.Visible;
}
else if (_children[i] is ContentItemTreeNode itemNode)
{
itemNode.UpdateFilter(filterText);
isAnyChildVisible |= itemNode.Visible;
}
}
if (!noFilter)
{
bool isExpanded = isAnyChildVisible;
if (isExpanded)
Expand(true);
else
Collapse(true);
}
Visible = isThisVisible | isAnyChildVisible;
}
/// <inheritdoc />
public override int Compare(Control other)
{
if (other is ContentItemTreeNode)
return -1;
if (other is ContentFolderTreeNode otherNode)
return string.Compare(Text, otherNode.Text, StringComparison.Ordinal);
return base.Compare(other);
}
/// <inheritdoc />
public override void Draw()
{
base.Draw();
// Draw all highlights
if (_highlights != null)
{
var style = Style.Current;
var color = style.ProgressNormal * 0.6f;
for (int i = 0; i < _highlights.Count; i++)
Render2D.FillRectangle(_highlights[i], color);
}
var contentWindow = Editor.Instance.Windows.ContentWin;
var scale = contentWindow != null && contentWindow.IsTreeOnlyMode ? contentWindow.View.ViewScale : 1.0f;
var icon = IsExpanded ? Editor.Instance.Icons.FolderOpen32 : Editor.Instance.Icons.FolderClosed32;
var iconSize = Mathf.Clamp(16.0f * scale, 12.0f, 28.0f);
var iconRect = new Rectangle(TextRect.Left - iconSize - 2.0f, (HeaderHeight - iconSize) * 0.5f, iconSize, iconSize);
Render2D.DrawSprite(icon, iconRect);
}
/// <inheritdoc />
public override void OnDestroy()
{
// Delete folder item
_folder.Dispose();
base.OnDestroy();
}
/// <inheritdoc />
protected override void OnExpandedChanged()
{
base.OnExpandedChanged();
Editor.Instance?.Windows?.ContentWin?.OnContentTreeNodeExpandedChanged(this, IsExpanded);
}
private DragDropEffect GetDragEffect(DragData data)
{
if (_dragActors != null && _dragActors.HasValidDrag)
return DragDropEffect.Move;
if (data is DragDataFiles)
{
if (_folder.CanHaveAssets)
return DragDropEffect.Copy;
}
else
{
if (_dragOverItems != null && _dragOverItems.HasValidDrag)
return DragDropEffect.Move;
}
return DragDropEffect.None;
}
private bool ValidateDragItem(ContentItem item)
{
// Reject itself and any parent
return item != _folder && !item.Find(_folder);
}
private bool ValidateDragActors(ActorNode actor)
{
return actor.CanCreatePrefab && _folder.CanHaveAssets;
}
private void ImportActors(DragActors actors)
{
Select();
foreach (var actorNode in actors.Objects)
{
var actor = actorNode.Actor;
if (actors.Objects.Contains(actorNode.ParentNode as ActorNode))
continue;
Editor.Instance.Prefabs.CreatePrefab(actor, false);
}
Editor.Instance.Windows.ContentWin.RefreshView();
}
/// <inheritdoc />
protected override DragDropEffect OnDragEnterHeader(DragData data)
{
if (data is DragDataFiles)
return _folder.CanHaveAssets ? DragDropEffect.Copy : DragDropEffect.None;
if (_dragActors == null)
_dragActors = new DragActors(ValidateDragActors);
if (_dragActors.OnDragEnter(data))
return DragDropEffect.Move;
if (_dragOverItems == null)
_dragOverItems = new DragItems(ValidateDragItem);
_dragOverItems.OnDragEnter(data);
return GetDragEffect(data);
}
/// <inheritdoc />
protected override DragDropEffect OnDragMoveHeader(DragData data)
{
if (data is DragDataFiles)
return _folder.CanHaveAssets ? DragDropEffect.Copy : DragDropEffect.None;
if (_dragActors != null && _dragActors.HasValidDrag)
return DragDropEffect.Move;
return GetDragEffect(data);
}
/// <inheritdoc />
protected override void OnDragLeaveHeader()
{
_dragOverItems?.OnDragLeave();
_dragActors?.OnDragLeave();
base.OnDragLeaveHeader();
}
/// <inheritdoc />
protected override DragDropEffect OnDragDropHeader(DragData data)
{
var result = DragDropEffect.None;
// Check if drop element or files
if (data is DragDataFiles files)
{
// Import files
Editor.Instance.ContentImporting.Import(files.Files, _folder);
result = DragDropEffect.Copy;
Expand();
}
else if (_dragActors != null && _dragActors.HasValidDrag)
{
ImportActors(_dragActors);
_dragActors.OnDragDrop();
result = DragDropEffect.Move;
Expand();
}
else if (_dragOverItems != null && _dragOverItems.HasValidDrag)
{
// Move items
Editor.Instance.ContentDatabase.Move(_dragOverItems.Objects, _folder);
result = DragDropEffect.Move;
Expand();
}
_dragOverItems?.OnDragDrop();
return result;
}
/// <inheritdoc />
protected override void DoDragDrop()
{
DoDragDrop(DragItems.GetDragData(_folder));
}
/// <inheritdoc />
protected override void OnLongPress()
{
Select();
StartRenaming();
}
/// <inheritdoc />
public override bool OnKeyDown(KeyboardKeys key)
{
if (IsFocused)
{
switch (key)
{
case KeyboardKeys.F2:
StartRenaming();
return true;
case KeyboardKeys.Delete:
if (Folder.Exists && CanDelete)
Editor.Instance.Windows.ContentWin.Delete(Folder);
return true;
}
if (RootWindow.GetKey(KeyboardKeys.Control))
{
switch (key)
{
case KeyboardKeys.D:
if (Folder.Exists && CanDuplicate)
Editor.Instance.Windows.ContentWin.Duplicate(Folder);
return true;
}
}
}
return base.OnKeyDown(key);
}
}

View File

@@ -0,0 +1,224 @@
// Copyright (c) Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;
using FlaxEditor.Content.GUI;
using FlaxEditor.GUI.Drag;
using FlaxEditor.GUI.Tree;
using FlaxEditor.Utilities;
using FlaxEngine;
using FlaxEngine.GUI;
namespace FlaxEditor.Content;
/// <summary>
/// Tree node for non-folder content items.
/// </summary>
public sealed class ContentItemTreeNode : TreeNode, IContentItemOwner
{
private List<Rectangle> _highlights;
/// <summary>
/// The content item.
/// </summary>
public ContentItem Item { get; }
/// <summary>
/// Initializes a new instance of the <see cref="ContentItemTreeNode"/> class.
/// </summary>
/// <param name="item">The content item.</param>
public ContentItemTreeNode(ContentItem item)
: base(false, Editor.Instance.Icons.Document128, Editor.Instance.Icons.Document128)
{
Item = item ?? throw new ArgumentNullException(nameof(item));
UpdateDisplayedName();
IconColor = Color.Transparent; // Reserve icon space but draw custom thumbnail.
Item.AddReference(this);
}
private static SpriteHandle GetIcon(ContentItem item)
{
if (item == null)
return SpriteHandle.Invalid;
var icon = item.Thumbnail;
if (!icon.IsValid)
icon = item.DefaultThumbnail;
if (!icon.IsValid)
icon = Editor.Instance.Icons.Document128;
return icon;
}
/// <summary>
/// Updates the query search filter.
/// </summary>
/// <param name="filterText">The filter text.</param>
public void UpdateFilter(string filterText)
{
bool noFilter = string.IsNullOrWhiteSpace(filterText);
bool isVisible;
if (noFilter)
{
_highlights?.Clear();
isVisible = true;
}
else
{
var text = Text;
if (QueryFilterHelper.Match(filterText, text, out QueryFilterHelper.Range[] ranges))
{
if (_highlights == null)
_highlights = new List<Rectangle>(ranges.Length);
else
_highlights.Clear();
var style = Style.Current;
var font = style.FontSmall;
var textRect = TextRect;
for (int i = 0; i < ranges.Length; i++)
{
var start = font.GetCharPosition(text, ranges[i].StartIndex);
var end = font.GetCharPosition(text, ranges[i].EndIndex);
_highlights.Add(new Rectangle(start.X + textRect.X, textRect.Y, end.X - start.X, textRect.Height));
}
isVisible = true;
}
else
{
_highlights?.Clear();
isVisible = false;
}
}
Visible = isVisible;
}
/// <inheritdoc />
public override void Draw()
{
base.Draw();
var icon = GetIcon(Item);
if (icon.IsValid)
{
var contentWindow = Editor.Instance.Windows.ContentWin;
var scale = contentWindow != null && contentWindow.IsTreeOnlyMode ? contentWindow.View.ViewScale : 1.0f;
var iconSize = Mathf.Clamp(16.0f * scale, 12.0f, 28.0f);
var textRect = TextRect;
var iconRect = new Rectangle(textRect.Left - iconSize - 2.0f, (HeaderHeight - iconSize) * 0.5f, iconSize, iconSize);
Render2D.DrawSprite(icon, iconRect);
}
if (_highlights != null)
{
var style = Style.Current;
var color = style.ProgressNormal * 0.6f;
for (int i = 0; i < _highlights.Count; i++)
Render2D.FillRectangle(_highlights[i], color);
}
}
/// <inheritdoc />
protected override bool OnMouseDoubleClickHeader(ref Float2 location, MouseButton button)
{
if (button == MouseButton.Left)
{
Editor.Instance.Windows.ContentWin.Open(Item);
return true;
}
return base.OnMouseDoubleClickHeader(ref location, button);
}
/// <inheritdoc />
public override bool OnKeyDown(KeyboardKeys key)
{
if (IsFocused)
{
switch (key)
{
case KeyboardKeys.Return:
Editor.Instance.Windows.ContentWin.Open(Item);
return true;
case KeyboardKeys.F2:
Editor.Instance.Windows.ContentWin.Rename(Item);
return true;
case KeyboardKeys.Delete:
Editor.Instance.Windows.ContentWin.Delete(Item);
return true;
}
}
return base.OnKeyDown(key);
}
/// <inheritdoc />
protected override void DoDragDrop()
{
DoDragDrop(DragItems.GetDragData(Item));
}
/// <inheritdoc />
public override bool OnShowTooltip(out string text, out Float2 location, out Rectangle area)
{
Item.UpdateTooltipText();
TooltipText = Item.TooltipText;
return base.OnShowTooltip(out text, out location, out area);
}
/// <inheritdoc />
void IContentItemOwner.OnItemDeleted(ContentItem item)
{
}
/// <inheritdoc />
void IContentItemOwner.OnItemRenamed(ContentItem item)
{
UpdateDisplayedName();
}
/// <inheritdoc />
void IContentItemOwner.OnItemReimported(ContentItem item)
{
}
/// <inheritdoc />
void IContentItemOwner.OnItemDispose(ContentItem item)
{
}
/// <inheritdoc />
public override int Compare(Control other)
{
if (other is ContentFolderTreeNode)
return 1;
if (other is ContentItemTreeNode otherItem)
return ApplySortOrder(string.Compare(Text, otherItem.Text, StringComparison.InvariantCulture));
return base.Compare(other);
}
/// <inheritdoc />
public override void OnDestroy()
{
Item.RemoveReference(this);
base.OnDestroy();
}
/// <summary>
/// Updates the text of the node.
/// </summary>
public void UpdateDisplayedName()
{
var contentWindow = Editor.Instance?.Windows?.ContentWin;
var showExtensions = contentWindow?.View?.ShowFileExtensions ?? true;
Text = Item.ShowFileExtension || showExtensions ? Item.FileName : Item.ShortName;
}
private static SortType GetSortType()
{
return Editor.Instance?.Windows?.ContentWin?.CurrentSortType ?? SortType.AlphabeticOrder;
}
private static int ApplySortOrder(int result)
{
return GetSortType() == SortType.AlphabeticReverse ? -result : result;
}
}

View File

@@ -1,333 +0,0 @@
// Copyright (c) Wojciech Figat. All rights reserved.
using System.Collections.Generic;
using FlaxEditor.GUI;
using FlaxEditor.GUI.Drag;
using FlaxEditor.GUI.Tree;
using FlaxEditor.Utilities;
using FlaxEngine;
using FlaxEngine.GUI;
namespace FlaxEditor.Content
{
/// <summary>
/// Content folder tree node.
/// </summary>
/// <seealso cref="TreeNode" />
public class ContentTreeNode : TreeNode
{
private DragItems _dragOverItems;
private List<Rectangle> _highlights;
/// <summary>
/// The folder.
/// </summary>
protected ContentFolder _folder;
/// <summary>
/// Whether this node can be deleted.
/// </summary>
public virtual bool CanDelete => true;
/// <summary>
/// Whether this node can be duplicated.
/// </summary>
public virtual bool CanDuplicate => true;
/// <summary>
/// Gets the content folder item.
/// </summary>
public ContentFolder Folder => _folder;
/// <summary>
/// Gets the type of the folder.
/// </summary>
public ContentFolderType FolderType => _folder.FolderType;
/// <summary>
/// Returns true if that folder can import/manage scripts.
/// </summary>
public bool CanHaveScripts => _folder.CanHaveScripts;
/// <summary>
/// Returns true if that folder can import/manage assets.
/// </summary>
/// <returns>True if can contain assets for project, otherwise false</returns>
public bool CanHaveAssets => _folder.CanHaveAssets;
/// <summary>
/// Gets the parent node.
/// </summary>
public ContentTreeNode ParentNode => Parent as ContentTreeNode;
/// <summary>
/// Gets the folder path.
/// </summary>
public string Path => _folder.Path;
/// <summary>
/// Gets the navigation button label.
/// </summary>
public virtual string NavButtonLabel => _folder.ShortName;
/// <summary>
/// Initializes a new instance of the <see cref="ContentTreeNode"/> class.
/// </summary>
/// <param name="parent">The parent node.</param>
/// <param name="path">The folder path.</param>
public ContentTreeNode(ContentTreeNode parent, string path)
: this(parent, parent?.FolderType ?? ContentFolderType.Other, path)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="ContentTreeNode"/> class.
/// </summary>
/// <param name="parent">The parent node.</param>
/// <param name="type">The folder type.</param>
/// <param name="path">The folder path.</param>
protected ContentTreeNode(ContentTreeNode parent, ContentFolderType type, string path)
: base(false, Editor.Instance.Icons.FolderClosed32, Editor.Instance.Icons.FolderOpen32)
{
_folder = new ContentFolder(type, path, this);
Text = _folder.ShortName;
if (parent != null)
{
Folder.ParentFolder = parent.Folder;
Parent = parent;
}
IconColor = Style.Current.Foreground;
}
/// <summary>
/// Shows the rename popup for the item.
/// </summary>
public void StartRenaming()
{
if (!_folder.CanRename)
return;
// Start renaming the folder
Editor.Instance.Windows.ContentWin.ScrollingOnTreeView(false);
var dialog = RenamePopup.Show(this, TextRect, _folder.ShortName, false);
dialog.Tag = _folder;
dialog.Renamed += popup =>
{
Editor.Instance.Windows.ContentWin.Rename((ContentFolder)popup.Tag, popup.Text);
Editor.Instance.Windows.ContentWin.ScrollingOnTreeView(true);
};
dialog.Closed += popup => { Editor.Instance.Windows.ContentWin.ScrollingOnTreeView(true); };
}
/// <summary>
/// Updates the query search filter.
/// </summary>
/// <param name="filterText">The filter text.</param>
public void UpdateFilter(string filterText)
{
bool noFilter = string.IsNullOrWhiteSpace(filterText);
// Update itself
bool isThisVisible;
if (noFilter)
{
// Clear filter
_highlights?.Clear();
isThisVisible = true;
}
else
{
var text = Text;
if (QueryFilterHelper.Match(filterText, text, out QueryFilterHelper.Range[] ranges))
{
// Update highlights
if (_highlights == null)
_highlights = new List<Rectangle>(ranges.Length);
else
_highlights.Clear();
var style = Style.Current;
var font = style.FontSmall;
var textRect = TextRect;
for (int i = 0; i < ranges.Length; i++)
{
var start = font.GetCharPosition(text, ranges[i].StartIndex);
var end = font.GetCharPosition(text, ranges[i].EndIndex);
_highlights.Add(new Rectangle(start.X + textRect.X, textRect.Y, end.X - start.X, textRect.Height));
}
isThisVisible = true;
}
else
{
// Hide
_highlights?.Clear();
isThisVisible = false;
}
}
// Update children
bool isAnyChildVisible = false;
for (int i = 0; i < _children.Count; i++)
{
if (_children[i] is ContentTreeNode child)
{
child.UpdateFilter(filterText);
isAnyChildVisible |= child.Visible;
}
}
bool isExpanded = isAnyChildVisible;
if (isExpanded)
{
Expand(true);
}
else
{
Collapse(true);
}
Visible = isThisVisible | isAnyChildVisible;
}
/// <inheritdoc />
public override void Draw()
{
base.Draw();
// Draw all highlights
if (_highlights != null)
{
var style = Style.Current;
var color = style.ProgressNormal * 0.6f;
for (int i = 0; i < _highlights.Count; i++)
Render2D.FillRectangle(_highlights[i], color);
}
}
/// <inheritdoc />
public override void OnDestroy()
{
// Delete folder item
_folder.Dispose();
base.OnDestroy();
}
private DragDropEffect GetDragEffect(DragData data)
{
if (data is DragDataFiles)
{
if (_folder.CanHaveAssets)
return DragDropEffect.Copy;
}
else
{
if (_dragOverItems.HasValidDrag)
return DragDropEffect.Move;
}
return DragDropEffect.None;
}
private bool ValidateDragItem(ContentItem item)
{
// Reject itself and any parent
return item != _folder && !item.Find(_folder);
}
/// <inheritdoc />
protected override DragDropEffect OnDragEnterHeader(DragData data)
{
if (_dragOverItems == null)
_dragOverItems = new DragItems(ValidateDragItem);
_dragOverItems.OnDragEnter(data);
return GetDragEffect(data);
}
/// <inheritdoc />
protected override DragDropEffect OnDragMoveHeader(DragData data)
{
return GetDragEffect(data);
}
/// <inheritdoc />
protected override void OnDragLeaveHeader()
{
_dragOverItems.OnDragLeave();
base.OnDragLeaveHeader();
}
/// <inheritdoc />
protected override DragDropEffect OnDragDropHeader(DragData data)
{
var result = DragDropEffect.None;
// Check if drop element or files
if (data is DragDataFiles files)
{
// Import files
Editor.Instance.ContentImporting.Import(files.Files, _folder);
result = DragDropEffect.Copy;
Expand();
}
else if (_dragOverItems.HasValidDrag)
{
// Move items
Editor.Instance.ContentDatabase.Move(_dragOverItems.Objects, _folder);
result = DragDropEffect.Move;
Expand();
}
_dragOverItems.OnDragDrop();
return result;
}
/// <inheritdoc />
protected override void DoDragDrop()
{
DoDragDrop(DragItems.GetDragData(_folder));
}
/// <inheritdoc />
protected override void OnLongPress()
{
Select();
StartRenaming();
}
/// <inheritdoc />
public override bool OnKeyDown(KeyboardKeys key)
{
if (IsFocused)
{
switch (key)
{
case KeyboardKeys.F2:
StartRenaming();
return true;
case KeyboardKeys.Delete:
if (Folder.Exists && CanDelete)
Editor.Instance.Windows.ContentWin.Delete(Folder);
return true;
}
if (RootWindow.GetKey(KeyboardKeys.Control))
{
switch (key)
{
case KeyboardKeys.D:
if (Folder.Exists && CanDuplicate)
Editor.Instance.Windows.ContentWin.Duplicate(Folder);
return true;
}
}
}
return base.OnKeyDown(key);
}
}
}

View File

@@ -7,8 +7,8 @@ namespace FlaxEditor.Content
/// <summary> /// <summary>
/// Content tree node used for main directories. /// Content tree node used for main directories.
/// </summary> /// </summary>
/// <seealso cref="FlaxEditor.Content.ContentTreeNode" /> /// <seealso cref="ContentFolderTreeNode" />
public class MainContentTreeNode : ContentTreeNode public class MainContentFolderTreeNode : ContentFolderTreeNode
{ {
private FileSystemWatcher _watcher; private FileSystemWatcher _watcher;
@@ -19,12 +19,12 @@ namespace FlaxEditor.Content
public override bool CanDuplicate => false; public override bool CanDuplicate => false;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="MainContentTreeNode"/> class. /// Initializes a new instance of the <see cref="MainContentFolderTreeNode"/> class.
/// </summary> /// </summary>
/// <param name="parent">The parent project.</param> /// <param name="parent">The parent project.</param>
/// <param name="type">The folder type.</param> /// <param name="type">The folder type.</param>
/// <param name="path">The folder path.</param> /// <param name="path">The folder path.</param>
public MainContentTreeNode(ProjectTreeNode parent, ContentFolderType type, string path) public MainContentFolderTreeNode(ProjectFolderTreeNode parent, ContentFolderType type, string path)
: base(parent, type, path) : base(parent, type, path)
{ {
_watcher = new FileSystemWatcher(path) _watcher = new FileSystemWatcher(path)

View File

@@ -1,5 +1,6 @@
// Copyright (c) Wojciech Figat. All rights reserved. // Copyright (c) Wojciech Figat. All rights reserved.
using System;
using FlaxEngine.GUI; using FlaxEngine.GUI;
namespace FlaxEditor.Content namespace FlaxEditor.Content
@@ -7,8 +8,8 @@ namespace FlaxEditor.Content
/// <summary> /// <summary>
/// Root tree node for the project workspace. /// Root tree node for the project workspace.
/// </summary> /// </summary>
/// <seealso cref="FlaxEditor.Content.ContentTreeNode" /> /// <seealso cref="ContentFolderTreeNode" />
public sealed class ProjectTreeNode : ContentTreeNode public sealed class ProjectFolderTreeNode : ContentFolderTreeNode
{ {
/// <summary> /// <summary>
/// The project/ /// The project/
@@ -18,18 +19,18 @@ namespace FlaxEditor.Content
/// <summary> /// <summary>
/// The project content directory. /// The project content directory.
/// </summary> /// </summary>
public MainContentTreeNode Content; public MainContentFolderTreeNode Content;
/// <summary> /// <summary>
/// The project source code directory. /// The project source code directory.
/// </summary> /// </summary>
public MainContentTreeNode Source; public MainContentFolderTreeNode Source;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ProjectTreeNode"/> class. /// Initializes a new instance of the <see cref="ProjectFolderTreeNode"/> class.
/// </summary> /// </summary>
/// <param name="project">The project.</param> /// <param name="project">The project.</param>
public ProjectTreeNode(ProjectInfo project) public ProjectFolderTreeNode(ProjectInfo project)
: base(null, project.ProjectFolderPath) : base(null, project.ProjectFolderPath)
{ {
Project = project; Project = project;
@@ -48,9 +49,29 @@ namespace FlaxEditor.Content
/// <inheritdoc /> /// <inheritdoc />
public override int Compare(Control other) public override int Compare(Control other)
{ {
// Move the main game project to the top if (other is ProjectFolderTreeNode otherProject)
if (Project.Name == Editor.Instance.GameProject.Name) {
return -1; var gameProject = Editor.Instance.GameProject;
var engineProject = Editor.Instance.EngineProject;
bool isGame = Project == gameProject;
bool isEngine = Project == engineProject;
bool otherIsGame = otherProject.Project == gameProject;
bool otherIsEngine = otherProject.Project == engineProject;
// Main game project at the top
if (isGame && !otherIsGame)
return -1;
if (!isGame && otherIsGame)
return 1;
// Engine project at the bottom (when distinct)
if (isEngine && !otherIsEngine)
return 1;
if (!isEngine && otherIsEngine)
return -1;
return string.CompareOrdinal(Project.Name, otherProject.Project.Name);
}
return base.Compare(other); return base.Compare(other);
} }
} }

View File

@@ -5,13 +5,13 @@ namespace FlaxEditor.Content
/// <summary> /// <summary>
/// Root tree node for the content workspace. /// Root tree node for the content workspace.
/// </summary> /// </summary>
/// <seealso cref="FlaxEditor.Content.ContentTreeNode" /> /// <seealso cref="ContentFolderTreeNode" />
public sealed class RootContentTreeNode : ContentTreeNode public sealed class RootContentFolderTreeNode : ContentFolderTreeNode
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="RootContentTreeNode"/> class. /// Initializes a new instance of the <see cref="RootContentFolderTreeNode"/> class.
/// </summary> /// </summary>
public RootContentTreeNode() public RootContentFolderTreeNode()
: base(null, string.Empty) : base(null, string.Empty)
{ {
} }

View File

@@ -141,6 +141,11 @@ API_ENUM() enum class BuildPlatform
/// </summary> /// </summary>
API_ENUM(Attributes="EditorDisplay(null, \"Windows ARM64\")") API_ENUM(Attributes="EditorDisplay(null, \"Windows ARM64\")")
WindowsARM64 = 15, WindowsARM64 = 15,
/// <summary>
/// Web
/// </summary>
Web = 16,
}; };
/// <summary> /// <summary>
@@ -188,6 +193,11 @@ enum class DotNetAOTModes
/// Use Mono AOT to cross-compile all used C# assemblies into native platform static libraries which can be linked into a single shared library. /// Use Mono AOT to cross-compile all used C# assemblies into native platform static libraries which can be linked into a single shared library.
/// </summary> /// </summary>
MonoAOTStatic, MonoAOTStatic,
/// <summary>
/// Target platform doesn't support .NET or it has been disabled.
/// </summary>
NoDotnet,
}; };
extern FLAXENGINE_API const Char* ToString(const BuildPlatform platform); extern FLAXENGINE_API const Char* ToString(const BuildPlatform platform);

View File

@@ -69,6 +69,10 @@
#include "Platform/iOS/iOSPlatformTools.h" #include "Platform/iOS/iOSPlatformTools.h"
#include "Engine/Platform/iOS/iOSPlatformSettings.h" #include "Engine/Platform/iOS/iOSPlatformSettings.h"
#endif #endif
#if PLATFORM_TOOLS_WEB
#include "Platform/Web/WebPlatformTools.h"
#include "Engine/Platform/Web/WebPlatformSettings.h"
#endif
namespace GameCookerImpl namespace GameCookerImpl
{ {
@@ -151,6 +155,8 @@ const Char* ToString(const BuildPlatform platform)
return TEXT("iOS ARM64"); return TEXT("iOS ARM64");
case BuildPlatform::WindowsARM64: case BuildPlatform::WindowsARM64:
return TEXT("Windows ARM64"); return TEXT("Windows ARM64");
case BuildPlatform::Web:
return TEXT("Web");
default: default:
return TEXT(""); return TEXT("");
} }
@@ -183,6 +189,8 @@ const Char* ToString(const DotNetAOTModes mode)
return TEXT("MonoAOTDynamic"); return TEXT("MonoAOTDynamic");
case DotNetAOTModes::MonoAOTStatic: case DotNetAOTModes::MonoAOTStatic:
return TEXT("MonoAOTStatic"); return TEXT("MonoAOTStatic");
case DotNetAOTModes::NoDotnet:
return TEXT("NoDotnet");
default: default:
return TEXT(""); return TEXT("");
} }
@@ -307,6 +315,10 @@ void CookingData::GetBuildPlatformName(const Char*& platform, const Char*& archi
platform = TEXT("Windows"); platform = TEXT("Windows");
architecture = TEXT("ARM64"); architecture = TEXT("ARM64");
break; break;
case BuildPlatform::Web:
platform = TEXT("Web");
architecture = TEXT("x86");
break;
default: default:
LOG(Fatal, "Unknown or unsupported build platform."); LOG(Fatal, "Unknown or unsupported build platform.");
} }
@@ -461,6 +473,11 @@ PlatformTools* GameCooker::GetTools(BuildPlatform platform)
case BuildPlatform::iOSARM64: case BuildPlatform::iOSARM64:
result = New<iOSPlatformTools>(); result = New<iOSPlatformTools>();
break; break;
#endif
#if PLATFORM_TOOLS_WEB
case BuildPlatform::Web:
result = New<WebPlatformTools>();
break;
#endif #endif
} }
Tools.Add(platform, result); Tools.Add(platform, result);
@@ -518,7 +535,8 @@ bool GameCooker::Build(BuildPlatform platform, BuildConfiguration configuration,
{ {
Function<int32()> f; Function<int32()> f;
f.Bind(ThreadFunction); f.Bind(ThreadFunction);
const auto thread = ThreadSpawner::Start(f, GameCookerServiceInstance.Name, ThreadPriority::Highest); uint32 stackSize = 4 * 1024 * 1024; // Larger stack
const auto thread = ThreadSpawner::Start(f, GameCookerServiceInstance.Name, ThreadPriority::Highest, stackSize);
if (thread == nullptr) if (thread == nullptr)
{ {
GameCookerImpl::IsRunning = false; GameCookerImpl::IsRunning = false;
@@ -604,6 +622,9 @@ void GameCooker::GetCurrentPlatform(PlatformType& platform, BuildPlatform& build
case PlatformType::iOS: case PlatformType::iOS:
buildPlatform = BuildPlatform::iOSARM64; buildPlatform = BuildPlatform::iOSARM64;
break; break;
case PlatformType::Web:
buildPlatform = BuildPlatform::Web;
break;
default: ; default: ;
} }
} }

View File

@@ -106,6 +106,7 @@ namespace FlaxEditor
case BuildPlatform.MacOSARM64: case BuildPlatform.MacOSARM64:
case BuildPlatform.MacOSx64: return PlatformType.Mac; case BuildPlatform.MacOSx64: return PlatformType.Mac;
case BuildPlatform.iOSARM64: return PlatformType.iOS; case BuildPlatform.iOSARM64: return PlatformType.iOS;
case BuildPlatform.Web: return PlatformType.Web;
default: throw new ArgumentOutOfRangeException(nameof(buildPlatform), buildPlatform, null); default: throw new ArgumentOutOfRangeException(nameof(buildPlatform), buildPlatform, null);
} }
} }

View File

@@ -138,6 +138,7 @@ Array<byte> AndroidPlatformTools::SaveCache(CookingData& data, IBuildCache* cach
result.Add((const byte*)&platformCache, sizeof(platformCache)); result.Add((const byte*)&platformCache, sizeof(platformCache));
return result; return result;
} }
void AndroidPlatformTools::OnBuildStarted(CookingData& data) void AndroidPlatformTools::OnBuildStarted(CookingData& data)
{ {
// Adjust the cooking output folder to be located inside the Gradle assets directory // Adjust the cooking output folder to be located inside the Gradle assets directory
@@ -412,7 +413,6 @@ bool AndroidPlatformTools::OnPostProcess(CookingData& data)
} }
LOG(Info, "Output Android APK application package: {0} (size: {1} MB)", outputApk, FileSystem::GetFileSize(outputApk) / 1024 / 1024); LOG(Info, "Output Android APK application package: {0} (size: {1} MB)", outputApk, FileSystem::GetFileSize(outputApk) / 1024 / 1024);
return false; return false;
} }

View File

@@ -0,0 +1,270 @@
// Copyright (c) Wojciech Figat. All rights reserved.
#if PLATFORM_TOOLS_WEB
#include "WebPlatformTools.h"
#include "Engine/Platform/File.h"
#include "Engine/Platform/FileSystem.h"
#include "Engine/Platform/CreateProcessSettings.h"
#include "Engine/Platform/Web/WebPlatformSettings.h"
#include "Engine/Core/Types/Span.h"
#include "Engine/Core/Math/Vector2.h"
#include "Engine/Core/Config/GameSettings.h"
#include "Engine/Core/Config/BuildSettings.h"
#include "Engine/Content/Content.h"
#include "Engine/Content/JsonAsset.h"
#include "Engine/Graphics/PixelFormatExtensions.h"
#include "Engine/Graphics/Textures/TextureBase.h"
#include "Editor/Cooker/GameCooker.h"
IMPLEMENT_SETTINGS_GETTER(WebPlatformSettings, WebPlatform);
namespace
{
struct WebPlatformCache
{
WebPlatformSettings::TextureCompression TexturesCompression;
};
}
const Char* WebPlatformTools::GetDisplayName() const
{
return TEXT("Web");
}
const Char* WebPlatformTools::GetName() const
{
return TEXT("Web");
}
PlatformType WebPlatformTools::GetPlatform() const
{
return PlatformType::Web;
}
ArchitectureType WebPlatformTools::GetArchitecture() const
{
return ArchitectureType::x86;
}
DotNetAOTModes WebPlatformTools::UseAOT() const
{
return DotNetAOTModes::NoDotnet;
}
PixelFormat WebPlatformTools::GetTextureFormat(CookingData& data, TextureBase* texture, PixelFormat format)
{
const auto platformSettings = WebPlatformSettings::Get();
const auto uncompressed = PixelFormatExtensions::FindUncompressedFormat(format);
switch (platformSettings->TexturesCompression)
{
case WebPlatformSettings::TextureCompression::Uncompressed:
return uncompressed;
case WebPlatformSettings::TextureCompression::BC:
return format;
case WebPlatformSettings::TextureCompression::ASTC:
switch (format)
{
case PixelFormat::BC4_SNorm:
return PixelFormat::R8_SNorm;
case PixelFormat::BC5_SNorm:
return PixelFormat::R16G16_SNorm;
case PixelFormat::BC6H_Typeless:
case PixelFormat::BC6H_Uf16:
case PixelFormat::BC6H_Sf16:
case PixelFormat::BC7_Typeless:
case PixelFormat::BC7_UNorm:
case PixelFormat::BC7_UNorm_sRGB:
return PixelFormat::R16G16B16A16_Float; // TODO: ASTC HDR
default:
return PixelFormatExtensions::IsSRGB(format) ? PixelFormat::ASTC_6x6_UNorm_sRGB : PixelFormat::ASTC_6x6_UNorm;
}
case WebPlatformSettings::TextureCompression::Basis:
switch (format)
{
case PixelFormat::BC7_Typeless:
case PixelFormat::BC7_UNorm:
case PixelFormat::BC7_UNorm_sRGB:
return PixelFormat::R16G16B16A16_Float; // Basic Universal doesn't support alpha in BC7 (and it can be loaded only from LDR formats)
default:
if (uncompressed != format && texture->Size().MinValue() >= 16)
return PixelFormat::Basis;
return uncompressed;
}
default:
return format;
}
}
void WebPlatformTools::LoadCache(CookingData& data, IBuildCache* cache, const Span<byte>& bytes)
{
const auto platformSettings = WebPlatformSettings::Get();
bool invalidTextures = true;
if (bytes.Length() == sizeof(WebPlatformCache))
{
auto* platformCache = (WebPlatformCache*)bytes.Get();
invalidTextures = platformCache->TexturesCompression != platformSettings->TexturesCompression;
}
if (invalidTextures)
{
LOG(Info, "{0} option has been modified.", TEXT("TexturesQuality"));
cache->InvalidateCacheTextures();
}
}
Array<byte> WebPlatformTools::SaveCache(CookingData& data, IBuildCache* cache)
{
const auto platformSettings = WebPlatformSettings::Get();
WebPlatformCache platformCache;
platformCache.TexturesCompression = platformSettings->TexturesCompression;
Array<byte> result;
result.Add((const byte*)&platformCache, sizeof(platformCache));
return result;
}
bool WebPlatformTools::IsNativeCodeFile(CookingData& data, const String& file)
{
String extension = FileSystem::GetExtension(file);
return extension.IsEmpty() || extension == TEXT("html") || extension == TEXT("js") || extension == TEXT("wasm");
}
void WebPlatformTools::OnBuildStarted(CookingData& data)
{
// Adjust the cooking output folder for the data files so file_packager tool can compress and output final data inside the cooker output folder
data.DataOutputPath = data.CacheDirectory / TEXT("Files");
}
bool WebPlatformTools::OnPostProcess(CookingData& data)
{
const auto gameSettings = GameSettings::Get();
const auto platformSettings = WebPlatformSettings::Get();
const auto platformDataPath = data.GetPlatformBinariesRoot();
// Get name of the output binary (JavaScript and WebAssembly files match)
String gameJs;
{
Array<String> files;
FileSystem::DirectoryGetFiles(files, data.OriginalOutputPath, TEXT("*"), DirectorySearchOption::TopDirectoryOnly);
for (const String& file : files)
{
if (file.EndsWith(TEXT(".js")))
{
String outputWasm = String(StringUtils::GetPathWithoutExtension(file)) + TEXT(".wasm");
if (files.Contains(outputWasm))
{
gameJs = file;
break;
}
}
}
}
if (gameJs.IsEmpty())
{
data.Error(TEXT("Failed to find the main JavaScript for the output game"));
return true;
}
// Move .wasm assemblies into the data files in order for dlopen to work (blocking)
{
Array<String> files;
FileSystem::DirectoryGetFiles(files, data.OriginalOutputPath, TEXT("*.wasm"), DirectorySearchOption::AllDirectories);
StringView gameWasm = StringUtils::GetFileNameWithoutExtension(gameJs);
for (const String& file : files)
{
if (StringUtils::GetFileNameWithoutExtension(file) == gameWasm)
continue; // Skip the main game module
FileSystem::MoveFile(data.DataOutputPath / StringUtils::GetFileName(file), file, true);
}
}
// Pack data files into a single file using Emscripten's file_packager tool
{
CreateProcessSettings procSettings;
String emscriptenSdk = TEXT("EMSDK");
Platform::GetEnvironmentVariable(emscriptenSdk, emscriptenSdk);
procSettings.FileName = emscriptenSdk / TEXT("upstream/emscripten/tools/file_packager");
#if PLATFORM_WIN32
procSettings.FileName += TEXT(".bat");
#endif
procSettings.Arguments = String::Format(TEXT("files.data --preload \"{}@/\" --lz4 --js-output=files.js"), data.DataOutputPath);
procSettings.WorkingDirectory = data.OriginalOutputPath;
const int32 result = Platform::CreateProcess(procSettings);
if (result != 0)
{
if (!FileSystem::FileExists(procSettings.FileName))
data.Error(TEXT("Missing file_packager.bat. Ensure Emscripten SDK installation is valid and 'EMSDK' environment variable points to it."));
data.Error(String::Format(TEXT("Failed to package project files (result code: {0}). See log for more info."), result));
return true;
}
}
// Copy icon file
{
String dstIcon = data.OriginalOutputPath / TEXT("favicon.ico");
if (!FileSystem::FileExists(dstIcon))
FileSystem::CopyFile(dstIcon, platformDataPath / TEXT("favicon.ico"));
}
// Copy custom HTMl template
auto customHtml = platformSettings->CustomHtml.TrimTrailing();
if (customHtml.HasChars())
{
FileSystem::CopyFile(data.OriginalOutputPath / TEXT("FlaxGame.html"), customHtml);
}
// Rename game website main HTML file to match the most common name used by web servers (index.html)
FileSystem::MoveFile(data.OriginalOutputPath / TEXT("index.html"), data.OriginalOutputPath / TEXT("FlaxGame.html"), true);
// Insert packaged file system with game data
{
String gameJsText;
if (File::ReadAllText(gameJs, gameJsText))
{
data.Error(String::Format(TEXT("Failed to load file '{}'"), gameJs));
return true;
}
const String filesIncludeBegin = TEXT("// include: files.js");
const String filesIncludeEnd = TEXT("// end include: files.js");
String fileJs = data.OriginalOutputPath / TEXT("files.js");
if (!gameJsText.Contains(filesIncludeBegin))
{
// Insert generated files.js into the main game file after the minimum_runtime_check.js include
String fileJsText;
if (File::ReadAllText(fileJs, fileJsText))
{
data.Error(String::Format(TEXT("Failed to load file '{}'"), fileJs));
return true;
}
const String insertPrefixLocation = TEXT("// end include: minimum_runtime_check.js");
int32 location = gameJsText.Find(insertPrefixLocation);
if (location != -1)
{
location += insertPrefixLocation.Length() + 1;
fileJsText = filesIncludeBegin + TEXT("\n") + fileJsText + TEXT("\n") + filesIncludeEnd + TEXT("\n");
gameJsText.Insert(location, fileJsText);
}
else
{
// Comments are missing in Release when JS/HTML are minified
fileJsText.Insert(0, filesIncludeBegin);
fileJsText.Insert(0, TEXT("\n"));
gameJsText.Insert(0, fileJsText);
}
File::WriteAllText(gameJs, gameJsText, Encoding::UTF8);
}
// Remove the generated files.js as it's now included in the main game JS file
FileSystem::DeleteFile(fileJs);
}
const auto buildSettings = BuildSettings::Get();
if (buildSettings->SkipPackaging)
return false;
GameCooker::PackageFiles();
LOG(Info, "Output website size: {0} MB", FileSystem::GetDirectorySize(data.OriginalOutputPath) / 1024 / 1024);
return false;
}
#endif

View File

@@ -0,0 +1,29 @@
// Copyright (c) Wojciech Figat. All rights reserved.
#pragma once
#if PLATFORM_TOOLS_WEB
#include "../../PlatformTools.h"
/// <summary>
/// The Web platform support tools.
/// </summary>
class WebPlatformTools : public PlatformTools
{
public:
// [PlatformTools]
const Char* GetDisplayName() const override;
const Char* GetName() const override;
PlatformType GetPlatform() const override;
ArchitectureType GetArchitecture() const override;
DotNetAOTModes UseAOT() const override;
PixelFormat GetTextureFormat(CookingData& data, TextureBase* texture, PixelFormat format) override;
void LoadCache(CookingData& data, IBuildCache* cache, const Span<byte>& bytes) override;
Array<byte> SaveCache(CookingData& data, IBuildCache* cache) override;
bool IsNativeCodeFile(CookingData& data, const String& file) override;
void OnBuildStarted(CookingData& data) override;
bool OnPostProcess(CookingData& data) override;
};
#endif

View File

@@ -572,6 +572,14 @@ bool ProcessShaderBase(CookAssetsStep::AssetCookData& data, ShaderAssetBase* ass
COMPILE_PROFILE(Vulkan_SM5, SHADER_FILE_CHUNK_INTERNAL_VULKAN_SM5_CACHE); COMPILE_PROFILE(Vulkan_SM5, SHADER_FILE_CHUNK_INTERNAL_VULKAN_SM5_CACHE);
break; break;
} }
#endif
#if PLATFORM_TOOLS_WEB
case BuildPlatform::Web:
{
const char* platformDefineName = "PLATFORM_WEB";
COMPILE_PROFILE(WebGPU, SHADER_FILE_CHUNK_INTERNAL_GENERIC_CACHE);
break;
}
#endif #endif
default: default:
{ {
@@ -734,37 +742,8 @@ bool ProcessTextureBase(CookAssetsStep::AssetCookData& data)
{ {
auto chunk = New<FlaxChunk>(); auto chunk = New<FlaxChunk>();
data.InitData.Header.Chunks[mipIndex] = chunk; data.InitData.Header.Chunks[mipIndex] = chunk;
if (TextureTool::WriteTextureData(chunk->Data, *textureData, mipIndex))
// Calculate the texture data storage layout return true;
uint32 rowPitch, slicePitch;
const int32 mipWidth = Math::Max(1, textureData->Width >> mipIndex);
const int32 mipHeight = Math::Max(1, textureData->Height >> mipIndex);
RenderTools::ComputePitch(textureData->Format, mipWidth, mipHeight, rowPitch, slicePitch);
chunk->Data.Allocate(slicePitch * textureData->GetArraySize());
// Copy array slices into mip data (sequential)
for (int32 arrayIndex = 0; arrayIndex < textureData->Items.Count(); arrayIndex++)
{
auto& mipData = textureData->Items[arrayIndex].Mips[mipIndex];
byte* src = mipData.Data.Get();
byte* dst = chunk->Data.Get() + (slicePitch * arrayIndex);
// Faster path if source and destination data layout matches
if (rowPitch == mipData.RowPitch && slicePitch == mipData.DepthPitch)
{
Platform::MemoryCopy(dst, src, slicePitch);
}
else
{
const auto copyRowSize = Math::Min(mipData.RowPitch, rowPitch);
for (uint32 line = 0; line < mipData.Lines; line++)
{
Platform::MemoryCopy(dst, src, copyRowSize);
src += mipData.RowPitch;
dst += rowPitch;
}
}
}
} }
// Clone any custom asset chunks (eg. sprite atlas data, mips are in 0-13 chunks) // Clone any custom asset chunks (eg. sprite atlas data, mips are in 0-13 chunks)

View File

@@ -39,17 +39,23 @@ bool DeployDataStep::Perform(CookingData& data)
} }
String dstDotnet = data.DataOutputPath / TEXT("Dotnet"); String dstDotnet = data.DataOutputPath / TEXT("Dotnet");
const DotNetAOTModes aotMode = data.Tools->UseAOT(); const DotNetAOTModes aotMode = data.Tools->UseAOT();
const bool usAOT = aotMode != DotNetAOTModes::None; const bool usAOT = aotMode != DotNetAOTModes::None && aotMode != DotNetAOTModes::NoDotnet;
if (usAOT) if (usAOT)
{ {
// Deploy Dotnet files into intermediate cooking directory for AOT // Deploy Dotnet files into intermediate cooking directory for AOT
FileSystem::DeleteDirectory(dstDotnet); FileSystem::DeleteDirectory(dstDotnet);
dstDotnet = data.ManagedCodeOutputPath; dstDotnet = data.ManagedCodeOutputPath;
} }
if (buildSettings.SkipDotnetPackaging && data.Tools->UseSystemDotnet()) if (aotMode == DotNetAOTModes::NoDotnet)
{
// No .NET
FileSystem::DeleteDirectory(dstDotnet);
}
else if (buildSettings.SkipDotnetPackaging && data.Tools->UseSystemDotnet())
{ {
// Use system-installed .NET Runtime // Use system-installed .NET Runtime
FileSystem::DeleteDirectory(dstDotnet); FileSystem::DeleteDirectory(dstDotnet);
LOG(Info, "Not using .NET Runtime");
} }
else else
{ {

View File

@@ -12,7 +12,9 @@
void PrecompileAssembliesStep::OnBuildStarted(CookingData& data) void PrecompileAssembliesStep::OnBuildStarted(CookingData& data)
{ {
const DotNetAOTModes aotMode = data.Tools->UseAOT(); const DotNetAOTModes aotMode = data.Tools->UseAOT();
if (aotMode == DotNetAOTModes::None || EnumHasAllFlags(data.Options, BuildOptions::NoCook)) if (aotMode == DotNetAOTModes::None ||
aotMode == DotNetAOTModes::NoDotnet ||
EnumHasAllFlags(data.Options, BuildOptions::NoCook))
return; return;
const auto& buildSettings = *BuildSettings::Get(); const auto& buildSettings = *BuildSettings::Get();
@@ -49,7 +51,8 @@ void PrecompileAssembliesStep::OnBuildStarted(CookingData& data)
bool PrecompileAssembliesStep::Perform(CookingData& data) bool PrecompileAssembliesStep::Perform(CookingData& data)
{ {
const DotNetAOTModes aotMode = data.Tools->UseAOT(); const DotNetAOTModes aotMode = data.Tools->UseAOT();
if (aotMode == DotNetAOTModes::None) if (aotMode == DotNetAOTModes::None ||
aotMode == DotNetAOTModes::NoDotnet)
return false; return false;
const auto& buildSettings = *BuildSettings::Get(); const auto& buildSettings = *BuildSettings::Get();
if (buildSettings.SkipDotnetPackaging && data.Tools->UseSystemDotnet()) if (buildSettings.SkipDotnetPackaging && data.Tools->UseSystemDotnet())

View File

@@ -52,6 +52,7 @@ namespace FlaxEditor.CustomEditors
private readonly List<CustomEditor> _children = new List<CustomEditor>(); private readonly List<CustomEditor> _children = new List<CustomEditor>();
private ValueContainer _values; private ValueContainer _values;
private bool _isSetBlocked; private bool _isSetBlocked;
private bool _isRebuilding;
private bool _skipChildrenRefresh; private bool _skipChildrenRefresh;
private bool _hasValueDirty; private bool _hasValueDirty;
private bool _rebuildOnRefresh; private bool _rebuildOnRefresh;
@@ -178,7 +179,7 @@ namespace FlaxEditor.CustomEditors
public void RebuildLayout() public void RebuildLayout()
{ {
// Skip rebuilding during init // Skip rebuilding during init
if (CurrentCustomEditor == this) if (CurrentCustomEditor == this || _isRebuilding)
return; return;
// Special case for root objects to run normal layout build // Special case for root objects to run normal layout build
@@ -197,6 +198,7 @@ namespace FlaxEditor.CustomEditors
_parent?.RebuildLayout(); _parent?.RebuildLayout();
return; return;
} }
_isRebuilding = true;
var control = layout.ContainerControl; var control = layout.ContainerControl;
var parent = _parent; var parent = _parent;
var parentScrollV = (_presenter?.Panel.Parent as Panel)?.VScrollBar?.Value ?? -1; var parentScrollV = (_presenter?.Panel.Parent as Panel)?.VScrollBar?.Value ?? -1;
@@ -216,6 +218,7 @@ namespace FlaxEditor.CustomEditors
// Restore scroll value // Restore scroll value
if (parentScrollV > -1 && _presenter != null && _presenter.Panel.Parent is Panel panel && panel.VScrollBar != null) if (parentScrollV > -1 && _presenter != null && _presenter.Panel.Parent is Panel panel && panel.VScrollBar != null)
panel.VScrollBar.Value = parentScrollV; panel.VScrollBar.Value = parentScrollV;
_isRebuilding = false;
} }
/// <summary> /// <summary>

View File

@@ -55,9 +55,8 @@ namespace FlaxEditor.CustomEditors.Dedicated
{ {
// TODO: consider editing more than one instance of the same prefab asset at once // TODO: consider editing more than one instance of the same prefab asset at once
var prefab = FlaxEngine.Content.LoadAsync<Prefab>(actor.PrefabID); var prefab = FlaxEngine.Content.Load<Prefab>(actor.PrefabID);
// TODO: don't stall here? if (prefab)
if (prefab && !prefab.WaitForLoaded())
{ {
var prefabObjectId = actor.PrefabObjectID; var prefabObjectId = actor.PrefabObjectID;
var prefabInstance = prefab.GetDefaultInstance(ref prefabObjectId); var prefabInstance = prefab.GetDefaultInstance(ref prefabObjectId);
@@ -203,7 +202,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
//Presenter.BuildLayoutOnUpdate(); //Presenter.BuildLayoutOnUpdate();
// Better way is to just update the reference value using the new default instance of the prefab, created after changes apply // Better way is to just update the reference value using the new default instance of the prefab, created after changes apply
if (Values != null && prefab && !prefab.WaitForLoaded()) if (Values != null && (Actor)Values[0] && prefab && !prefab.WaitForLoaded())
{ {
var actor = (Actor)Values[0]; var actor = (Actor)Values[0];
var prefabObjectId = actor.PrefabObjectID; var prefabObjectId = actor.PrefabObjectID;

View File

@@ -103,11 +103,12 @@ namespace FlaxEditor.CustomEditors.Dedicated
var actors = ScriptsEditor.ParentEditor.Values; var actors = ScriptsEditor.ParentEditor.Values;
foreach (var a in actors) foreach (var a in actors)
{ {
if (a.GetType() != requireActor.RequiredType) if (a.GetType() == requireActor.RequiredType)
{ continue;
item.Enabled = false; if (requireActor.IncludeInheritedTypes && a.GetType().IsSubclassOf(requireActor.RequiredType))
break; continue;
} item.Enabled = false;
break;
} }
} }
cm.AddItem(item); cm.AddItem(item);
@@ -739,6 +740,8 @@ namespace FlaxEditor.CustomEditors.Dedicated
/// <inheritdoc /> /// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout) public override void Initialize(LayoutElementsContainer layout)
{ {
var style = FlaxEngine.GUI.Style.Current;
// Area for drag&drop scripts // Area for drag&drop scripts
var dragArea = layout.CustomContainer<DragAreaControl>(); var dragArea = layout.CustomContainer<DragAreaControl>();
dragArea.CustomControl.ScriptsEditor = this; dragArea.CustomControl.ScriptsEditor = this;
@@ -800,17 +803,10 @@ namespace FlaxEditor.CustomEditors.Dedicated
bool hasAllRequirements = true; bool hasAllRequirements = true;
if (scriptType.HasAttribute(typeof(RequireScriptAttribute), false)) if (scriptType.HasAttribute(typeof(RequireScriptAttribute), false))
{ {
RequireScriptAttribute scriptAttribute = null; var attribute = (RequireScriptAttribute)scriptType.GetAttributes(false).FirstOrDefault(x => x is RequireScriptAttribute);
foreach (var e in scriptType.GetAttributes(false)) if (attribute != null)
{ {
if (e is not RequireScriptAttribute requireScriptAttribute) foreach (var type in attribute.RequiredTypes)
continue;
scriptAttribute = requireScriptAttribute;
}
if (scriptAttribute != null)
{
foreach (var type in scriptAttribute.RequiredTypes)
{ {
if (!type.IsSubclassOf(typeof(Script))) if (!type.IsSubclassOf(typeof(Script)))
continue; continue;
@@ -825,19 +821,11 @@ namespace FlaxEditor.CustomEditors.Dedicated
} }
if (scriptType.HasAttribute(typeof(RequireActorAttribute), false)) if (scriptType.HasAttribute(typeof(RequireActorAttribute), false))
{ {
RequireActorAttribute attribute = null; var attribute = (RequireActorAttribute)scriptType.GetAttributes(false).FirstOrDefault(x => x is RequireActorAttribute);
foreach (var e in scriptType.GetAttributes(false))
{
if (e is not RequireActorAttribute requireActorAttribute)
continue;
attribute = requireActorAttribute;
break;
}
if (attribute != null) if (attribute != null)
{ {
var actor = script.Actor; var actor = script.Actor;
if (actor.GetType() != attribute.RequiredType && !actor.GetType().IsSubclassOf(attribute.RequiredType)) if (actor.GetType() != attribute.RequiredType && (attribute.IncludeInheritedTypes && !actor.GetType().IsSubclassOf(attribute.RequiredType)))
{ {
Editor.LogWarning($"`{Utilities.Utils.GetPropertyNameUI(scriptType.Name)}` on `{script.Actor}` is missing a required Actor of type `{attribute.RequiredType}`."); Editor.LogWarning($"`{Utilities.Utils.GetPropertyNameUI(scriptType.Name)}` on `{script.Actor}` is missing a required Actor of type `{attribute.RequiredType}`.");
hasAllRequirements = false; hasAllRequirements = false;
@@ -850,7 +838,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
var title = Utilities.Utils.GetPropertyNameUI(scriptType.Name); var title = Utilities.Utils.GetPropertyNameUI(scriptType.Name);
var group = layout.Group(title, editor); var group = layout.Group(title, editor);
if (!hasAllRequirements) if (!hasAllRequirements)
group.Panel.HeaderTextColor = FlaxEngine.GUI.Style.Current.Statusbar.Failed; group.Panel.HeaderTextColor = style.Statusbar.Failed;
if ((Presenter.Features & FeatureFlags.CacheExpandedGroups) != 0) if ((Presenter.Features & FeatureFlags.CacheExpandedGroups) != 0)
{ {
if (Editor.Instance.ProjectCache.IsGroupToggled(title)) if (Editor.Instance.ProjectCache.IsGroupToggled(title))
@@ -863,9 +851,10 @@ namespace FlaxEditor.CustomEditors.Dedicated
group.Panel.Open(); group.Panel.Open();
// Customize // Customize
float totalHeaderButtonsOffset = 0f;
group.Panel.TooltipText = Editor.Instance.CodeDocs.GetTooltip(scriptType); group.Panel.TooltipText = Editor.Instance.CodeDocs.GetTooltip(scriptType);
if (script.HasPrefabLink) if (script.HasPrefabLink)
group.Panel.HeaderTextColor = FlaxEngine.GUI.Style.Current.ProgressNormal; group.Panel.HeaderTextColor = style.ProgressNormal;
// Add toggle button to the group // Add toggle button to the group
var headerHeight = group.Panel.HeaderHeight; var headerHeight = group.Panel.HeaderHeight;
@@ -889,7 +878,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
TooltipText = "Script reference.", TooltipText = "Script reference.",
AutoFocus = true, AutoFocus = true,
IsScrollable = false, IsScrollable = false,
Color = FlaxEngine.GUI.Style.Current.ForegroundGrey, Color = style.ForegroundGrey,
Parent = group.Panel, Parent = group.Panel,
Bounds = new Rectangle(scriptToggle.Right, 0.5f, headerHeight, headerHeight), Bounds = new Rectangle(scriptToggle.Right, 0.5f, headerHeight, headerHeight),
Margin = new Margin(1), Margin = new Margin(1),
@@ -908,10 +897,35 @@ namespace FlaxEditor.CustomEditors.Dedicated
var settingsButton = group.AddSettingsButton(); var settingsButton = group.AddSettingsButton();
settingsButton.Tag = script; settingsButton.Tag = script;
settingsButton.Clicked += OnSettingsButtonClicked; settingsButton.Clicked += OnSettingsButtonClicked;
totalHeaderButtonsOffset += settingsButton.Width + FlaxEditor.Utilities.Constants.UIMargin;
// Add script obsolete icon to the group
if (scriptType.HasAttribute(typeof(ObsoleteAttribute), false))
{
var attribute = (ObsoleteAttribute)scriptType.GetAttributes(false).First(x => x is ObsoleteAttribute);
var tooltip = "Script marked as obsolete." +
(string.IsNullOrEmpty(attribute.Message) ? "" : $"\n{attribute.Message}") +
(string.IsNullOrEmpty(attribute.DiagnosticId) ? "" : $"\n{attribute.DiagnosticId}");
var obsoleteButton = group.AddHeaderButton(tooltip, totalHeaderButtonsOffset, Editor.Instance.Icons.Info32);
obsoleteButton.Color = Color.Orange;
obsoleteButton.MouseOverColor = Color.DarkOrange;
totalHeaderButtonsOffset += obsoleteButton.Width;
}
// Show visual indicator if script only exists in prefab instance and is not part of the prefab
bool isPrefabActor = scripts.Any(s => s.Actor.HasPrefabLink);
if (isPrefabActor && script.PrefabID == Guid.Empty)
{
var prefabInstanceButton = group.AddHeaderButton("Script only exists in this prefab instance.", totalHeaderButtonsOffset, Editor.Instance.Icons.Add32);
prefabInstanceButton.Color = style.ProgressNormal;
prefabInstanceButton.MouseOverColor = style.ProgressNormal * 0.9f;
totalHeaderButtonsOffset += prefabInstanceButton.Width;
}
// Adjust margin to not overlap with other ui elements in the header // Adjust margin to not overlap with other ui elements in the header
group.Panel.HeaderTextMargin = group.Panel.HeaderTextMargin with { Left = scriptDrag.Right - 12, Right = settingsButton.Width + Utilities.Constants.UIMargin }; group.Panel.HeaderTextMargin = group.Panel.HeaderTextMargin with { Left = scriptDrag.Right - 12, Right = settingsButton.Width + Utilities.Constants.UIMargin };
group.Object(values, editor); group.Object(values, editor);
// Remove drop down arrows and containment lines if no objects in the group // Remove drop down arrows and containment lines if no objects in the group
if (group.Children.Count == 0) if (group.Children.Count == 0)
{ {

View File

@@ -18,7 +18,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
public class SplineEditor : ActorEditor public class SplineEditor : ActorEditor
{ {
/// <summary> /// <summary>
/// Storage undo spline data /// Stores undo spline data.
/// </summary> /// </summary>
private struct UndoData private struct UndoData
{ {
@@ -83,7 +83,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
} }
/// <summary> /// <summary>
/// Edit curve options manipulate the curve as free mode /// Edit curve options manipulate the curve as free mode.
/// </summary> /// </summary>
private sealed class FreeTangentMode : EditTangentOptionBase private sealed class FreeTangentMode : EditTangentOptionBase
{ {
@@ -98,7 +98,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
} }
/// <summary> /// <summary>
/// Edit curve options to set tangents to linear /// Edit curve options to set tangents to linear.
/// </summary> /// </summary>
private sealed class LinearTangentMode : EditTangentOptionBase private sealed class LinearTangentMode : EditTangentOptionBase
{ {
@@ -107,13 +107,13 @@ namespace FlaxEditor.CustomEditors.Dedicated
{ {
SetKeyframeLinear(spline, index); SetKeyframeLinear(spline, index);
// change the selection to tangent parent (a spline point / keyframe) // Change the selection to tangent parent (a spline point / keyframe)
Editor.SetSelectSplinePointNode(spline, index); Editor.SetSelectSplinePointNode(spline, index);
} }
} }
/// <summary> /// <summary>
/// Edit curve options to align tangents of selected spline /// Edit curve options to align tangents of selected spline.
/// </summary> /// </summary>
private sealed class AlignedTangentMode : EditTangentOptionBase private sealed class AlignedTangentMode : EditTangentOptionBase
{ {
@@ -168,8 +168,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
} }
/// <summary> /// <summary>
/// Edit curve options manipulate the curve setting selected point /// Edit curve options manipulate the curve setting selected point tangent in as smoothed but tangent out as linear.
/// tangent in as smoothed but tangent out as linear
/// </summary> /// </summary>
private sealed class SmoothInTangentMode : EditTangentOptionBase private sealed class SmoothInTangentMode : EditTangentOptionBase
{ {
@@ -182,8 +181,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
} }
/// <summary> /// <summary>
/// Edit curve options manipulate the curve setting selected point /// Edit curve options manipulate the curve setting selected point tangent in as linear but tangent out as smoothed.
/// tangent in as linear but tangent out as smoothed
/// </summary> /// </summary>
private sealed class SmoothOutTangentMode : EditTangentOptionBase private sealed class SmoothOutTangentMode : EditTangentOptionBase
{ {
@@ -219,7 +217,8 @@ namespace FlaxEditor.CustomEditors.Dedicated
var enabled = EnabledInHierarchy && tab.EnabledInHierarchy; var enabled = EnabledInHierarchy && tab.EnabledInHierarchy;
var style = FlaxEngine.GUI.Style.Current; var style = FlaxEngine.GUI.Style.Current;
var size = Size; var size = Size;
var textHeight = 16.0f; var textHeight = 30.0f;
// Make icons smaller when tabs get thinner
var iconSize = size.Y - textHeight; var iconSize = size.Y - textHeight;
var iconRect = new Rectangle((Width - iconSize) / 2, 0, iconSize, iconSize); var iconRect = new Rectangle((Width - iconSize) / 2, 0, iconSize, iconSize);
if (tab._mirrorIcon) if (tab._mirrorIcon)
@@ -230,8 +229,11 @@ namespace FlaxEditor.CustomEditors.Dedicated
var color = style.Foreground; var color = style.Foreground;
if (!enabled) if (!enabled)
color *= 0.6f; color *= 0.6f;
var textRect = new Rectangle(0, size.Y - textHeight, size.X, textHeight);
Render2D.PushClip(new Rectangle(Float2.Zero, Size));
Render2D.DrawSprite(tab._customIcon, iconRect, color); Render2D.DrawSprite(tab._customIcon, iconRect, color);
Render2D.DrawText(style.FontMedium, tab._customText, new Rectangle(0, iconSize, size.X, textHeight), color, TextAlignment.Center, TextAlignment.Center); Render2D.DrawText(style.FontMedium, tab._customText, textRect, color, TextAlignment.Center, TextAlignment.Center, TextWrapping.WrapWords, 0.65f);
Render2D.PopClip();
} }
} }
@@ -291,18 +293,21 @@ namespace FlaxEditor.CustomEditors.Dedicated
return; return;
_selectedSpline = spline; _selectedSpline = spline;
layout.Space(10); //var tabSize = 46;
var tabSize = 46; var tabSize = 60;
var icons = Editor.Instance.Icons; var icons = Editor.Instance.Icons;
layout.Header("Selected spline point"); var group = layout.Group("Selected Point");
_selectedPointsTabs = new Tabs _selectedPointsTabs = new Tabs
{ {
Height = tabSize, Height = tabSize,
TabsSize = new Float2(tabSize), TabsSize = new Float2(tabSize),
AutoTabsSize = true, AutoTabsSize = true,
Parent = layout.ContainerControl, Parent = group.ContainerControl,
}; };
// Move the group above the group containing spline points
group.Control.IndexInParent = 3;
_linearTangentTab = _selectedPointsTabs.AddTab(new IconTab(OnSetSelectedLinear, "Linear", icons.SplineLinear64)); _linearTangentTab = _selectedPointsTabs.AddTab(new IconTab(OnSetSelectedLinear, "Linear", icons.SplineLinear64));
_freeTangentTab = _selectedPointsTabs.AddTab(new IconTab(OnSetSelectedFree, "Free", icons.SplineFree64)); _freeTangentTab = _selectedPointsTabs.AddTab(new IconTab(OnSetSelectedFree, "Free", icons.SplineFree64));
_alignedTangentTab = _selectedPointsTabs.AddTab(new IconTab(OnSetSelectedAligned, "Aligned", icons.SplineAligned64)); _alignedTangentTab = _selectedPointsTabs.AddTab(new IconTab(OnSetSelectedAligned, "Aligned", icons.SplineAligned64));
@@ -310,13 +315,13 @@ namespace FlaxEditor.CustomEditors.Dedicated
_smoothOutTangentTab = _selectedPointsTabs.AddTab(new IconTab(OnSetSelectedSmoothOut, "Smooth Out", icons.SplineSmoothIn64, true)); _smoothOutTangentTab = _selectedPointsTabs.AddTab(new IconTab(OnSetSelectedSmoothOut, "Smooth Out", icons.SplineSmoothIn64, true));
_selectedPointsTabs.SelectedTabIndex = -1; _selectedPointsTabs.SelectedTabIndex = -1;
layout.Header("All spline points"); group = layout.Group("All Points");
_allPointsTabs = new Tabs _allPointsTabs = new Tabs
{ {
Height = tabSize, Height = tabSize,
TabsSize = new Float2(tabSize), TabsSize = new Float2(tabSize),
AutoTabsSize = true, AutoTabsSize = true,
Parent = layout.ContainerControl, Parent = group.ContainerControl,
}; };
_setLinearAllTangentsTab = _allPointsTabs.AddTab(new IconTab(OnSetTangentsLinear, "Set Linear Tangents", icons.SplineLinear64)); _setLinearAllTangentsTab = _allPointsTabs.AddTab(new IconTab(OnSetTangentsLinear, "Set Linear Tangents", icons.SplineLinear64));
_setSmoothAllTangentsTab = _allPointsTabs.AddTab(new IconTab(OnSetTangentsSmooth, "Set Smooth Tangents", icons.SplineAligned64)); _setSmoothAllTangentsTab = _allPointsTabs.AddTab(new IconTab(OnSetTangentsSmooth, "Set Smooth Tangents", icons.SplineAligned64));

View File

@@ -690,7 +690,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
return grid; return grid;
} }
private CustomElementsContainer<UniformGridPanel> UniformPanelCapsuleForObjectWithText(LayoutElementsContainer el, string text, ValueContainer values, Color borderColor, out FloatValueBox valueBox) private CustomElementsContainer<UniformGridPanel> UniformPanelCapsuleForObjectWithText(LayoutElementsContainer el, string text, ValueContainer values, Color highlightColor, out FloatValueBox valueBox)
{ {
valueBox = null; valueBox = null;
var grid = UniformGridTwoByOne(el); var grid = UniformGridTwoByOne(el);
@@ -701,8 +701,8 @@ namespace FlaxEditor.CustomEditors.Dedicated
{ {
valueBox = floatEditorElement.ValueBox; valueBox = floatEditorElement.ValueBox;
var back = FlaxEngine.GUI.Style.Current.TextBoxBackground; var back = FlaxEngine.GUI.Style.Current.TextBoxBackground;
valueBox.BorderColor = Color.Lerp(borderColor, back, ActorTransformEditor.AxisGreyOutFactor); valueBox.HighlightColor = highlightColor;
valueBox.BorderSelectedColor = borderColor; valueBox.BorderSelectedColor = highlightColor;
} }
return grid; return grid;
} }

View File

@@ -14,22 +14,17 @@ namespace FlaxEditor.CustomEditors.Editors
/// <summary> /// <summary>
/// The X axis color. /// The X axis color.
/// </summary> /// </summary>
public static Color AxisColorX = new Color(1.0f, 0.0f, 0.02745f, 1.0f); public static Color AxisColorX = new Color(0.8f, 0.0f, 0.027f, 1.0f);
/// <summary> /// <summary>
/// The Y axis color. /// The Y axis color.
/// </summary> /// </summary>
public static Color AxisColorY = new Color(0.239215f, 1.0f, 0.047058f, 1.0f); public static Color AxisColorY = new Color(0.239215f, 0.65f, 0.047058f, 1.0f);
/// <summary> /// <summary>
/// The Z axis color. /// The Z axis color.
/// </summary> /// </summary>
public static Color AxisColorZ = new Color(0.0f, 0.0235294f, 1.0f, 1.0f); public static Color AxisColorZ = new Color(0.0f, 0.42352f, 0.8f, 1.0f);
/// <summary>
/// The axes colors grey out scale when input field is not focused.
/// </summary>
public static float AxisGreyOutFactor = 0.6f;
/// <summary> /// <summary>
/// Custom editor for actor position property. /// Custom editor for actor position property.
@@ -43,18 +38,20 @@ namespace FlaxEditor.CustomEditors.Editors
base.Initialize(layout); base.Initialize(layout);
if (XElement.ValueBox.Parent is UniformGridPanel ug) if (XElement.ValueBox.Parent is UniformGridPanel ug)
{
ug.SlotPadding = new Margin(3.0f, 0.0f, 0.0f, 0.0f);
CheckLayout(ug); CheckLayout(ug);
}
// Override colors // Override colors
var back = FlaxEngine.GUI.Style.Current.TextBoxBackground;
XElement.ValueBox.BorderColor = Color.Lerp(AxisColorX, back, AxisGreyOutFactor);
XElement.ValueBox.BorderSelectedColor = AxisColorX; XElement.ValueBox.BorderSelectedColor = AxisColorX;
XElement.ValueBox.Category = Utils.ValueCategory.Distance;
YElement.ValueBox.BorderColor = Color.Lerp(AxisColorY, back, AxisGreyOutFactor);
YElement.ValueBox.BorderSelectedColor = AxisColorY; YElement.ValueBox.BorderSelectedColor = AxisColorY;
YElement.ValueBox.Category = Utils.ValueCategory.Distance;
ZElement.ValueBox.BorderColor = Color.Lerp(AxisColorZ, back, AxisGreyOutFactor);
ZElement.ValueBox.BorderSelectedColor = AxisColorZ; ZElement.ValueBox.BorderSelectedColor = AxisColorZ;
XElement.ValueBox.HighlightColor = AxisColorX;
XElement.ValueBox.Category = Utils.ValueCategory.Distance;
YElement.ValueBox.HighlightColor = AxisColorY;
YElement.ValueBox.Category = Utils.ValueCategory.Distance;
ZElement.ValueBox.HighlightColor = AxisColorZ;
ZElement.ValueBox.Category = Utils.ValueCategory.Distance; ZElement.ValueBox.Category = Utils.ValueCategory.Distance;
} }
} }
@@ -71,18 +68,20 @@ namespace FlaxEditor.CustomEditors.Editors
base.Initialize(layout); base.Initialize(layout);
if (XElement.ValueBox.Parent is UniformGridPanel ug) if (XElement.ValueBox.Parent is UniformGridPanel ug)
{
ug.SlotPadding = new Margin(3.0f, 0.0f, 0.0f, 0.0f);
CheckLayout(ug); CheckLayout(ug);
}
// Override colors // Override colors
var back = FlaxEngine.GUI.Style.Current.TextBoxBackground;
XElement.ValueBox.BorderColor = Color.Lerp(AxisColorX, back, AxisGreyOutFactor);
XElement.ValueBox.BorderSelectedColor = AxisColorX; XElement.ValueBox.BorderSelectedColor = AxisColorX;
XElement.ValueBox.Category = Utils.ValueCategory.Angle;
YElement.ValueBox.BorderColor = Color.Lerp(AxisColorY, back, AxisGreyOutFactor);
YElement.ValueBox.BorderSelectedColor = AxisColorY; YElement.ValueBox.BorderSelectedColor = AxisColorY;
YElement.ValueBox.Category = Utils.ValueCategory.Angle;
ZElement.ValueBox.BorderColor = Color.Lerp(AxisColorZ, back, AxisGreyOutFactor);
ZElement.ValueBox.BorderSelectedColor = AxisColorZ; ZElement.ValueBox.BorderSelectedColor = AxisColorZ;
XElement.ValueBox.HighlightColor = AxisColorX;
XElement.ValueBox.Category = Utils.ValueCategory.Angle;
YElement.ValueBox.HighlightColor = AxisColorY;
YElement.ValueBox.Category = Utils.ValueCategory.Angle;
ZElement.ValueBox.HighlightColor = AxisColorZ;
ZElement.ValueBox.Category = Utils.ValueCategory.Angle; ZElement.ValueBox.Category = Utils.ValueCategory.Angle;
} }
} }
@@ -129,17 +128,19 @@ namespace FlaxEditor.CustomEditors.Editors
} }
if (XElement.ValueBox.Parent is UniformGridPanel ug) if (XElement.ValueBox.Parent is UniformGridPanel ug)
{
ug.SlotPadding = new Margin(3.0f, 0.0f, 0.0f, 0.0f);
CheckLayout(ug); CheckLayout(ug);
}
// Override colors // Override colors
var back = FlaxEngine.GUI.Style.Current.TextBoxBackground; var back = FlaxEngine.GUI.Style.Current.TextBoxBackground;
var grayOutFactor = 0.6f;
XElement.ValueBox.BorderColor = Color.Lerp(AxisColorX, back, grayOutFactor);
XElement.ValueBox.BorderSelectedColor = AxisColorX; XElement.ValueBox.BorderSelectedColor = AxisColorX;
YElement.ValueBox.BorderColor = Color.Lerp(AxisColorY, back, grayOutFactor);
YElement.ValueBox.BorderSelectedColor = AxisColorY; YElement.ValueBox.BorderSelectedColor = AxisColorY;
ZElement.ValueBox.BorderColor = Color.Lerp(AxisColorZ, back, grayOutFactor);
ZElement.ValueBox.BorderSelectedColor = AxisColorZ; ZElement.ValueBox.BorderSelectedColor = AxisColorZ;
XElement.ValueBox.HighlightColor = AxisColorX;
YElement.ValueBox.HighlightColor = AxisColorY;
ZElement.ValueBox.HighlightColor = AxisColorZ;
} }
/// <summary> /// <summary>

View File

@@ -370,7 +370,7 @@ namespace FlaxEditor.CustomEditors.Editors
SetValue(Editor.Instance.ContentDatabase.Find(Utilities.Utils.ToPathAbsolute(path))); SetValue(Editor.Instance.ContentDatabase.Find(Utilities.Utils.ToPathAbsolute(path)));
else if (value is Asset) else if (value is Asset)
SetValue(FlaxEngine.Content.LoadAsync(path)); SetValue(FlaxEngine.Content.LoadAsync(path));
else if (value is string) else if (value is string || Values.Type == typeof(string))
SetValue(path); SetValue(path);
} }

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