Compare commits

..

1943 Commits

Author SHA1 Message Date
mafiesto4 4e34524a08 Add profile event 2023-12-19 13:02:48 +01:00
mafiesto4 dfd3bcdcb7 Minor improvements for play mode 2023-12-19 12:57:23 +01:00
mafiesto4 3f1d851f82 Fix regression from bc2e130281 2023-12-19 12:37:47 +01:00
mafiesto4 ceb564a5e2 Update build number 2023-12-19 11:16:59 +01:00
mafiesto4 8a94e053a8 Fix crash when resizing navmesh capacity with crowd created for that navmesh 2023-12-18 21:45:27 +01:00
mafiesto4 bc2e130281 Fix calling script OnDestroy when removing actors or scripts from the scene 2023-12-18 21:43:13 +01:00
mafiesto4 72f45afa45 Merge branch 'Menotdan-fix-spriterender-prefab' 2023-12-17 20:42:10 +01:00
Menotdan 51c36223e6 Rename 'text' to 'sprite' to avoid confusion in the future. 2023-12-17 12:03:44 -05:00
Menotdan ea744ab4ac Prevent performing default spawn behavior when spawning from a prefab. 2023-12-17 12:02:56 -05:00
Menotdan 9ea5ed79f8 Merge branch 'master' into fix-spriterender-prefab 2023-12-17 11:52:31 -05:00
mafiesto4 59e2afd992 Merge branch 'Tryibion-saved-colors' 2023-12-17 13:06:08 +01:00
mafiesto4 aade14270e Merge branch 'saved-colors' of https://github.com/Tryibion/FlaxEngine into Tryibion-saved-colors 2023-12-17 13:03:57 +01:00
mafiesto4 d5a6083a55 Fix project initialization with -new if it already exists
#2092
2023-12-17 12:47:46 +01:00
mafiesto4 e448692eb9 Fix crash in UI prefab changes apply when reparenting controls
#2082
2023-12-17 12:41:51 +01:00
mafiesto4 7bcf78d0c0 Fix various crashes 2023-12-17 12:38:09 +01:00
Menotdan 9f460cd651 Fix sprite render actors spawning with overridden defaults when they are part of a prefab. 2023-12-17 04:30:54 -05:00
Tryibion b85ec46545 Change selected color. 2023-12-16 22:05:04 -06:00
Tryibion 272a147c2e Add saved colors to color picker. 2023-12-16 20:36:27 -06:00
mafiesto4 8418ca56e8 Missing comment part 2023-12-16 18:16:00 +01:00
mafiesto4 0dd7e86537 Add better Visual Script debugger tooltips display 2023-12-16 18:14:16 +01:00
mafiesto4 64e391df24 Refactor Visual Script debugger apis to use bindings generator 2023-12-16 17:58:18 +01:00
mafiesto4 c145042f52 Fix invalid BT node decorator linkage after removing it
#2059
2023-12-16 17:08:54 +01:00
mafiesto4 d8856ddaa7 Merge branch 'GoaLitiuM-dotnet8_packaging_fix' 2023-12-16 16:43:43 +01:00
mafiesto4 4263f61e85 Merge branch 'dotnet8_packaging_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-dotnet8_packaging_fix 2023-12-16 16:43:36 +01:00
mafiesto4 fc8c29b982 Merge branch 'GoaLitiuM-vs_csharp_build_fixes' 2023-12-16 16:43:31 +01:00
mafiesto4 4e0daab310 Merge branch 'vs_csharp_build_fixes' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-vs_csharp_build_fixes 2023-12-16 16:43:21 +01:00
mafiesto4 6d5d615894 Fix crash when drawing terrain without cached neighbor chunks
#2087
2023-12-16 16:38:16 +01:00
mafiesto4 2bef880e21 Fix render target pool over-allocation when changing render resolution frequently
#2077
2023-12-16 16:15:52 +01:00
GoaLitiuM f38245b834 Fix .NET runtime packaging with installed .NET 8 SDK 2023-12-16 16:16:01 +02:00
GoaLitiuM 639803480e Improve .NET related errors during cooking process 2023-12-16 16:11:56 +02:00
GoaLitiuM 84249b3b57 Skip building main C#-project in VS solution when C++-project is present
Flax.Build is invoked twice, once for C++-project and one more time for
C#-project. Skip the C#-project by using the custom .targets file to not
break Rider's solution analysis feature.
2023-12-16 14:48:21 +02:00
GoaLitiuM d614232f8d Fix VS build issues with C# projects when engine path has spaces 2023-12-16 14:45:28 +02:00
mafiesto4 074ad171ba Merge branch 'nothingTVatYT-load-additional-scene' 2023-12-16 12:49:48 +01:00
mafiesto4 efebb29ac0 Minor tweak for #2003 2023-12-16 12:49:39 +01:00
mafiesto4 c3dd05211b Merge branch 'load-additional-scene' of https://github.com/nothingTVatYT/FlaxEngine into nothingTVatYT-load-additional-scene 2023-12-16 12:40:34 +01:00
mafiesto4 b9c145b499 Merge branch 'nothingTVatYT-fix-linuxwindow' 2023-12-16 12:40:14 +01:00
mafiesto4 c0ef2a1f58 Cleamnup code for #2020 and use internal pointer for current tracking window 2023-12-16 12:39:10 +01:00
mafiesto4 141bec0259 Merge branch 'fix-linuxwindow' of https://github.com/nothingTVatYT/FlaxEngine into nothingTVatYT-fix-linuxwindow 2023-12-16 12:35:26 +01:00
mafiesto4 9c4857a205 Fix typo in Tag comparison function
#2081
2023-12-15 15:54:18 +01:00
mafiesto4 ae5fa9619b Remove TextureUtils 2023-12-14 18:23:17 +01:00
mafiesto4 a5e072da31 Fix importing .dds files as-isif the compressed image is too small for the engine (block size validation)
#2057
2023-12-14 17:04:47 +01:00
mafiesto4 df8418da25 Add more profiling events 2023-12-14 17:00:55 +01:00
mafiesto4 d7b17ae0a6 Fix deadlock in asset thumbnails rendering queue when texture streaming fails
#2057
2023-12-14 16:05:15 +01:00
mafiesto4 60202a3add Fix deadlock when loading block-compressed texture that is smaller than block size
#2057
2023-12-14 15:14:49 +01:00
mafiesto4 014c811903 Add PixelFormatExtensions::ComputeBlockSize 2023-12-14 15:02:13 +01:00
mafiesto4 fe1a655654 Add support for displaying and reverting array values to prefab value in properties panel
#1548
2023-12-14 13:57:16 +01:00
mafiesto4 190bafea28 Merge branch 'Menotdan-boxcollider-autosize' 2023-12-14 11:05:14 +01:00
mafiesto4 51fc4c68cd Use tooltip from native function docs and support multiple colliders selected at once #2063 2023-12-14 11:04:36 +01:00
mafiesto4 b87a7d16fb Move managed code into native impl for #2063 2023-12-14 11:03:58 +01:00
mafiesto4 8a5a7851cf Merge branch 'boxcollider-autosize' of https://github.com/Menotdan/FlaxEngine into Menotdan-boxcollider-autosize 2023-12-14 10:49:46 +01:00
mafiesto4 a1e13cd2c8 Fix MissingScript to be added only when object type exists (skip for prefab instances) 2023-12-14 10:47:49 +01:00
mafiesto4 e0a085adfe Add support for loading prefab instance if the root was changed or deleted
#2050
2023-12-14 10:47:22 +01:00
mafiesto4 1874382816 Various fixes to prefabs 2023-12-13 11:05:29 +01:00
Menotdan 9454385683 Use the BoxColliderNode class for handling actor spawn events. 2023-12-12 15:46:15 -05:00
mafiesto4 d26b9818d8 Fix spawned prefab name after drag&drop into prefab window
#1865
2023-12-12 19:13:47 +01:00
mafiesto4 b297b9f185 Fix not supported dragging prefab actors between windows
#2065
2023-12-12 18:59:52 +01:00
mafiesto4 8aaa5710df Fix dark outline around Screen Space Reflections alpha blending area 2023-12-12 16:02:53 +01:00
mafiesto4 778dd2d3f0 Fix shader file include path resolve on cache load 2023-12-11 22:55:36 +01:00
mafiesto4 ff195eeccb Fix deadlock in Asset.WaitForLoaded when loading task hangs in the loading queue for a main thread sync
#2057
2023-12-11 22:35:51 +01:00
mafiesto4 a63abb534f Merge branch 'Menotdan-fix-default-prefab-instance' 2023-12-11 22:06:20 +01:00
mafiesto4 2afdb5b978 Merge branch 'fix-default-prefab-instance' of https://github.com/Menotdan/FlaxEngine into Menotdan-fix-default-prefab-instance 2023-12-11 22:06:14 +01:00
mafiesto4 ea287e9fc5 Merge branch 'nothingTVatYT-fix-plugin-clone' 2023-12-11 19:51:32 +01:00
mafiesto4 14632ecb66 Merge branch 'fix-plugin-clone' of https://github.com/nothingTVatYT/FlaxEngine into nothingTVatYT-fix-plugin-clone 2023-12-11 19:51:10 +01:00
mafiesto4 80b5e9d02a Fix doc code example
https://forum.flaxengine.com/t/could-be-a-deprecated-document-hint-of-custompostfx-on-mainrendertask/1510
2023-12-11 19:48:06 +01:00
mafiesto4 022c935eef Merge branch 'Tryibion-android-orientation' 2023-12-11 17:34:57 +01:00
mafiesto4 ad7d7f371e Merge branch 'android-orientation' of https://github.com/Tryibion/FlaxEngine into Tryibion-android-orientation 2023-12-11 17:34:47 +01:00
Tryibion 4725f51431 Move android screen orientation into platform settings 2023-12-11 10:00:19 -06:00
mafiesto4 0bb1126f1b Merge branch 'Just-Feeshy-master' 2023-12-11 16:42:54 +01:00
mafiesto4 462eb9803f Merge branch 'master' of https://github.com/Just-Feeshy/FlaxEngine into Just-Feeshy-master 2023-12-11 16:42:49 +01:00
mafiesto4 b1d4d50d47 Merge branch 'Tryibion-dd-scale' 2023-12-11 16:38:09 +01:00
mafiesto4 2ed79c9218 Merge branch 'dd-scale' of https://github.com/Tryibion/FlaxEngine into Tryibion-dd-scale 2023-12-11 16:38:05 +01:00
mafiesto4 6dd72cdf32 Add removing thumbnails for deleted assets
#1729
2023-12-11 14:14:55 +01:00
mafiesto4 865945806a Merge branch 'mtszkarbowiak-fix/swapping' 2023-12-11 11:28:32 +01:00
mafiesto4 d974998528 Merge branch 'fix/swapping' of https://github.com/mtszkarbowiak/FlaxEngine into mtszkarbowiak-fix/swapping 2023-12-11 11:28:27 +01:00
mafiesto4 efad58370f Merge branch 'Menotdan-model-prefab-freeze-fix' 2023-12-11 11:20:49 +01:00
mafiesto4 51e92a49ad Merge branch 'model-prefab-freeze-fix' of https://github.com/Menotdan/FlaxEngine into Menotdan-model-prefab-freeze-fix 2023-12-11 11:20:42 +01:00
mafiesto4 1195fe8507 Merge branch 'NoriteSC-Animaction' 2023-12-11 11:16:13 +01:00
mafiesto4 cbecd605e9 Merge branch 'Animaction' of https://github.com/NoriteSC/FlaxEngineFork into NoriteSC-Animaction 2023-12-11 11:16:01 +01:00
mafiesto4 0bcbcdb912 Merge branch 'Tryibion-invert-green' 2023-12-11 11:15:37 +01:00
nothingTVatYT 0df00fd881 wait for git processes to end 2023-12-11 04:14:17 +01:00
Menotdan fe19ffddd9 Fix freeze when prefab ID is empty. 2023-12-10 18:12:41 -05:00
Menotdan 19dbd3c4e4 Add button to resize collider manually. 2023-12-09 21:00:45 -05:00
Menotdan 01b233af10 Factor out AutoResize() function for external use. Fix build regression due to unwanted import. 2023-12-09 19:57:52 -05:00
Menotdan c895e310cb Improve box collider creation behavior to account for child actors of the collider's parent. 2023-12-09 19:19:03 -05:00
NoriteSC e508fb8cd0 added Note and Tip for blender users to Description 2023-12-10 00:23:43 +01:00
Menotdan 2f50042523 Simplify code and allow any actor as parent. 2023-12-09 17:56:09 -05:00
Menotdan 4e54e945ef Implement auto-sizing for box colliders when they are added to the scene. 2023-12-09 17:43:06 -05:00
NoriteSC 0cb064bfb3 fixed Blend Additive
problem mesh was just exploding
+ code should be faster
2023-12-09 23:41:17 +01:00
Tryibion b8ce9e8c59 Scale up drop down items with text height as needed. 2023-12-08 17:01:48 -06:00
Tryibion df83491313 Add ability to change default Android screen orientation. 2023-12-08 15:48:43 -06:00
Menotdan b1cbaf7e13 Fix default prefab instance not taking into account root position. 2023-12-08 15:46:09 -05:00
Mateusz Karbowiak f3497a2a55 Fix swapping core collections 2023-12-08 20:50:52 +01:00
Mateusz Karbowiak 86fbf05b09 Fix general swapping function 2023-12-08 20:49:47 +01:00
Diego Fonseca c17ff3926a Update Time.cpp 2023-12-08 14:35:10 -05:00
Diego Fonseca 4707f98fab Update Time.cpp 2023-12-08 14:13:50 -05:00
Tryibion a32effff1c add missing result in texture tool 2023-12-08 09:44:40 -06:00
Tryibion f346dbc9bf add comment 2023-12-08 09:39:21 -06:00
Tryibion f24b335c45 Add invert green channel option to texture tool. 2023-12-08 09:19:05 -06:00
mafiesto4 306dd43b18 Merge branch 'Menotdan-bt_infinite_loop' 2023-12-08 10:34:38 +01:00
mafiesto4 c3b6dd9884 Merge branch 'bt_infinite_loop' of https://github.com/Menotdan/FlaxEngine into Menotdan-bt_infinite_loop 2023-12-08 10:34:33 +01:00
mafiesto4 f7e9465ce8 Avoid memory alloc #2042 2023-12-08 10:29:22 +01:00
mafiesto4 f9ad6e00c2 Merge branch 'Tryibion-add-blend-anim-fix' 2023-12-08 10:28:16 +01:00
mafiesto4 73a3e147ca Merge branch 'add-blend-anim-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-add-blend-anim-fix 2023-12-08 10:26:34 +01:00
mafiesto4 59fe448987 Fix script add undo regression 9bde0f9f9b
#2041
2023-12-08 10:23:17 +01:00
Menotdan 629ebacd64 Hide loop count options if "Infinite Loop" is checked. 2023-12-08 02:01:13 -05:00
Tryibion a6a94d5f77 2nd pass on additive blend math. 2023-12-08 00:59:41 -06:00
Menotdan 4a50111f9b Add infinite loop to behavior tree loop decorator. 2023-12-08 01:46:55 -05:00
Tryibion 91033a6468 Simplify 2023-12-07 20:51:24 -06:00
Tryibion 73074b6e44 Enable Transform Lerp 2023-12-07 20:31:18 -06:00
Tryibion e9285410e2 Fix blending additive animations. 2023-12-07 20:27:24 -06:00
mafiesto4 526edb83de Add Async to anim events (false by default) to delay events execution into main thread and prevent multi-threading issues by default
#2033
2023-12-07 15:21:03 +01:00
mafiesto4 7db0ae59bb Fix managed method delegate creation to be thread-safe 2023-12-07 14:35:13 +01:00
mafiesto4 eb7d5e5df3 Fix crash when spawning actor from asyc thread into the SceneObject
#2033
2023-12-07 11:50:24 +01:00
mafiesto4 83ef9791d4 Fix missing bounds update on SkyLight radius modification 2023-12-07 11:44:05 +01:00
mafiesto4 228239632a Fix tooltip location check when wraps over the screen
#2016
2023-12-07 11:43:50 +01:00
mafiesto4 3749b35aba Fix crash in Content Storage async job when someone is using file storage and access cannot be freed 2023-12-07 11:18:18 +01:00
mafiesto4 d847dfda61 Fix issue with import scale on prefab model 2023-12-07 10:25:59 +01:00
mafiesto4 cb92110976 Add ModelPrefab to imported model prefab for reimporting functionality 2023-12-07 10:25:45 +01:00
mafiesto4 74b77bfa4c Fix regression from 38a0718b70 2023-12-06 14:34:34 +01:00
mafiesto4 32ced6e68a Fix missing surface graph edited flag after removing anim graph state transition
#2035
2023-12-06 14:27:14 +01:00
mafiesto4 23a72f2ade Fix not showing primary context menu on Visject surface if child control handled input event 2023-12-06 13:03:37 +01:00
mafiesto4 af4c662738 Merge branch 'Tryibion-scale-default' 2023-12-06 12:51:29 +01:00
mafiesto4 af4a6b80a8 Merge branch 'scale-default' of https://github.com/Tryibion/FlaxEngine into Tryibion-scale-default 2023-12-06 12:51:23 +01:00
mafiesto4 84e25a9e90 Merge branch 'Tryibion-multi-add-script' 2023-12-06 12:50:16 +01:00
mafiesto4 1eca03e50c Merge branch 'multi-add-script' of https://github.com/Tryibion/FlaxEngine into Tryibion-multi-add-script 2023-12-06 12:50:07 +01:00
mafiesto4 0cd5627845 Merge branch 'Tryibion-refac-coll-serialization' 2023-12-06 12:42:35 +01:00
mafiesto4 49c21082a1 Merge branch 'refac-coll-serialization' of https://github.com/Tryibion/FlaxEngine into Tryibion-refac-coll-serialization 2023-12-06 12:42:29 +01:00
mafiesto4 96e64b2d0a Merge branch 'Tryibion-dont-clamp-vel' 2023-12-06 12:37:35 +01:00
mafiesto4 19db8c04ad Merge branch 'dont-clamp-vel' of https://github.com/Tryibion/FlaxEngine into Tryibion-dont-clamp-vel 2023-12-06 12:36:49 +01:00
mafiesto4 a5ffde8863 Merge branch 'Tryibion-fix-select' 2023-12-06 12:32:59 +01:00
mafiesto4 9e593195c0 Merge branch 'fix-select' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-select 2023-12-06 12:31:05 +01:00
mafiesto4 9dc3889631 Merge branch 'Withaust-halffixes' 2023-12-06 12:07:01 +01:00
mafiesto4 3328c678c1 Merge branch 'halffixes' of https://github.com/Withaust/FlaxEngine into Withaust-halffixes 2023-12-06 12:06:56 +01:00
mafiesto4 4f3c7a43ab Merge branch 'Tryibion-default-not-sloppy' 2023-12-06 12:03:20 +01:00
mafiesto4 727ff155c2 Merge branch 'default-not-sloppy' of https://github.com/Tryibion/FlaxEngine into Tryibion-default-not-sloppy 2023-12-06 12:03:07 +01:00
mafiesto4 8faaaaaf54 Fix incorrect structure usage for hostfxr params siize
#2037
2023-12-06 11:20:32 +01:00
mafiesto4 7a7a43b897 Fix selecting prefab object when object from prefab is already selected 2023-12-06 11:20:01 +01:00
mafiesto4 63773f2ddf Add **option to import model file as Prefab**
#1909 #1329 #1973
2023-12-06 11:19:42 +01:00
mafiesto4 3f632b7d15 Fix incorrect empty meshes/LODs removal after auto-lod generation 2023-12-06 10:34:29 +01:00
mafiesto4 bcbc1cd413 Fix crash in mesh LOD generator if generated mesh has more indices 2023-12-06 10:33:58 +01:00
mafiesto4 7886069783 Update meshoptimizer to v0.20 2023-12-06 10:33:14 +01:00
mafiesto4 4a3be5a743 Fix crash when updating prefabs from async thread 2023-12-06 00:30:37 +01:00
mafiesto4 fdfca5156b Various fixes and stability improvements 2023-12-06 00:28:03 +01:00
mafiesto4 38a0718b70 Fix invalid tracy events from C# profiling api when profiler gets connected mid-event 2023-12-06 00:24:30 +01:00
mafiesto4 2285116bae Remove old warnings about invalid model instance buffer 2023-12-06 00:19:48 +01:00
mafiesto4 5575917c4b Fix prefab window performance with large hierarchies 2023-12-05 23:44:45 +01:00
mafiesto4 63ddf53ad3 Fix model asset thumbnail if mesh is not centered around origin 2023-12-05 23:43:54 +01:00
mafiesto4 3e940c28df Refactor prefab's objectsCache to be explicitly SceneObject values 2023-12-04 13:56:36 +01:00
mafiesto4 f654d507e5 Add Where, Select and RemoveAll to ArrayExtensions 2023-12-03 14:09:58 +01:00
mafiesto4 d6dc1f9998 Various minor tweaks 2023-12-03 14:09:23 +01:00
mafiesto4 1843689a88 Add various profiler events to analyze models importing workflow 2023-12-03 11:23:45 +01:00
mafiesto4 022a69aaf2 Continue refactoring model tool to support importing multiple objects properly 2023-12-03 10:55:40 +01:00
Tryibion a6caa9dbfa Remove unused includes 2023-12-02 12:03:30 -06:00
Tryibion 73d33e4af0 Refactor Physics Colliders to use auto serialization. 2023-12-02 12:01:32 -06:00
Tryibion c5c20c8e28 Remove zero clamp on hinge velocity. 2023-12-02 10:50:59 -06:00
Tryibion 9bde0f9f9b Fix layout of editor updating when adding a script to multiple actors in a scene. 2023-12-02 09:40:33 -06:00
Tryibion 7d15944381 Add break 2023-12-02 09:27:13 -06:00
Tryibion 58bfd1954e Fix UICanvas to only spawn CanvasScalar if it doesnt already have one. 2023-12-02 09:24:04 -06:00
Tryibion f67c0d2ac0 Change ScaleWithResolution defaults 2023-12-02 09:23:43 -06:00
Tryibion 9a712ba3cf Fix selecting objects/gizmos with high far plane. 2023-12-02 09:12:38 -06:00
Wiktor Kocielski 3ab7d7fcc4 Add Half to Vector2/Vector4 2023-12-02 15:29:49 +03:00
nothingTVatYT 78d9262b05 skip WM for non-regular windows and add mouse tracking 2023-12-01 21:25:00 +01:00
mafiesto4 c8dd2c045c Simplify sorting arrays code 2023-12-01 13:57:34 +01:00
mafiesto4 a808bcdbf6 Refactor objects splitting in models importing to be handled by ModelTool not the importer code itself 2023-12-01 13:57:08 +01:00
Tryibion 640e01262f Make SloppyOptimization false by default. Lower LODTargetError default. 2023-11-30 20:40:02 -06:00
mafiesto4 6e92d3103c Replace ImportedModelData with ModelData for model importing 2023-11-30 11:46:07 +01:00
mafiesto4 c5df7ad689 Add various improvements to models importing code 2023-11-30 11:31:58 +01:00
mafiesto4 712c400e43 Add new mac icon 2023-11-29 21:51:07 +01:00
mafiesto4 7f87e9794b Fix job system buffer allocation data 2023-11-29 19:12:58 +01:00
mafiesto4 cebd28c3a7 Revert fd938e8284 2023-11-29 18:46:18 +01:00
mafiesto4 eb508fdc73 Fix Json serialzier regression after hot-reload from 0f14672e3b 2023-11-29 12:28:30 +01:00
mafiesto4 b7e4fe3e85 Add automatic code modules references adding when cloning plugin project
#1335
2023-11-29 12:28:19 +01:00
mafiesto4 c6017a21f3 Fix constant value sliders in material graphs to not be used due to shader compilations 2023-11-28 23:19:47 +01:00
mafiesto4 d3a77c7a55 Fix regressions 2023-11-28 17:38:06 +01:00
mafiesto4 8ff4f95cef Optimize some code and cleanup code style in natvis file 2023-11-28 16:02:51 +01:00
mafiesto4 4f8aff4352 Refactor memory allocators to use dedicated path when moving collection data that is not blittable
#2001 #1920
2023-11-28 16:02:36 +01:00
mafiesto4 0aeac36f09 Fix __cplusplus macro on MSVC and add logging C++ version used during compilation 2023-11-28 15:55:34 +01:00
mafiesto4 cf8b7a20c2 Improve 47b8c9978f to handle non-vec4 cases
#2000
2023-11-28 14:55:26 +01:00
mafiesto4 47b8c9978f Fix missing channel masking in material Scene Texture node
#2000
2023-11-28 11:30:04 +01:00
mafiesto4 a909b57e82 Fix deadlock in NetworkManager when network peer returns invalid event type
#1992
2023-11-28 11:24:46 +01:00
mafiesto4 35ebdb0ffe Refactor INetworkDriver::PopEvent to use network event as output parameter rather than raw pointer
#1992
2023-11-28 11:24:17 +01:00
mafiesto4 fd938e8284 Fix incorrect pointer marshalling from Variant to managed runtime
#1992
2023-11-28 11:22:14 +01:00
mafiesto4 17dca8c5c7 Fix invalid codegen for array reference passed as output parameter in scripting interface method 2023-11-28 11:21:29 +01:00
mafiesto4 8ffc86ef88 Fix missing output parameters conversion when calling interface implementation in scripting
#1992
2023-11-28 11:20:07 +01:00
nothingTVatYT a3f1dc2694 removed unnecessary check 2023-11-28 00:50:44 +01:00
nothingTVatYT 84f3d50925 moved a comment line back to the suitable place 2023-11-28 00:43:55 +01:00
nothingTVatYT a06a079804 change submenu name to the shorter and less complicated "Add Scene" 2023-11-28 00:37:29 +01:00
nothingTVatYT 475453aa60 add load scene add. to context menus 2023-11-28 00:06:28 +01:00
mafiesto4 39dc5939e3 Fix crash when boxing native non-POD structure into managed format
#1992
2023-11-27 17:08:07 +01:00
mafiesto4 437819bfce Merge branch 'GoaLitiuM-dotnet_symbol_vscode_fixes' 2023-11-27 14:33:21 +01:00
mafiesto4 fa972a3c77 Merge branch 'dotnet_symbol_vscode_fixes' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-dotnet_symbol_vscode_fixes 2023-11-27 14:33:06 +01:00
mafiesto4 926297a63f Merge branch 'Tryibion-remove-delete' 2023-11-27 14:32:44 +01:00
mafiesto4 fd76c63a24 Merge branch 'remove-delete' of https://github.com/Tryibion/FlaxEngine into Tryibion-remove-delete 2023-11-27 14:32:34 +01:00
mafiesto4 2f4b956d78 Fix crash when unloading texture that has active streaming tasks 2023-11-27 11:53:21 +01:00
GoaLitiuM c577c78f3f Fix running Flax.Build with .NET 8 runtime 2023-11-26 20:47:54 +02:00
GoaLitiuM ef8bb33105 Compile C# scripts with latest detected C# language version 2023-11-26 20:27:54 +02:00
GoaLitiuM aab88a746d Use detected .NET and C# language version in generated project files 2023-11-26 20:27:54 +02:00
GoaLitiuM 0bcd0154e1 Remove wrong .NET SDK preprocessor definitions and support NET8_0
Only `X_OR_GREATER` symbols should be defined for all versions, and only
the latest detected SDK symbol should be generated.
2023-11-26 20:27:54 +02:00
GoaLitiuM e5b1a10d34 Fix VSCode intellisense not finding generated C# bindings definitions 2023-11-26 20:27:53 +02:00
mafiesto4 b3a18883ca Fix iOS startup 2023-11-25 21:46:22 +01:00
mafiesto4 98b42d3e2e Add .NET SDK version 7 as forced to be used during game cooking (compatibility with) 2023-11-25 18:14:21 +01:00
mafiesto4 71f30f18a6 Add support for including global configs in engine configuration options 2023-11-25 18:08:34 +01:00
mafiesto4 9e74f3ae22 Update engine assets 2023-11-25 17:54:50 +01:00
mafiesto4 f4f49f63bc Remove debug logs from 3fc0a3dc84 2023-11-25 14:19:30 +01:00
mafiesto4 eaabd56cae Add manual dotnet versions search on windows 2023-11-25 13:03:22 +01:00
mafiesto4 3fc0a3dc84 Add test debug log for broken ci build debug 2023-11-25 12:46:21 +01:00
mafiesto4 cf155a4df4 Update build scripts to use .NET SDK 7 for engine 2023-11-25 12:20:42 +01:00
mafiesto4 40d6e18e7e Add -dotnet=ver command arg to Flax.Build to specify .NET SDK version to use for build 2023-11-25 12:16:13 +01:00
mafiesto4 2cef368282 Update missing unmanaged function callback error message 2023-11-24 21:45:59 +01:00
mafiesto4 40d8d3b972 Update build number 2023-11-24 17:54:44 +01:00
Tryibion 2ddef2c6be make vars public 2023-11-24 10:53:43 -06:00
mafiesto4 6eb738bc58 Merge branch 'HydrogenC-master' 2023-11-24 15:00:39 +01:00
mafiesto4 91629d7a28 Merge branch 'master' of https://github.com/HydrogenC/FlaxEngine into HydrogenC-master 2023-11-24 15:00:34 +01:00
mafiesto4 cfef59d851 Merge branch 'nothingTVatYT-master' 2023-11-24 15:00:25 +01:00
mafiesto4 5f3fc38de2 Merge branch 'master' of https://github.com/nothingTVatYT/FlaxEngine into nothingTVatYT-master 2023-11-24 15:00:21 +01:00
mafiesto4 49bc7d3dcc Fix BehaviorTree node UI after adding decorator that was already there 2023-11-24 14:59:25 +01:00
mafiesto4 d0f7a04c58 Add support for getter-only properties in blackboard selector access 2023-11-24 14:59:07 +01:00
Tryibion 53aae90d45 Code style fix 2023-11-24 07:50:00 -06:00
nothingTVatYT 297cdc5bfd Merge branch 'FlaxEngine:master' into master 2023-11-24 11:28:58 +01:00
mafiesto4 f61f35b259 Fix compilation regression 2023-11-24 10:53:07 +01:00
mafiesto4 aa1b779463 Fix Win32CriticalSection to use spin count of 4000 instead of just 100
#1930
2023-11-24 10:25:46 +01:00
mafiesto4 359d4ba8ef More refactoring to 6cf7d49a10 for better assets loading
#1930
2023-11-24 10:25:21 +01:00
mafiesto4 6cf7d49a10 Fix crash during asset loading due to potential threading issue when 2 threads load the same asset
#1930
2023-11-23 17:54:50 +01:00
mafiesto4 d5075d845c Fix content storage usage with relative paths
#1966
2023-11-23 17:37:55 +01:00
mafiesto4 d99a92fd13 Fix generic types including to be recursive in C++ bindings codegen
#1966
2023-11-23 13:46:43 +01:00
ExMatics HydrogenC 5b7a3f9700 Show skeleton when entering skeleton tab 2023-11-22 21:52:07 +08:00
Tryibion 94f1dff497 Add main content nodes to not be duplicated. 2023-11-21 15:40:34 -06:00
Tryibion fe53317ec7 Fix issue of options not showing up for regular content items. 2023-11-21 12:10:44 -06:00
Tryibion 317886e893 Remove ability to delete content and source folders. Limit CM options on those folders only to ones that make sense. 2023-11-21 12:03:01 -06:00
mafiesto4 eba4b9bcc1 Add immediate game viewport sync after aspect ratio change in Editor 2023-11-21 12:34:31 +01:00
mafiesto4 d01990e3bb Fix deadlock in editor when using snap to the group with actor that has empty bounds
#1971
2023-11-21 12:34:06 +01:00
mafiesto4 0db259e300 Add CustomScenes feature to draw a fixed set of scenes within SceneRenderTask 2023-11-21 12:24:55 +01:00
mafiesto4 ce905fbe86 Merge branch 'HydrogenC-master' 2023-11-21 11:27:25 +01:00
mafiesto4 5fb82dd290 Merge branch 'master' of https://github.com/HydrogenC/FlaxEngine into HydrogenC-master 2023-11-21 11:27:18 +01:00
mafiesto4 ea81ac6a71 Fix crash in Multi Blend 2D node in Anim Graph when using single animation on a triangle 2023-11-21 11:10:05 +01:00
mafiesto4 88f751eda7 Merge branch 'Tryibion-submod' 2023-11-21 10:04:38 +01:00
mafiesto4 33115fca0c Merge branch 'submod' of https://github.com/Tryibion/FlaxEngine into Tryibion-submod 2023-11-21 10:04:32 +01:00
mafiesto4 4e37aafe6a Fix BT logic flow when start/stopping behavior 2023-11-21 00:01:46 +01:00
mafiesto4 9a091799fc Fix crash when debugging BT node state while tree is not running 2023-11-21 00:00:43 +01:00
Tryibion b14d88f8f8 Add git submodule init to git cloning. 2023-11-20 07:31:16 -06:00
nothingTVatYT da0dc7f11c Merge branch 'FlaxEngine:master' into master 2023-11-20 11:46:53 +01:00
mafiesto4 98012eb192 Minor improvements 2023-11-20 11:07:45 +01:00
mafiesto4 e9a1be481f Add short delay before auto-selecting editor tab on drag over header
#1934
2023-11-20 11:03:49 +01:00
mafiesto4 5573f5bb4a Merge branch 'GoaLitiuM-dotnet8_validate' 2023-11-20 10:48:35 +01:00
mafiesto4 822c25af7d Merge branch 'dotnet8_validate' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-dotnet8_validate 2023-11-20 10:48:27 +01:00
mafiesto4 70a540da4a Refactor main editor viewport and prefab viewport to share dragging handling code 2023-11-20 10:48:16 +01:00
mafiesto4 201a1f0264 Fix PostFx settings in Graphics Settings to be only used when checked as override 2023-11-19 22:10:11 +01:00
mafiesto4 9aa4421bfd Fix Visual Script parameter setter node to accept multiple input flows 2023-11-19 20:41:24 +01:00
mafiesto4 d90a0aa3f4 Fix missing initialization of scene objects added from prefab
#1924
2023-11-19 20:26:14 +01:00
mafiesto4 fc2d9a745f Fix missing scene dirty state when spawning prefab in scene tree 2023-11-19 20:24:47 +01:00
mafiesto4 4e190c2e3c Add decoding stack trace function names on Apple platforms 2023-11-19 18:04:24 +01:00
nothingTVatYT 6dcfe32979 Merge branch 'FlaxEngine:master' into master 2023-11-19 12:38:03 +01:00
mafiesto4 389bf89e2a Add GetStackFrames on Android 2023-11-19 11:07:44 +01:00
mafiesto4 31aafeb0d1 Add GetStackFrames and IsDebuggerPresent on Linux 2023-11-19 11:04:10 +01:00
mafiesto4 f9799f8ef3 Update old code 2023-11-19 11:00:15 +01:00
GoaLitiuM 017e7cbc60 Validate detected .NET SDK/runtime versions 2023-11-19 11:26:43 +02:00
GoaLitiuM 4eaac4ab2f Fix building Flax.Build with .NET 8 SDK 2023-11-19 11:26:40 +02:00
ExMatics HydrogenC ddcb792767 Improve documentation 2023-11-19 17:07:42 +08:00
ExMatics HydrogenC 8bcb984180 Implement SetNodeTransform 2023-11-19 17:02:07 +08:00
nothingTVatYT 038a4e6f90 Merge branch 'FlaxEngine:master' into master 2023-11-19 00:44:50 +01:00
mafiesto4 3799674b83 Merge branch 'Tryibion-hide-certain-ui' 2023-11-19 00:00:22 +01:00
mafiesto4 25246de791 Merge branch 'hide-certain-ui' of https://github.com/Tryibion/FlaxEngine into Tryibion-hide-certain-ui 2023-11-19 00:00:10 +01:00
mafiesto4 e76fffc95a Improve performance of 06c56d0a4b 2023-11-18 23:59:30 +01:00
mafiesto4 06c56d0a4b Fix bug when spawning new prefab objects during scene load due to regression in async scene init 2023-11-18 23:46:42 +01:00
nothingTVatYT 6c32e4a842 force DeepClone() to use runtime class 2023-11-18 05:34:34 +01:00
Tryibion 84f6e2f90f Hide search window and search nodes from UIControls 2023-11-17 11:25:54 -06:00
mafiesto4 f77f8fbb39 Fix regression from d9b90c9520 2023-11-17 16:15:43 +01:00
mafiesto4 15aaf5043a Fix scenes reload feature to check if can do it, properly use async in play mode and ask for save if scene is modified
#1740
2023-11-17 14:07:33 +01:00
mafiesto4 b7f2196784 Fix missing script replacement if data has object id that doesn't match current parent
#1924
2023-11-17 14:02:40 +01:00
mafiesto4 d9b90c9520 Fix crash in MissingScript if script is still missing after deserialization
#1924
2023-11-17 13:50:18 +01:00
mafiesto4 719498e99b Adjust MissingScriptEditor layout for UI 2023-11-17 13:08:37 +01:00
mafiesto4 0beb389012 Merge branch 'NoriteSC-MathLib' 2023-11-17 12:25:28 +01:00
mafiesto4 e177aec5fa Codestyle 2023-11-17 12:19:54 +01:00
mafiesto4 a1ef635a2c Merge branch 'MathLib' of https://github.com/NoriteSC/FlaxEngineFork into NoriteSC-MathLib 2023-11-17 12:17:11 +01:00
mafiesto4 ca64867f3c Merge branch 'RuanLucasGD-fix-navigation-crash' 2023-11-16 16:26:59 +01:00
mafiesto4 027fcbfd36 6Merge branch 'fix-navigation-crash' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-fix-navigation-crash 2023-11-16 16:16:07 +01:00
mafiesto4 bec878cc11 Fix crashes in various dictionary usages caused by duplicated keys
#1925 #1924
2023-11-16 15:47:42 +01:00
mafiesto4 f0865c3989 Fix crash in Global Surface Atlas when dirty object is missing 2023-11-16 14:18:29 +01:00
mafiesto4 9738fd4354 Fix crash on hot-reload in Editor due to leftover scripting events in ScriptingEvents::EventsTable
#1925
2023-11-16 14:09:05 +01:00
mafiesto4 d33bf2fa6a Update docs comments based on https://github.com/FlaxEngine/FlaxDocs/pull/127 2023-11-16 13:55:45 +01:00
NoriteSC 307129b4a1 added c++ PingPong and flipped sheer 2023-11-16 11:50:44 +01:00
Mr. Capybara 6aea001e94 Remove unnecessary check 2023-11-15 12:49:20 -03:00
mafiesto4 3a59cfcf20 Change Globals.BuildErrors into BuildException #1673 2023-11-15 11:57:53 +01:00
mafiesto4 385693afff Merge branch 'GoaLitiuM-csharp_vs_build' 2023-11-15 11:44:49 +01:00
mafiesto4 e7ef3ebef2 Merge branch 'csharp_vs_build' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-csharp_vs_build 2023-11-15 11:44:42 +01:00
mafiesto4 c45d606f69 Merge branch 'GoaLitiuM-dotnet8_rollforward_fix' 2023-11-15 11:44:29 +01:00
mafiesto4 2555b07edf Merge branch 'dotnet8_rollforward_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-dotnet8_rollforward_fix 2023-11-15 11:44:21 +01:00
Mr. Capybara d533cf554a Avoid crash when try build navmesh with null scene 2023-11-14 14:47:35 -04:00
mafiesto4 bc3107d1db Fix build warnings on the latest XCode 2023-11-14 19:03:46 +01:00
GoaLitiuM 3f5c92e2fa Improve .NET 8 runtime and SDK detection
Setting the environment variable `DOTNET_ROLL_FORWARD_TO_PRERELEASE=1`
is required to enable runtime support for release candidate builds of
future major .NET releases.
2023-11-14 17:00:51 +02:00
mafiesto4 8d3cb8953c Add casting to variant in large worlds build 2023-11-14 12:41:59 +01:00
mafiesto4 6fd34bf5cc Fix compilation regression 2023-11-14 12:15:51 +01:00
mafiesto4 0360f7786d Fix crash hen readingBehaviorKnowledgeSelector value in C# when type doesn't match exactly 2023-11-14 11:47:44 +01:00
mafiesto4 3320c76e14 Add soft check for null managed object value for unboxing 2023-11-14 11:23:15 +01:00
mafiesto4 e0de6744e2 Add better errors logging to BT nodes in case of issues 2023-11-14 11:22:41 +01:00
mafiesto4 7c53b1e99a Add clearing BT memory in non-release builds to make issues spotting easier 2023-11-14 11:22:17 +01:00
mafiesto4 dd579eb099 Merge branch 'GoaLitiuM-freetype_fontstyle' 2023-11-14 10:39:08 +01:00
mafiesto4 0d8868e5bb Merge branch 'freetype_fontstyle' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-freetype_fontstyle 2023-11-14 10:39:01 +01:00
mafiesto4 c0f0bd87aa Fix error in Tabs.SelectedTab
#1932
2023-11-14 10:33:40 +01:00
mafiesto4 f7fb366233 Minor doc updates 2023-11-14 10:31:11 +01:00
mafiesto4 b2f49e2791 Merge branch 'Tryibion-limit-cloth-brush' 2023-11-14 10:30:46 +01:00
mafiesto4 b848c12802 Merge branch 'limit-cloth-brush' of https://github.com/Tryibion/FlaxEngine into Tryibion-limit-cloth-brush 2023-11-14 10:30:27 +01:00
mafiesto4 45cb4eb66d Merge branch 'RuanLucasGD-WakeUp-Rigidboies' 2023-11-14 10:20:50 +01:00
mafiesto4 a42d54e401 Merge branch 'WakeUp-Rigidboies' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-WakeUp-Rigidboies 2023-11-14 10:20:43 +01:00
Tryibion ab5534da7f Add limits to cloth brush values. 2023-11-13 20:38:04 -06:00
Mr. Capybara 05ea803582 add check for GetStartAwake 2023-11-13 20:05:05 -04:00
mafiesto4 eaafb72ca9 Optimize some includes and use automatic serializers for platform settings 2023-11-13 23:54:07 +01:00
Mr. Capybara 4ceed361e2 small fix 2023-11-13 14:28:16 -04:00
Mr. Capybara a9e1568edc Auto WakeUp rigidbodies when set "isKinematic" to false 2023-11-13 14:26:42 -04:00
mafiesto4 348ed463fc Merge branch 'Radiangames-LightThemeTweaks' 2023-11-13 17:17:42 +01:00
mafiesto4 618273977c Minor improvements to code style #1541 2023-11-13 17:17:05 +01:00
mafiesto4 13881c7d97 Merge branch 'LightThemeTweaks' of https://github.com/Radiangames/FlaxEngine into Radiangames-LightThemeTweaks 2023-11-13 17:02:12 +01:00
mafiesto4 97a28d4431 Add security lockers for managed typeinfo access 2023-11-13 15:48:12 +01:00
mafiesto4 46f82aabcd Fix ui navigation regression from 2f9343c236 2023-11-13 14:48:40 +01:00
mafiesto4 c328eabd2a Merge branch 'Tryibion-dropdown-improvements' 2023-11-13 14:46:11 +01:00
mafiesto4 422fb34c69 Rename NumberOfItemsToShow to ShowMaxItemsCount #1826 2023-11-13 14:41:33 +01:00
mafiesto4 c7eaed6c65 Merge branch 'dropdown-improvements' of https://github.com/Tryibion/FlaxEngine into Tryibion-dropdown-improvements 2023-11-13 14:36:18 +01:00
mafiesto4 418918920e Add GetSplineSegmentLength to get spline segment length
#1879
2023-11-13 11:38:37 +01:00
mafiesto4 930b1b978c Fix incorrect spline length calculation if first point is not at spline origin
#1876
2023-11-13 10:25:46 +01:00
mafiesto4 95180f4aa9 Merge branch 'SinnersSum-Flax-SSDev' 2023-11-13 09:52:43 +01:00
mafiesto4 0f14672e3b Codestyle formatting and fixes for #1888 2023-11-13 09:45:33 +01:00
mafiesto4 0fe9f6f439 Merge branch 'Flax-SSDev' of https://github.com/SinnersSum/FlaxEngine into SinnersSum-Flax-SSDev 2023-11-12 21:47:45 +01:00
mafiesto4 cc1e98db3c Bump up build number 2023-11-12 01:06:06 +01:00
mafiesto4 31ce41c5a4 Fix marking scene as dirty when creating prefab from existing actor
#1916
2023-11-11 17:57:54 +01:00
mafiesto4 be90f47585 Documentation improvements from https://github.com/FlaxEngine/FlaxDocs/pull/125 2023-11-11 15:37:12 +01:00
mafiesto4 ddaa5f9161 Fix regression in Custom Editor UI from 74bcf7d9e5
#1616 #1911
2023-11-11 14:47:20 +01:00
GoaLitiuM dc7170c51e Expose Freetype font style flags in FontAsset 2023-11-10 21:32:50 +02:00
mafiesto4 43ae0bcd4c Merge branch 'MineBill-fix-rider-detection' 2023-11-10 16:14:48 +01:00
mafiesto4 252bb680fa Merge branch 'fix-rider-detection' of https://github.com/MineBill/FlaxEngine into MineBill-fix-rider-detection 2023-11-10 16:14:38 +01:00
mafiesto4 beab66e42e Merge branch 'RuanLucasGD-rebuild-navigation' 2023-11-10 15:54:13 +01:00
mafiesto4 c2c0ad8067 Merge branch 'rebuild-navigation' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-rebuild-navigation 2023-11-10 15:08:55 +01:00
mafiesto4 057d1fbcc6 Fix unpacking Float3 and other inbuilt Variant types via Unpack node in Visual Script
#1903
2023-11-10 15:07:37 +01:00
Mr. Capybara 626cde118b Add verification to rebuild navigation 2023-11-10 09:45:46 -03:00
mafiesto4 36daa38e0f Fix CollectionEditor to properly support editing multiple arrays
#1818
2023-11-10 13:23:32 +01:00
MineBill ed69f11121 Don't hardcode appdata path for linux anymore. 2023-11-10 13:58:03 +02:00
mafiesto4 9cd8c02911 Fix NetworkTransform to properly reject local simulation deltas on incoming authoritative transform data
#1907
2023-11-10 11:34:52 +01:00
mafiesto4 7d70a15034 Fix color editing control to properly handle mouse event
#1782
2023-11-10 10:20:21 +01:00
mafiesto4 39a5b8e635 Invert check order 2023-11-10 01:32:24 +01:00
Mr. Capybara 2ae290491e fix build 2023-11-09 14:50:56 -04:00
Mr. Capybara 3c71dc99e0 Rebuild navigation after apply changes in Navigation asset 2023-11-09 14:08:01 -04:00
NoriteSC ea3f02f810 Fix rotacion sheers the UI element 2023-11-09 17:34:51 +01:00
mafiesto4 4ae57e7769 Fix issue with asset loading to be properly canceled when reimporting file
#1894
2023-11-09 14:52:28 +01:00
mafiesto4 22c8ec5342 Fix crash when rigidbody gets deleted during physical collision
#1893
2023-11-09 11:50:48 +01:00
mafiesto4 710b9275fd Fix minor typos https://github.com/FlaxEngine/FlaxDocs/pull/123 2023-11-09 09:13:40 +01:00
mafiesto4 e7844bb5b2 Merge branch 'Menotdan-custom-model-matpv' 2023-11-09 09:10:32 +01:00
mafiesto4 d8a54692f0 Code cleanup #1785 2023-11-09 09:10:25 +01:00
mafiesto4 30ca7d52d0 Merge branch 'custom-model-matpv' of https://github.com/Menotdan/FlaxEngine into Menotdan-custom-model-matpv 2023-11-09 09:06:26 +01:00
mafiesto4 888a8ee7b9 Merge branch 'NoriteSC-Nodes' 2023-11-08 21:30:44 +01:00
mafiesto4 d90b723487 Code cleanup and usability tweaks for #1600 2023-11-08 21:30:31 +01:00
mafiesto4 67c22cf3d4 Merge branch 'Nodes' of https://github.com/NoriteSC/FlaxEngineFork into NoriteSC-Nodes 2023-11-08 21:19:08 +01:00
NoriteSC 6497f3109a Merge branch 'MathLib' of https://github.com/NoriteSC/FlaxEngineFork into MathLib 2023-11-08 18:36:05 +01:00
NoriteSC 6dcadb5131 Compacted UpdateTransform Matrix math 2023-11-08 18:35:27 +01:00
mafiesto4 d6f449820b Merge branch 'RuanLucasGD-ui-usability-improv' 2023-11-08 17:23:23 +01:00
mafiesto4 a6c47ae17b Merge branch 'ui-usability-improv' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-ui-usability-improv 2023-11-08 17:08:23 +01:00
mafiesto4 b3c15d6562 Merge branch 'Tryibion-center-import' 2023-11-08 15:07:44 +01:00
mafiesto4 0fe46457c6 Merge branch 'center-import' of https://github.com/Tryibion/FlaxEngine into Tryibion-center-import 2023-11-08 15:07:38 +01:00
mafiesto4 bcaa42dda2 Fix crash on negative collection capacity due to int32 maximum value limit
#1886
2023-11-08 15:07:20 +01:00
mafiesto4 22fa7a89ac Merge branch 'Tryibion-anim-slot-speed-fix' 2023-11-08 14:43:08 +01:00
mafiesto4 e572f75b06 Merge branch 'anim-slot-speed-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-anim-slot-speed-fix 2023-11-08 14:43:03 +01:00
mafiesto4 11b60390b6 Add GetRotationFromTo and FindBetween utilities to C# Quaternion API
#1885
2023-11-08 14:41:36 +01:00
mafiesto4 1a7770fba2 Fix deadlock regression when saving Visual Script in Editor with active instance objects
#1890
2023-11-08 14:33:05 +01:00
mafiesto4 966fb0275b Add SortScore to Visject node archetypes and use it to favor method overrides in Visual Script 2023-11-08 11:52:31 +01:00
mafiesto4 785d3e8648 Fix Output Log window to scroll log on startup properly 2023-11-08 11:40:57 +01:00
mafiesto4 2f9343c236 Add handling ViewLayersMask from camera when rendering UICanvas
#1811
2023-11-08 11:21:29 +01:00
SS 52a1175f96 Seperated out assembly resolution logic to it's own function 2023-11-07 16:30:50 -07:00
SS 77b6a4a68b Fixed issue in NativeInterop
Readded check in current app domain to ExtendedSerializationBinder
2023-11-07 16:03:03 -07:00
mafiesto4 74bcf7d9e5 Fix custom editor layout rebuilding when it has more editors in use
#1616
2023-11-07 18:30:05 +01:00
mafiesto4 22d754e797 Fix error during new json asset creation via ContentContextMenu if the class is missing empty constructor
#1838
2023-11-07 16:21:56 +01:00
mafiesto4 0d85094ebb Fix error during new json asset creation via ContentContextMenu if the class is missing empty constructor
#1838
2023-11-07 16:21:48 +01:00
mafiesto4 7d43a0cc8b Fix various cases of closing window tabs when using Dock Windows in Editor
#1750
2023-11-07 16:14:09 +01:00
mafiesto4 4c413cb146 Merge branch 'MineBill-editor-list-dragging' 2023-11-07 10:54:23 +01:00
mafiesto4 4238c43f27 Format code #1850 2023-11-07 10:54:11 +01:00
mafiesto4 f163edfb7e Move AssetPickerValidator to Editor Content folder
#1850
2023-11-07 10:24:38 +01:00
mafiesto4 fd4a5595c0 Merge branch 'editor-list-dragging' of https://github.com/MineBill/FlaxEngine into MineBill-editor-list-dragging 2023-11-07 10:21:57 +01:00
mafiesto4 f6645e5600 Add debug drawing contact offset for selected collider
#1728
2023-11-07 09:56:33 +01:00
Tryibion b72849eafe Fix anim slot from playing animations more than 1 time based on speed. 2023-11-06 19:52:19 -06:00
SS d6e93a7fab Fixed issue involving stale scripting assemblies in FlaxEngine.Json dynamic type resolution
Added new ExtendedSerializationBinder
Added callback to clear serializer cache on scripting assembly reload
Added low-cost mechanism to invalidate the SerializerCache after domain reload
2023-11-06 18:49:30 -07:00
mafiesto4 6648481d12 Improve various doc comments to be more usable as tooltips in Editor 2023-11-07 00:57:18 +01:00
mafiesto4 87a9dedba4 Refactor default ContactOffset for Collider to be 2 (keep 10 for CharacterController)
#1728
2023-11-07 00:56:55 +01:00
mafiesto4 4fdeb773a5 Add hidding Camera properties based on UsePerspective option
#1858
2023-11-07 00:29:29 +01:00
mafiesto4 a90cf7c28f Add better formatting for automatic tooltips in Editor from xml comments 2023-11-07 00:26:14 +01:00
mafiesto4 4b2595e904 Remove tooltips from Camera and use automatic ones from xml comments 2023-11-07 00:19:02 +01:00
mafiesto4 42e8311736 Add engine version in Editor main window title
#1847
2023-11-07 00:13:13 +01:00
mafiesto4 a685918e10 Add default value for material Sphere Mask node to create blob gradient around UV center
#1830
2023-11-06 23:57:54 +01:00
mafiesto4 47ca4228dd Fix compile warning 2023-11-06 20:50:52 +01:00
mafiesto4 7dc645c114 Update Tracy Profiler to 0.10 2023-11-06 20:50:37 +01:00
mafiesto4 c78ce9697c Fix incorrect tabs selection handling when tab gets removed
#1843
2023-11-06 18:14:16 +01:00
mafiesto4 c3d74b690e Fix editor plugins init regression from #1779 and compact more code 2023-11-06 18:13:06 +01:00
mafiesto4 ae85a94261 Fix memory leak while doing drag&drop with Debug Draw in use
#1723
2023-11-06 17:18:20 +01:00
mafiesto4 e7b1fce3eb Merge DoDragDropJob to hsare the same code for Mac and Windows
#1723
2023-11-06 17:03:03 +01:00
mafiesto4 b47420f232 Compact various source code chunks 2023-11-06 16:56:15 +01:00
mafiesto4 c025b4414c Add support for unlimited window size if MaximumSize is set to Zero
#1824
2023-11-06 14:42:29 +01:00
mafiesto4 51c0a6e100 Fix crash regression on Dictionary and HashSet capacity set to 0 when it contains elements 2023-11-06 14:32:04 +01:00
mafiesto4 9a9e32d4c5 Fix incorrect directional light shadows influence on secondary render views
#1758
2023-11-06 14:20:30 +01:00
mafiesto4 1e9ded55b0 Fix missing xml doc 2023-11-06 14:09:39 +01:00
mafiesto4 e22fa20dc1 Minor fixes to #1740 2023-11-06 14:06:10 +01:00
mafiesto4 fe69a52cf2 Merge branch 'RuanLucasGD-add-reload-scenes-button' 2023-11-06 13:55:48 +01:00
mafiesto4 9eb9294e84 Merge branch 'add-reload-scenes-button' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-add-reload-scenes-button 2023-11-06 13:55:43 +01:00
mafiesto4 c53fce18a8 Merge branch 'Chikinsupu-MaterialEditor-RemovedUnsupportedParameterTypes' 2023-11-06 13:54:47 +01:00
mafiesto4 8500667817 Merge branch 'MaterialEditor-RemovedUnsupportedParameterTypes' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-MaterialEditor-RemovedUnsupportedParameterTypes 2023-11-06 13:54:41 +01:00
mafiesto4 40a3911453 Merge branch 'Tryibion-spawn-scalar' 2023-11-06 13:54:23 +01:00
mafiesto4 e57e86cde1 Fix spawned ui canvas scaller to use the same transform as CanvasScaler
#1819
2023-11-06 13:54:01 +01:00
mafiesto4 ad290d0140 Merge branch 'spawn-scalar' of https://github.com/Tryibion/FlaxEngine into Tryibion-spawn-scalar 2023-11-06 13:36:24 +01:00
Tryibion 0930671e90 Cache main panel, cleanup cached variables. 2023-11-06 06:25:17 -06:00
mafiesto4 855122672f Merge branch 'Chikinsupu-Visject-CommentOrder' 2023-11-06 13:09:29 +01:00
mafiesto4 e68330f5b5 Merge branch 'Visject-CommentOrder' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-Visject-CommentOrder 2023-11-06 13:09:21 +01:00
mafiesto4 a0d4714a0f Add always logging unhandled c# exception
#1861
2023-11-06 12:23:17 +01:00
mafiesto4 f703e7de77 Fix compile error 2023-11-06 11:05:31 +01:00
mafiesto4 7e6c8b7b32 Codestyle fix #1779 2023-11-06 10:33:11 +01:00
mafiesto4 a55dcf42da Merge branch 'Tryibion-plugin-order' 2023-11-06 09:37:15 +01:00
mafiesto4 23369c2ff3 Merge branch 'plugin-order' of https://github.com/Tryibion/FlaxEngine into Tryibion-plugin-order 2023-11-06 09:37:09 +01:00
mafiesto4 7855049509 Merge branch 'Chikinsupu-Visject-ConvertConstantToParameter' 2023-11-06 08:41:45 +01:00
mafiesto4 d79dd4aaf7 Add undo for Convert to Parameter connections change in #1671 2023-11-06 08:41:36 +01:00
mafiesto4 2c5a5acf33 Add maintaining new param id in undo #1671 2023-11-05 23:30:39 +01:00
mafiesto4 342360f537 Refactor #1671 2023-11-05 23:21:14 +01:00
mafiesto4 3ba8875121 Merge branch 'Visject-ConvertConstantToParameter' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-Visject-ConvertConstantToParameter
# Conflicts:
#	Source/Editor/Surface/Archetypes/Constants.cs
2023-11-05 21:43:16 +01:00
mafiesto4 655afb4b90 Merge branch 'GoaLitiuM-editor_binding_fixes' 2023-11-05 21:40:50 +01:00
mafiesto4 f9a9912895 Merge branch 'editor_binding_fixes' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-editor_binding_fixes 2023-11-05 21:39:24 +01:00
mafiesto4 bc91b1ed44 Merge branch 'MineBill-fix-color-picker-position' 2023-11-05 21:10:56 +01:00
mafiesto4 6fbf7fa07b Merge branch 'fix-color-picker-position' of https://github.com/MineBill/FlaxEngine into MineBill-fix-color-picker-position 2023-11-05 21:09:49 +01:00
mafiesto4 ea48056699 Merge branch 'Tryibion-ensure-no-layer-popup' 2023-11-05 21:04:43 +01:00
mafiesto4 82d5130261 Merge branch 'ensure-no-layer-popup' of https://github.com/Tryibion/FlaxEngine into Tryibion-ensure-no-layer-popup 2023-11-05 21:04:38 +01:00
mafiesto4 b7e0994932 Merge branch 'Chikinsupu-Visject-MoreAlternativeTitles' 2023-11-05 20:54:22 +01:00
mafiesto4 d13b30304a Merge branch 'Visject-MoreAlternativeTitles' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-Visject-MoreAlternativeTitles 2023-11-05 20:54:18 +01:00
mafiesto4 abc340b52c Merge branch 'MineBill-honor-xdg_data_home' 2023-11-05 20:51:36 +01:00
mafiesto4 2dd16c1fb0 Merge branch 'honor-xdg_data_home' of https://github.com/MineBill/FlaxEngine into MineBill-honor-xdg_data_home 2023-11-05 20:51:31 +01:00
mafiesto4 77e6aafc79 Fix crash when not clearing Online Platform in Editor before hot-reload
#1873
2023-11-05 19:36:09 +01:00
mafiesto4 c23f8f2b30 Fix loading delay-loaded-dll on Windows when using project plugin with native dependencies
#1873
2023-11-05 19:35:33 +01:00
MineBill 267e8daba5 Honor the XDG_DATA_HOME env var and use the approved default as per specification. 2023-11-05 19:36:01 +02:00
mafiesto4 c5d3954bc8 Add CalculateBoneOffsetMatrices option to fix some animated model skeletons rendering
#1862
2023-11-05 14:11:28 +01:00
mafiesto4 a7bb236344 Fix Mono GC threads suspend to not deadlock when attaching native threads to managed runtime
#1864
2023-11-05 14:07:05 +01:00
mafiesto4 0387f7df8a Add name to Android main thread 2023-11-04 22:21:52 +01:00
mafiesto4 ca2106ff5d Remove SHADOW_MAPS_FORMAT and support fallback formats for shadow maps 2023-11-04 21:27:57 +01:00
mafiesto4 4a10878b45 Refactor GPUResourceProperty 2023-11-04 20:04:40 +01:00
mafiesto4 22e34cb2b4 Fix crash on editor startup without code editor selected
#1872
2023-11-04 19:30:16 +01:00
mafiesto4 585b6bacad Simplify #1807 2023-11-04 19:26:46 +01:00
mafiesto4 f736aae75d Merge branch 'Tryibion-limit-rename-popup' 2023-11-04 19:23:38 +01:00
mafiesto4 880e13865f Merge branch 'limit-rename-popup' of https://github.com/Tryibion/FlaxEngine into Tryibion-limit-rename-popup 2023-11-04 19:23:32 +01:00
mafiesto4 7072839254 Merge branch 'MineBill-find-interfaces' 2023-11-04 19:22:29 +01:00
mafiesto4 45060721e7 Merge branch 'find-interfaces' of https://github.com/MineBill/FlaxEngine into MineBill-find-interfaces 2023-11-04 19:22:23 +01:00
mafiesto4 87d67a78f4 Merge branch 'RuanLucasGD-add-extended-buttons-linux' 2023-11-04 19:20:45 +01:00
mafiesto4 0ab43dd301 Merge branch 'add-extended-buttons-linux' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-add-extended-buttons-linux 2023-11-04 19:19:29 +01:00
mafiesto4 8c34fe7933 Reduce LargeWorlds::ChunkSize to 8192
#1854
2023-11-04 19:18:21 +01:00
mafiesto4 fe3f64f06a Fix iOS build 2023-11-04 19:15:37 +01:00
mafiesto4 8af3cfd90b Merge remote-tracking branch 'origin/master' 2023-11-04 19:14:55 +01:00
mafiesto4 3bf7b57dbd Fix BitArray::SetAll() when the item is not multiple of 8
#1863
2023-11-04 19:14:45 +01:00
mafiesto4 19752e4f3b Add storing shader asset includes paths in compact format for portability 2023-11-04 15:26:18 +01:00
mafiesto4 50bcbf980e Add SetThreadAffinityMask and SetThreadPriority and thread name for Apple platforms 2023-11-04 14:08:53 +01:00
mafiesto4 236e5772ce Fix CultureInfo to handle missing country code and fallback to outer language code 2023-11-04 13:49:30 +01:00
mafiesto4 6ddf241ea4 Minor improvements to reference properties 2023-11-03 22:40:18 +01:00
mafiesto4 e429e85aae Continue Delegate refactor to use single memory allocation and atomic operations for data access 2023-11-03 22:27:58 +01:00
mafiesto4 224e43ea55 Use soft asset ref to graphics settings
#1852
2023-11-03 19:23:38 +01:00
mafiesto4 6f1ee382b5 Fix regression from 087cfd7a8c on hashset item duplicate re-add 2023-11-03 19:07:16 +01:00
mafiesto4 da72dd4806 Add unit test for HashSet and Dictionary collection types 2023-11-02 19:59:27 +01:00
mafiesto4 087cfd7a8c Refactor HashSet and Dictionary collections capacity to handle rehashing when too many elements were deleted 2023-11-02 19:59:01 +01:00
MineBill 151c6bc6c3 Fix color picker dialog not staying inside the current screen. 2023-11-01 20:07:58 +02:00
mafiesto4 c0a8d29453 Improve Cloth usage 2023-11-01 10:46:47 +01:00
mafiesto4 1a254afd4f Fix crash when creating empty cloth 2023-11-01 10:29:44 +01:00
MineBill f6e9d0431b Implement drag and drop for list collection. 2023-11-01 01:31:42 +02:00
Mr. Capybara 6cfc8c1b1a Add extended buttons support for linux 2023-10-31 14:52:09 -04:00
mafiesto4 536be6c6cf Merge branch 'master' of https://gitlab.flaxengine.com/flax/flaxengine 2023-10-31 16:11:15 +01:00
mafiesto4 b0fe99f1ec Disable mono thread attach to fix current freeze on GC STW event 2023-10-31 16:11:09 +01:00
MineBill df5dc0c284 Extract validation/item handling of AssetPicker in a separate class. 2023-10-31 16:32:57 +02:00
mafiesto4 f9614a4879 Disable capacity alloc on delegate creation 2023-10-31 15:31:40 +01:00
mafiesto4 4e2ee897bc Fix missing codesign for macOS game binaries 2023-10-31 15:22:14 +01:00
mafiesto4 37a6ea9beb Merge remote-tracking branch 'origin/master' 2023-10-31 14:21:00 +01:00
mafiesto4 5ef3f66274 Merge branch 'master' of https://gitlab.flaxengine.com/flax/flaxengine 2023-10-31 14:17:55 +01:00
mafiesto4 1567c1c8d6 Fix Mono AOT on iOS to not freeze during GC stop-the-world event on memory collection 2023-10-31 14:15:35 +01:00
mafiesto4 2d1d8cc310 Fix typo 2023-10-30 18:34:20 +01:00
mafiesto4 1fc972d6ac Fix stall in GC collect on iOS with AOT 2023-10-30 16:45:57 +01:00
MineBill 357148f973 Include interfaces in FindScript. 2023-10-30 08:07:46 +02:00
mafiesto4 f434ff2efe Fix memory overcommitment by HashSet when adding and removing the same item in a loop
#1829
2023-10-29 13:37:05 +01:00
mafiesto4 56c9429e25 Fix spawning prefab without transform provided
#1831
2023-10-29 02:57:59 +02:00
mafiesto4 83a931de7e Fix typo bug in DOF 2023-10-29 01:57:48 +02:00
mafiesto4 9c1a7a20d4 Add volk.h header to distributed build files 2023-10-28 22:10:41 +02:00
mafiesto4 d9c2decff5 Fix crash when contact was not read properly 2023-10-28 20:09:27 +02:00
Tryibion 1fa03a0de2 Fix focus issues to allow panel scroll bar to be clicked and used. 2023-10-28 11:25:14 -05:00
Tryibion 590f3f7493 Fix Dropdown scaling with CanvasScalar. Add limiting number of items to show in the dropdown. 2023-10-28 10:29:39 -05:00
mafiesto4 9f3221c533 Remove unused include 2023-10-28 14:02:25 +02:00
mafiesto4 468c93949e Fix crash when creating empty particle emitter 2023-10-28 14:01:44 +02:00
mafiesto4 b028faf0cc Update assets 2023-10-28 13:52:23 +02:00
mafiesto4 a95c9059aa Update build number 2023-10-28 13:49:05 +02:00
mafiesto4 615b6470e5 Fix iOS project path if it contains whitespace chars 2023-10-28 11:44:11 +02:00
Tryibion 90642b8862 Spawn canvas scalar on canvas creation. 2023-10-27 13:25:50 -05:00
Ari Vuollet 900e6338d6 Fix wrong variable name
Co-authored-by: NoriteSC <53096989+NoriteSC@users.noreply.github.com>
2023-10-27 19:21:21 +03:00
mafiesto4 70a06c5db3 Update build number and add revision field for future patches 2023-10-26 15:21:01 +02:00
mafiesto4 d9b0e99b9c Add support for using Revision number in projects version 2023-10-26 15:20:35 +02:00
mafiesto4 1d41aa01ce Refactor vertex shaders to use GPUShaderProgramVS::InputElement for input layout data 2023-10-26 14:36:02 +02:00
mafiesto4 186e13b5e8 Add support for runtime running on GPU without Compute Shaders support 2023-10-26 14:33:21 +02:00
mafiesto4 bfaa292b04 Fix invoking managed method on value types (eg. Transform) to properly handle instance value
#1801
2023-10-26 11:37:37 +02:00
mafiesto4 f44421b7a7 Optimize managed method invoke on NetCore to skip virtual call that is the same as default one 2023-10-26 11:25:30 +02:00
mafiesto4 2158fa7358 Remove not needed end line in script template 2023-10-25 23:34:29 +02:00
Tryibion 18c119c155 Ensure layer confirmation does not popup in play mode. 2023-10-25 16:25:26 -05:00
mafiesto4 c27187bd0a Fix deserializing vector types in Editor from ToString FormatException
#1802
2023-10-25 19:17:04 +02:00
Tryibion 8c6ced4bb9 Limit the scene tree and prefab tree rename popup to only go to panel right edge. 2023-10-25 11:38:14 -05:00
mafiesto4 966cd973c6 Add GetHash to various math/core types
#1802
2023-10-25 18:35:59 +02:00
Tryibion 66a709f09e small fixes 2023-10-25 10:46:04 -05:00
Tryibion bfaae46c7e remove not needed variable. 2023-10-25 10:35:12 -05:00
Tryibion b8921fd990 clean up 2023-10-25 09:58:02 -05:00
Tryibion 73694cba6c Add being able to set origin of mesh to the local mesh origin. fix centering several meshes. 2023-10-25 09:57:51 -05:00
mafiesto4 fa836c50a0 Merge branch 'MineBill-messagebox' 2023-10-25 14:58:56 +02:00
mafiesto4 a5d16b49e9 Merge branch 'messagebox' of https://github.com/MineBill/FlaxEngine into MineBill-messagebox 2023-10-25 14:58:51 +02:00
mafiesto4 9a6bce144b Merge branch 'solnem-feat/improved-camera-settings' 2023-10-25 14:58:14 +02:00
mafiesto4 daf31cfa4d Format code #1611 2023-10-25 14:57:44 +02:00
Nils Hausfeld 1f8da14780 - Alternative titles for comparisons 2023-10-25 11:53:43 +02:00
Nils Hausfeld cfe717969b Merge branch 'master' into Visject-MoreAlternativeTitles 2023-10-25 11:46:09 +02:00
NoriteSC 210c5a5bb2 Merge branch 'FlaxEngine:master' into Nodes 2023-10-25 07:03:46 +02:00
NoriteSC 137c82a387 Update Material.cs 2023-10-25 06:21:19 +02:00
Mr. Capybara b2db1330c0 copy old control data to new control when set UIControl type 2023-10-24 21:45:00 -04:00
GoaLitiuM 06f37794c2 Add input bindings for game window mouse unlock and toggle fullscreen 2023-10-24 22:27:12 +03:00
GoaLitiuM 081648ef06 Fix common tooltips with hardcoded keybindings 2023-10-24 21:47:18 +03:00
MineBill 6f773bd558 Make the message box a TASKMODEL to prevent interation with the editor. 2023-10-24 18:03:07 +03:00
mafiesto4 7c84ca5b84 Merge branch 'feat/improved-camera-settings' of https://github.com/solnem/FlaxEngine into solnem-feat/improved-camera-settings 2023-10-24 14:50:52 +02:00
mafiesto4 806590d1c3 Fix deadlock in scene loading
#1761 #1773
2023-10-24 14:08:34 +02:00
Menotdan 8982961254 Add custom material option to Material Preview. 2023-10-23 22:10:17 -04:00
mafiesto4 ba374a27db Reduce code bloat 2023-10-23 22:26:55 +02:00
mafiesto4 9d1ba6cacf Fix compilation errors when building with old Delegate impl 2023-10-23 22:10:21 +02:00
mafiesto4 ea0094870c Merge branch 'Tryibion-particle-loop-fix' 2023-10-23 18:46:15 +02:00
mafiesto4 2220623cd2 Merge branch 'particle-loop-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-particle-loop-fix 2023-10-23 18:45:30 +02:00
mafiesto4 aed81b58ba Update readme 2023-10-23 16:00:23 +02:00
mafiesto4 9c4382dffb Fix using dock window panels on macOS in Editor 2023-10-23 15:59:09 +02:00
mafiesto4 f28947f59b Fix MacWindow::SetClientBounds to include screen scale 2023-10-23 14:50:10 +02:00
Tryibion 2e85ff0fb3 Simplify code 2023-10-22 22:19:51 -05:00
Tryibion fbaf14b6fa Add to be able to specify order of plugin initialization and deinitialization. 2023-10-22 21:58:20 -05:00
mafiesto4 6ff3e0f488 Various improvements to macOS platform 2023-10-22 20:06:54 +02:00
mafiesto4 ccf6c28b02 Add interval to Apple autoreleasepool 2023-10-22 19:55:20 +02:00
mafiesto4 c88e184df3 Fix crash when window gets removed during windows update loop 2023-10-22 15:56:25 +02:00
mafiesto4 1280e61af0 Add IsDebuggerPresent for macOS and iOS platforms 2023-10-22 15:33:21 +02:00
mafiesto4 9fa0b174f5 Fix deprecation warnings on Apple 2023-10-22 15:32:56 +02:00
Nils Hausfeld ea00a448ef - Minor cleanup 2023-10-22 12:54:14 +02:00
Nils Hausfeld 7b2058d1b2 - Added alternative titles to some nodes 2023-10-22 12:37:51 +02:00
Tryibion 78aae0da5a Better handling stopping/resetting non-looping effect. 2023-10-21 17:22:02 -05:00
Tryibion 7d9991999d Better fix. 2023-10-21 14:08:23 -05:00
Tryibion ad15c5b2fc Fix particles effect not being able to just call play if islooped is false. 2023-10-21 13:36:39 -05:00
Nils Hausfeld ba31627ae0 Merge remote-tracking branch 'upstream/master' into Visject-CommentOrder 2023-10-21 16:06:44 +02:00
Nils Hausfeld ec7840f36b - New comments now get spawned on top of other comments
- Commenting other comments now puts the spawned comment below the child comments
- Added Order Value to comments to serialize order
- Added backwards compatiblity to older editor versions
- Cleanup
- XML Comments
2023-10-21 16:06:28 +02:00
mafiesto4 21f2e59d12 Add drag&drop support to macOS 2023-10-21 15:36:38 +02:00
mafiesto4 dcbc917b7d Add local util script to ignored on macOS 2023-10-21 15:13:36 +02:00
Nils Hausfeld fa8b92a456 Adding the ability to order comments in visject 2023-10-21 14:18:30 +02:00
Nils Hausfeld 432f6d5402 Merge branch 'master' into Visject-ConvertConstantToParameter 2023-10-21 13:11:51 +02:00
Nils Hausfeld 571f8febf4 - Moved convertible node file out of archetypes folder into surface folder to be more in line of the project structure (other special nodes like surfacecomment are also just in the surface folder)
- Cleanup
2023-10-21 13:11:42 +02:00
mafiesto4 08a6a2b6dc Fix potential crashes on macOS due to missing window inside view event 2023-10-21 13:04:33 +02:00
mafiesto4 ba39938ed5 Update Flax icon for macOS to match design guidelines 2023-10-21 12:44:43 +02:00
mafiesto4 ab49457944 Add log for build command invoke in deployer 2023-10-21 12:44:25 +02:00
Nils Hausfeld c371a5b78c - Removed Quaternion and Transform from material parameter types since they are not supported 2023-10-20 12:55:54 +02:00
mafiesto4 3188798152 Merge branch 'MineBill-remember-hierarchy-expanded' 2023-10-20 12:33:15 +02:00
mafiesto4 5cafe1c328 Merge branch 'remember-hierarchy-expanded' of https://github.com/MineBill/FlaxEngine into MineBill-remember-hierarchy-expanded 2023-10-20 12:33:08 +02:00
mafiesto4 ad7c7d7360 Merge branch 'MineBill-fix-module-names' 2023-10-20 12:29:06 +02:00
mafiesto4 70200b5608 Merge branch 'fix-module-names' of https://github.com/MineBill/FlaxEngine into MineBill-fix-module-names 2023-10-20 12:29:00 +02:00
mafiesto4 e796d9ea6f Further improve a989173e2d 2023-10-20 11:22:22 +02:00
mafiesto4 a5aaa92d62 Bump up build number 2023-10-20 00:28:28 +02:00
mafiesto4 4e9a739a52 Update GPU particle emitter graph version after recent changes 2023-10-20 00:28:13 +02:00
MineBill 7906e26fe0 Limit what characters module names can contain. 2023-10-20 00:19:32 +03:00
mafiesto4 770d21566a Add macOS disk image notarization 2023-10-19 23:13:05 +02:00
mafiesto4 418e220c00 Add proper codesigning for the Editor app for macOS 2023-10-19 22:40:42 +02:00
mafiesto4 9f98a5304f Merge remote-tracking branch 'origin/master' 2023-10-19 19:13:18 +02:00
mafiesto4 a8f961c438 Add cook&run support for macOS and Linux 2023-10-19 19:09:32 +02:00
mafiesto4 2bb8c82329 Add support for packaging editor with bundled platform data 2023-10-19 19:09:06 +02:00
Mr. Capybara 70ccc79d54 change button order 2023-10-19 12:33:23 -04:00
MineBill c773c3e8fc Collapse/Expand all node in the tree if the user is pressing the Alt key. 2023-10-19 18:55:58 +03:00
MineBill 2f3685c161 Use PrefabObjectID when setting/getting the actor expanded value for prefabs. 2023-10-19 18:43:13 +03:00
Nils Hausfeld 7cb4d27979 - Minor cleanup and comments 2023-10-19 17:23:34 +02:00
Nils Hausfeld fdda42e504 Merge remote-tracking branch 'upstream/master' into Visject-ConvertConstantToParameter 2023-10-19 17:09:49 +02:00
mafiesto4 0ea00a09ca Fix regression from 3e7368b1cb to remove scene lock when spawning actors in async
#1743
2023-10-19 15:29:26 +02:00
mafiesto4 a989173e2d Fix UnitsToText to properly print string with 2 decimal places 2023-10-19 15:16:14 +02:00
mafiesto4 6f60218bec Optimize various rendering stages to skip loading shader when effect is disables 2023-10-19 15:07:03 +02:00
Nils Hausfeld 4efbed91a4 - Fixed a bug where the wrong boxes got connected
- Cleanup
2023-10-19 14:34:10 +02:00
mafiesto4 c0fa858dd0 Fix warning on missing windows layout file when loading default layout 2023-10-19 14:25:37 +02:00
Nils Hausfeld ad6affc863 - More cleanup 2023-10-19 14:17:28 +02:00
Nils Hausfeld aafdc64b68 - Cleanup
- Typo
2023-10-19 14:14:51 +02:00
Nils Hausfeld 41a7aff6d7 - Converting to parameter now also works in Particle and Visual Scripting editor 2023-10-19 14:10:10 +02:00
Nils Hausfeld 9bd002ea33 Merge remote-tracking branch 'upstream/master' into Visject-ConvertConstantToParameter 2023-10-19 14:03:10 +02:00
Nils Hausfeld 3afb6cc88e - Renamed ConstantNode to ConvertableNode
- Moved ConvertableNode into it's own class
- Added support for custom conversion code (currently only used by rotation)
- Added support for Texture, Normal Map, Cube Texture, Uint, Double, String, Quaternion/Rotation
2023-10-19 14:02:46 +02:00
Mr. Capybara b2ba40b082 Add button to reload scenes 2023-10-18 20:34:39 -04:00
mafiesto4 6c45141ef9 Add dmg file building for macOS Editor deployment 2023-10-18 22:10:46 +02:00
mafiesto4 f373c867a7 Improve Game Cooker label text when platform data is missing 2023-10-18 21:57:35 +02:00
mafiesto4 5181db8a0e Fix vscode default build task to favor current architecture (eg. arm64 for Editor on macOS) 2023-10-18 21:51:36 +02:00
Nils Hausfeld 2537855aa3 Merge branch 'master' into Visject-ConvertConstantToParameter 2023-10-18 18:33:08 +02:00
mafiesto4 55ad5ae367 Build Editor bindings only when generating editor project files
#1734 #1569
2023-10-18 16:17:19 +02:00
mafiesto4 24790b18ce Fix typo in shader 2023-10-18 12:56:48 +02:00
mafiesto4 8b096a9286 Fixes 2023-10-18 10:52:36 +02:00
mafiesto4 2d0eabc8be Fix deadlock in Foliage::GetFoliageTypeInstancesCount
#1724
2023-10-17 23:20:30 +02:00
mafiesto4 387e30a1dc Fix compilation regression 2023-10-17 23:13:05 +02:00
mafiesto4 52a621de42 Add color, emissive and opacity parameters setup for auto-imported material instances 2023-10-17 22:45:22 +02:00
mafiesto4 c457087612 Optimize memory allocation when using Sprite size during 2D rendering 2023-10-17 22:44:15 +02:00
mafiesto4 1cbf867fc7 Hide build scenes data toolbar button when none action is set and fix tooltip for cook and run action
#1731
2023-10-17 22:43:43 +02:00
mafiesto4 8d9f4d72f5 Various stability improvements for Editor 2023-10-17 22:42:47 +02:00
mafiesto4 90427da42f Add SubAssetFolder to model import option to redirect auto-imported materials and textures location 2023-10-17 09:59:21 +02:00
mafiesto4 cebae5c4e1 Add foreach loop support to Span type 2023-10-17 09:53:48 +02:00
mafiesto4 d92c7af2cf Fix debug file access race-conditions when importing many materials at once 2023-10-17 09:53:06 +02:00
Nils Hausfeld 447030f53a - Spawned get parameter node now reconnects to all boxes from the converted node 2023-10-16 20:19:18 +02:00
Nils Hausfeld a96445d8bb Merge branch 'master' into Visject-ConvertConstantToParameter 2023-10-16 19:34:22 +02:00
mafiesto4 582cf94198 Fix setting up prefab objects ids mapping for nested prefabs to link cross-object references correctly 2023-10-16 16:37:44 +02:00
mafiesto4 3e7368b1cb Fix HandleObjectDeserializationError to be editor or dev only and thread-safe 2023-10-16 16:36:52 +02:00
mafiesto4 30d510f073 Fix models in toolbox 2023-10-16 16:34:55 +02:00
mafiesto4 50d47fe801 Fix asset load to trigger loading task within mutex to prevent race conditions when loading the same prefab from many threads at once 2023-10-16 16:10:57 +02:00
mafiesto4 036ad570cd Fix warning when dotnet cache file is missing 2023-10-16 11:20:49 +02:00
mafiesto4 d25954725f Add excluding GPU swapchain present time from CPU draw time in profiling tool 2023-10-16 10:58:07 +02:00
mafiesto4 db6b98ecd1 Add ProfilerGPU.Enabled to manually toggle GPU timings 2023-10-16 10:29:44 +02:00
mafiesto4 ad2bd2ce51 Merge branch 'nothingTVatYT-master' 2023-10-16 10:03:23 +02:00
mafiesto4 0c6e2935d1 Merge branch 'master' of https://github.com/nothingTVatYT/FlaxEngine into nothingTVatYT-master 2023-10-16 10:03:16 +02:00
nothingTVatYT 48a5fe54e8 keep auto-close for non-Linux platforms 2023-10-16 01:13:06 +02:00
nothingTVatYT c42a264944 removed a left over debug statement 2023-10-16 01:08:47 +02:00
nothingTVatYT d1b2b64cd1 fix color picker (signal handler + alpha channel) 2023-10-15 21:43:15 +02:00
mafiesto4 88f718709b Add data sent/receive rate charts to the network profiler in Editor 2023-10-15 20:13:34 +02:00
mafiesto4 148ced5a55 Fix compilation 2023-10-15 19:04:35 +02:00
mafiesto4 e4941e5b00 Add asset loading task state check on fail 2023-10-15 18:46:15 +02:00
mafiesto4 8f941c3679 Merge branch 'Vizepi-master' 2023-10-15 18:08:35 +02:00
mafiesto4 c511ea6d23 Merge branch 'master' of https://github.com/Vizepi/FlaxEngine into Vizepi-master 2023-10-15 18:08:20 +02:00
GoaLitiuM bcdd6c0551 Fix FlaxEngine C#-project getting built twice in engine solution 2023-10-15 16:16:53 +03:00
GoaLitiuM ff7e6d82f8 Hide exception when build errors occurs in referenced targets 2023-10-15 16:16:53 +03:00
GoaLitiuM 5b3e09baec Build C# projects in VS/Rider solution configurations
Rider's solution wide analysis does not work properly when projects
are not included in the active configuration for build.
2023-10-15 16:16:53 +03:00
GoaLitiuM 0d7e7c30ca Run Flax.Build when building main C# project 2023-10-15 16:16:53 +03:00
Vizepi 00dc5d44d4 #1716 Do not rebuild contexts twice in a row 2023-10-15 12:24:25 +02:00
mafiesto4 f8f1a66ab9 Fix multi-line logs on Windows regression from cf94cd937a 2023-10-15 10:12:33 +02:00
mafiesto4 22395ce9c3 Merge branch 'GoaLitiuM-delay_dirty_rebuild' 2023-10-15 09:57:56 +02:00
mafiesto4 ab6acbc759 Merge branch 'delay_dirty_rebuild' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-delay_dirty_rebuild 2023-10-15 09:57:47 +02:00
GoaLitiuM 660c0660e2 Delay compiler and project generation after large file operations 2023-10-14 20:52:56 +03:00
mafiesto4 2f3929efe0 Fix Height Layer Blend material node codegen when alpha is constant
#1705
2023-10-14 18:03:51 +02:00
mafiesto4 e51aab0c56 Minor improvements 2023-10-14 18:03:21 +02:00
mafiesto4 eb430b05be Fx regression from #1474 that was causing incorrect checks for IsZero/IsOne in ShaderGraphValue 2023-10-14 18:00:53 +02:00
mafiesto4 96b87ea41a Merge branch 'Menotdan-missing_script_replacement' 2023-10-14 16:49:21 +02:00
mafiesto4 a87eaf82f0 Code style fix 2023-10-14 16:49:09 +02:00
mafiesto4 65a02fc9fd Merge branch 'missing_script_replacement' of https://github.com/Menotdan/FlaxEngine into Menotdan-missing_script_replacement 2023-10-14 16:35:14 +02:00
mafiesto4 3f4ae38291 Merge branch 'GoaLitiuM-delete_content_fix' 2023-10-14 16:34:27 +02:00
mafiesto4 9c5d03164f Merge branch 'delete_content_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-delete_content_fix 2023-10-14 16:34:22 +02:00
mafiesto4 b32a4b5c84 Merge branch 'GoaLitiuM-async_project_regen_fix' 2023-10-14 16:33:11 +02:00
mafiesto4 fc9490ca4c Merge branch 'async_project_regen_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-async_project_regen_fix 2023-10-14 16:32:42 +02:00
mafiesto4 40c0a30039 Merge branch 'GoaLitiuM-vscode_launch_tasks' 2023-10-14 16:31:03 +02:00
mafiesto4 37e3a91b73 Merge branch 'vscode_launch_tasks' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-vscode_launch_tasks 2023-10-14 16:30:57 +02:00
mafiesto4 075431385a Merge branch 'GoaLitiuM-csharp_optimize_module_fix' 2023-10-14 16:30:23 +02:00
mafiesto4 71a19eac29 Merge branch 'csharp_optimize_module_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-csharp_optimize_module_fix 2023-10-14 16:30:16 +02:00
mafiesto4 bedc492ce7 Merge branch 'GoaLitiuM-physx_oncontact_fix' 2023-10-14 16:30:03 +02:00
mafiesto4 ab25b6a258 Merge branch 'physx_oncontact_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-physx_oncontact_fix 2023-10-14 16:29:54 +02:00
GoaLitiuM a3d44e0fee Prevent project file regeneration running while compiling scripts 2023-10-14 17:29:03 +03:00
mafiesto4 69d84eb20f Merge branch 'Tryibion-debug-view-cm' 2023-10-14 16:28:44 +02:00
mafiesto4 f1575da171 Merge branch 'debug-view-cm' of https://github.com/Tryibion/FlaxEngine into Tryibion-debug-view-cm 2023-10-14 16:28:39 +02:00
GoaLitiuM 0c23b76456 Fix error when deleting multiple files and no folders selected 2023-10-14 17:28:21 +03:00
mafiesto4 e0c48ba749 Merge branch 'NoriteSC-Fix-GizmoSize' 2023-10-14 16:28:00 +02:00
mafiesto4 bdacf960d0 Merge branch 'Fix-GizmoSize' of https://github.com/NoriteSC/FlaxEngineFork into NoriteSC-Fix-GizmoSize 2023-10-14 16:26:27 +02:00
mafiesto4 dcc28113a4 Merge branch 'GoaLitiuM-win_minimize_pos_fix' 2023-10-14 16:23:38 +02:00
mafiesto4 4b803feb11 Merge branch 'win_minimize_pos_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-win_minimize_pos_fix 2023-10-14 16:23:28 +02:00
mafiesto4 a5f00ed624 Fix NavCrowd to properly wait for navmesh loaded 2023-10-14 16:21:42 +02:00
mafiesto4 060bff1bdb Fix leftover separator in context menu in Content Window in some locations 2023-10-14 16:21:10 +02:00
mafiesto4 e4b89e1bad Fix plugins initialization order to properly unload scenes before them in cooked game 2023-10-14 16:20:27 +02:00
GoaLitiuM dca6baee49 Use and store restored window position after minimizing the window 2023-10-14 16:44:21 +03:00
mafiesto4 7904690ecf Cleanuo some old code style 2023-10-14 14:00:58 +02:00
Tryibion 7b984396cc Add not to close Debug View CM on button clicked. 2023-10-13 20:52:26 -05:00
GoaLitiuM dc1be86db7 Only generate one set of C++/C# launch tasks for VSCode
Proper fix for b9c6dcd4c7
2023-10-14 03:45:37 +03:00
GoaLitiuM 8548df4a1b Fix crash when physics actor contact is lost with another actor 2023-10-14 02:34:15 +03:00
GoaLitiuM 7014007362 Disable inheriting C# optimization level from dependency modules 2023-10-14 01:45:36 +03:00
mafiesto4 1a5606a45c Improve collision data cooking usability
#1687
2023-10-13 23:33:03 +02:00
mafiesto4 887d2b2115 Fix incorrect animated model bounds update 2023-10-13 23:32:44 +02:00
mafiesto4 1b48663f76 Merge branch 'GoaLitiuM-textbox_escape_fix' 2023-10-13 20:42:32 +02:00
GoaLitiuM 2d5ad297a5 Fix error when hitting escape in read-only textboxes 2023-10-13 19:57:32 +03:00
mafiesto4 18bf005654 Merge branch 'GoaLitiuM-vscode_prelaunch_task_fix' 2023-10-13 16:58:30 +02:00
mafiesto4 7e5c6caffa Merge branch 'vscode_prelaunch_task_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-vscode_prelaunch_task_fix 2023-10-13 16:58:23 +02:00
mafiesto4 702356f1e4 Missing change for c01614b8f5 and regression from 88eca13eb3 2023-10-13 16:58:02 +02:00
mafiesto4 c01614b8f5 Fix build regression from 7180080f19 2023-10-13 16:09:18 +02:00
mafiesto4 7180080f19 Refactor FileMode, FileAccess, FileShare enums into normal enums with docs 2023-10-13 15:44:47 +02:00
mafiesto4 9a636468e0 Fix crash when importing assets in Editor (race-condition from Content Importer thread)
#1691 #1679
2023-10-13 15:44:18 +02:00
mafiesto4 abd6881d7b Fix removing large amount of assets in Editor at once
#1484
2023-10-13 15:43:11 +02:00
mafiesto4 cf94cd937a Fix logging performance and crashes on non-Windows platforms
#662
2023-10-13 14:41:45 +02:00
mafiesto4 03c120ba69 Fix double engine assembly init in Editor 2023-10-13 14:26:33 +02:00
mafiesto4 db52be5936 Fix crash when item is already in a view
#1679
2023-10-13 11:31:43 +02:00
mafiesto4 d0fbf12b92 Fix editor tabs control size for tab header when scroll bar is visible
#1135
2023-10-13 11:16:34 +02:00
mafiesto4 6cd45a58f8 Fix preserving editor minimized floating windows in saved layout
#1135
2023-10-13 11:03:45 +02:00
NoriteSC 13686ae13f Fix 436 and 1251 2023-10-13 00:20:34 +02:00
mafiesto4 fe49811779 Fix linux build 2023-10-12 23:42:17 +02:00
mafiesto4 84d615935e Fix crash when updating GPU particle system without view buffers allocated
#1683
2023-10-12 23:39:39 +02:00
mafiesto4 fdd6b171bb Stability fixes 2023-10-12 23:12:53 +02:00
mafiesto4 74a69b8f13 Fix running game in non-ANSI path
#480
2023-10-12 22:29:48 +02:00
mafiesto4 677cd4e382 Fix build regression from 6f7f22eb47 2023-10-12 22:29:11 +02:00
mafiesto4 88eca13eb3 Add default font bundling (optional) and setup UI Style to match editor logic
#641
2023-10-12 22:28:40 +02:00
mafiesto4 830a810556 Merge branch 'GoaLitiuM-vs_open_file_fix' 2023-10-12 20:05:39 +02:00
mafiesto4 fcb60fbefb Merge branch 'vs_open_file_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-vs_open_file_fix 2023-10-12 20:02:58 +02:00
mafiesto4 2414abf183 Fix particle attributes usage in GPU emitter function
#1640
2023-10-12 20:01:30 +02:00
mafiesto4 d52412c5c3 Fix particle emitter function cache clearing for GPU shader generation
#1640
2023-10-12 19:55:50 +02:00
Menotdan cfdbf75759 Merge branch 'FlaxEngine:master' into missing_script_replacement 2023-10-12 13:13:11 -04:00
mafiesto4 6f7f22eb47 Add outputting shader source code in Editor to text file when compilation fails for debugging 2023-10-12 18:57:27 +02:00
Menotdan a7b2230ef4 Remove unneeded using 2023-10-12 12:23:18 -04:00
Menotdan a8260ed8b6 Fixed Serialization Transfer. 2023-10-12 12:00:27 -04:00
mafiesto4 5b5f43714e Fix invalid particle attributes access inside emitter function
#1640
2023-10-12 17:55:49 +02:00
GoaLitiuM 602936b2bc Fix opening plugin project files in Visual Studio 2023-10-12 18:41:25 +03:00
mafiesto4 8af2f458d7 Fix missing particle layout attributes when using Particle Emitter Function
#1640
2023-10-12 17:39:42 +02:00
GoaLitiuM b9c6dcd4c7 Fix wrong Visual Studio Code preLaunchTask in launch tasks 2023-10-12 16:37:32 +03:00
mafiesto4 bd4127676b Merge branch 'GoaLitiuM-editor_camera_transform_fix' 2023-10-12 15:26:50 +02:00
mafiesto4 daaba49e26 Merge branch 'editor_camera_transform_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-editor_camera_transform_fix 2023-10-12 15:26:45 +02:00
mafiesto4 4f24d53984 Merge branch 'GoaLitiuM-deprecation_messages' 2023-10-12 15:25:17 +02:00
mafiesto4 2f795c6559 Merge branch 'deprecation_messages' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-deprecation_messages 2023-10-12 15:25:12 +02:00
mafiesto4 74041e1322 Merge branch 'Tryibion-value-bo-slide-focus' 2023-10-12 15:24:51 +02:00
mafiesto4 51da322e48 Merge branch 'value-bo-slide-focus' of https://github.com/Tryibion/FlaxEngine into Tryibion-value-bo-slide-focus 2023-10-12 15:24:45 +02:00
mafiesto4 8be325d704 Merge branch 'RuanLucasGD-terrain_gizmo_improv' 2023-10-12 15:20:45 +02:00
mafiesto4 4ca8198478 Merge branch 'terrain_gizmo_improv' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-terrain_gizmo_improv 2023-10-12 15:20:38 +02:00
mafiesto4 455b3f2446 Fix XAudio2 playback when seeking audio start play location 2023-10-12 15:20:23 +02:00
mafiesto4 4ac65ee91c Fix audio preview for multi-channel audio clips 2023-10-12 14:31:41 +02:00
mafiesto4 69fb2c331f Minor improvements to audio 2023-10-12 14:03:43 +02:00
mafiesto4 2671e3881f Add Spacebar to toggle play/pause in Audio Clip window 2023-10-12 14:03:13 +02:00
mafiesto4 749c0cacb4 Fix audio playback in XAudio2 when clip is 3D but source is 2D 2023-10-12 13:11:07 +02:00
mafiesto4 b19bf57dfb Add logging any XAudio2 backed errors 2023-10-12 13:10:34 +02:00
mafiesto4 0175186c27 Improve #1627 to return proper anim length 2023-10-12 12:17:55 +02:00
mafiesto4 866ef896b2 Merge branch 'Tryibion-anim-fix' 2023-10-12 12:12:09 +02:00
mafiesto4 0280fa4f9b Merge branch 'anim-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-anim-fix 2023-10-12 12:12:01 +02:00
mafiesto4 b1ad2c3a02 Fix sprite shadow to match the sprite facing camera
#1504
2023-10-12 12:10:21 +02:00
Menotdan 318f9e5b77 Fix duplicated script replacement. 2023-10-12 01:33:22 -04:00
Menotdan 7742f2d8d4 Add debugging logs. 2023-10-12 01:26:25 -04:00
Menotdan 3d2363ea5c Merge remote-tracking branch 'origin/master' into missing_script_replacement 2023-10-12 01:26:20 -04:00
Menotdan 2b0db40c17 Add basic replacement functionality- replacing adds multiple copies on child actors, however. 2023-10-12 01:22:59 -04:00
Ruan Lucas e97ec74bf8 clean code 2023-10-11 18:37:04 -04:00
Tryibion 28d6fe84ef Small change 2023-10-11 16:17:59 -05:00
Tryibion 8eb9df9a18 Change new anim port to TryGetBox. 2023-10-11 15:57:02 -05:00
Tryibion f2c9ba5a00 Focus parent on value box slide end. 2023-10-11 15:33:32 -05:00
GoaLitiuM 02a219a376 Fix Editor viewport camera transformation getting corrupted when focused 2023-10-11 21:45:07 +03:00
GoaLitiuM 3ed28998e9 Add more descriptive deprecation messages 2023-10-11 21:38:33 +03:00
Nils Hausfeld dcec847d50 - Basic constants can now be converted to parameters 2023-10-11 20:01:56 +02:00
mafiesto4 fa96707c57 Fix crash when implementing INetworkSerializable in C#-only
#1664
2023-10-11 18:39:51 +02:00
mafiesto4 8f3a5bd74a Improve ObjectsRemovalService to handle newly added objects removing 2023-10-11 17:41:35 +02:00
mafiesto4 6dd9f0f036 Improve #1667 to log exception 2023-10-11 17:25:32 +02:00
mafiesto4 97f1572a78 Merge branch 'Menotdan-fix-removing-scripts' 2023-10-11 17:22:06 +02:00
mafiesto4 a0ada24764 Merge branch 'fix-removing-scripts' of https://github.com/Menotdan/FlaxEngine into Menotdan-fix-removing-scripts 2023-10-11 17:22:01 +02:00
mafiesto4 2067c73401 Merge branch 'MineBill-popup-fix' 2023-10-11 17:17:51 +02:00
mafiesto4 dad3e1f77d Revert f1d57e47cb in favor of #1670 2023-10-11 17:17:46 +02:00
mafiesto4 c853b404d6 Merge branch 'popup-fix' of https://github.com/MineBill/FlaxEngine into MineBill-popup-fix 2023-10-11 17:15:14 +02:00
MineBill 1986f2b58b Only set WS_CAPTION if the window is a regular window 2023-10-11 17:06:16 +03:00
mafiesto4 af468ee6ae Fix scripting interop in AOT mode to use reflection-based field access 2023-10-11 15:18:28 +02:00
mafiesto4 b92345c3ef Fix crash when running async C# code with Mono 2023-10-11 12:36:49 +02:00
mafiesto4 bc762761dd Fix engine when used without C# scripting at all 2023-10-11 12:35:27 +02:00
mafiesto4 cbdd6c4964 Add HasDepthClip to GPU Device limits 2023-10-11 10:15:44 +02:00
Menotdan a7937c2b2e Fixed script serialization failures from removing scripts. 2023-10-10 19:12:21 -04:00
mafiesto4 ac542bf920 Fix FieldHelper.GetFieldOffset crash for classes with const fields (compile-time)
Inline call in `CreateScriptingObject` for perf
2023-10-10 20:52:12 +02:00
mafiesto4 902c82ae1e Add pixel format logging when not supported for shadow map 2023-10-10 20:22:53 +02:00
Ruan Lucas 7fcb0a1da7 change terrain brush size with scroll 2023-10-10 10:46:47 -04:00
mafiesto4 ccf3469307 Minor Vulkan tweaks 2023-10-10 14:17:34 +02:00
mafiesto4 3ac7c4e0ee Codestyle fix 2023-10-09 23:21:02 +02:00
mafiesto4 69e973b837 Merge branch 'Chikinsupu-AnimationSampleNode-AnimationAssetReferencePort' 2023-10-09 22:25:03 +02:00
mafiesto4 dafc8a61c1 Merge branch 'AnimationSampleNode-AnimationAssetReferencePort' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-AnimationSampleNode-AnimationAssetReferencePort 2023-10-09 22:24:57 +02:00
mafiesto4 d2594c05ab Merge branch 'nothingTVatYT-fix-linux-open-files-dialog' 2023-10-09 22:22:36 +02:00
mafiesto4 d6d18e93e0 Merge branch 'fix-linux-open-files-dialog' of https://github.com/nothingTVatYT/FlaxEngine into nothingTVatYT-fix-linux-open-files-dialog 2023-10-09 22:22:25 +02:00
mafiesto4 00a03beb78 Optimize Half2 conversion in Render2D 2023-10-09 21:45:36 +02:00
nothingTVatYT 2ff4a69f53 fix reading of pipe buffer from external filechooser 2023-10-09 17:25:28 +02:00
mafiesto4 00100e11f2 Fix C# objects serialization bug when script throws exception during saving to Json
#1656
2023-10-09 15:31:46 +02:00
mafiesto4 fa57440a2f Fix typo 2023-10-09 14:48:19 +02:00
mafiesto4 8a018977d6 Merge branch 'MineBill-fix-transition-data' 2023-10-09 14:35:24 +02:00
mafiesto4 26ffe31a0f Merge branch 'fix-transition-data' of https://github.com/MineBill/FlaxEngine into MineBill-fix-transition-data 2023-10-09 14:35:15 +02:00
mafiesto4 09f2be907e Merge remote-tracking branch 'origin/master' into 1.7
# Conflicts:
#	Flax.flaxproj
2023-10-09 12:40:47 +02:00
mafiesto4 8e23781153 Fix updating time left when destroying large amount of objects
#1584
2023-10-09 12:13:09 +02:00
mafiesto4 64d4076615 Minor tweaks 2023-10-09 12:06:55 +02:00
mafiesto4 d7e9e2ed16 Fix AssetsCache to include project path and reject cache when project gets duplicated with cache
#1631
2023-10-09 11:33:02 +02:00
mafiesto4 1ac4fef8d0 Merge branch 'nothingTVatYT-fix-linux-systeminfo' 2023-10-09 10:44:17 +02:00
mafiesto4 6c0011bef5 Merge branch 'fix-linux-systeminfo' of https://github.com/nothingTVatYT/FlaxEngine into nothingTVatYT-fix-linux-systeminfo 2023-10-09 10:44:08 +02:00
mafiesto4 481a3cfba5 Minor tweaks 2023-10-08 23:33:51 +02:00
mafiesto4 fd7ef38639 Merge branch 'MineBill-linux-doubleclick' 2023-10-08 22:14:09 +02:00
mafiesto4 0b786feb65 Merge branch 'linux-doubleclick' of https://github.com/MineBill/FlaxEngine into MineBill-linux-doubleclick 2023-10-08 22:14:02 +02:00
nothingTVatYT 5b866b643b fix GetDesktopSize for Linux 2023-10-08 22:05:53 +02:00
minebill 03642632f5 Use a maximum distance between clicks, when detecting a double click 2023-10-08 22:05:02 +03:00
mafiesto4 552641c51a Fix potential crashes if uses calls terrain tools with invalid params 2023-10-08 17:02:26 +02:00
mafiesto4 4bfc97d982 Merge branch 'GoaLitiuM-viewport_cam_drift_fix' 2023-10-08 16:50:24 +02:00
mafiesto4 f3818c8a1d Merge branch 'viewport_cam_drift_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-viewport_cam_drift_fix 2023-10-08 16:48:23 +02:00
mafiesto4 45ae103612 Merge branch 'RuanLucasGD-Fix-Actor-OnDestroy' 2023-10-08 16:46:25 +02:00
mafiesto4 c3924d636d Merge branch 'Fix-Actor-OnDestroy' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-Fix-Actor-OnDestroy 2023-10-08 16:41:40 +02:00
mafiesto4 38664e9d43 More improvements to 13853d5fb5 2023-10-08 16:34:41 +02:00
GoaLitiuM 4db1975f02 Fix Editor viewport camera drifting with odd viewport sizes 2023-10-08 17:28:28 +03:00
mafiesto4 13853d5fb5 Fix model asset previews to wait for materials to be loaded 2023-10-08 16:01:34 +02:00
mafiesto4 734f8bcaf4 Fix shader compilation tracking to check for directory existence 2023-10-08 15:52:36 +02:00
mafiesto4 52833377ca Merge branch 'Tryibion-auto-module' 2023-10-08 15:14:40 +02:00
mafiesto4 b56447bae4 Refactor code in #1423 to be cleaner 2023-10-08 15:14:35 +02:00
mafiesto4 3b23e50ee6 Merge branch 'auto-module' of https://github.com/Tryibion/FlaxEngine into Tryibion-auto-module
# Conflicts:
#	Source/Editor/Windows/ContentWindow.ContextMenu.cs
2023-10-08 13:43:28 +02:00
mafiesto4 dd466ef162 Merge branch 'GoaLitiuM-ies_fix' 2023-10-08 13:40:17 +02:00
mafiesto4 f80271bdfd Merge branch 'ies_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-ies_fix 2023-10-08 13:36:55 +02:00
mafiesto4 e07c7f2c15 Merge branch 'GoaLitiuM-light_field_order_fix' 2023-10-08 13:36:20 +02:00
mafiesto4 916993f241 Merge branch 'light_field_order_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-light_field_order_fix 2023-10-08 13:36:10 +02:00
mafiesto4 96a56c11ef Merge branch 'RuanLucasGD-fix_edit_text_box' 2023-10-08 13:34:13 +02:00
mafiesto4 12ed17618f Merge branch 'fix_edit_text_box' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-fix_edit_text_box 2023-10-08 13:34:08 +02:00
mafiesto4 2d1415c40d Merge branch 'Chikinsupu-Visject-BendingPreviewConnectionFix' 2023-10-08 11:16:47 +02:00
mafiesto4 dc59a38b64 Merge branch 'Visject-BendingPreviewConnectionFix' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-Visject-BendingPreviewConnectionFix 2023-10-08 11:16:38 +02:00
mafiesto4 f7769439cf Merge branch 'Chikinsupu-Visject-ContextSensitiveParameterSupport' 2023-10-08 11:15:31 +02:00
mafiesto4 a9231d5e08 Merge branch 'Visject-ContextSensitiveParameterSupport' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-Visject-ContextSensitiveParameterSupport 2023-10-08 11:15:26 +02:00
mafiesto4 af388ef8b4 Merge branch 'Chikinsupu-Visject-FixItemDuplicationBug' 2023-10-08 11:13:00 +02:00
mafiesto4 b2ee160bfe Merge branch 'Visject-FixItemDuplicationBug' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-Visject-FixItemDuplicationBug 2023-10-08 11:12:55 +02:00
mafiesto4 df38752506 Merge branch 'MineBill-alt-key-linux' 2023-10-08 11:10:14 +02:00
mafiesto4 880e394554 Merge branch 'alt-key-linux' of https://github.com/MineBill/FlaxEngine into MineBill-alt-key-linux 2023-10-08 11:10:08 +02:00
mafiesto4 b8f094e007 Cleanup Iterator in ChunkedArray 2023-10-08 11:09:12 +02:00
mafiesto4 b93cbbd194 Merge branch 'GoaLitiuM-dict_iter_fix' 2023-10-08 11:05:18 +02:00
Christopher Rothert 5e85fa2c0c Merge branch 'master' into feat/improved-camera-settings 2023-10-08 01:41:05 +02:00
Christopher Rothert 966e5cdda2 Update some comments 2023-10-08 01:40:50 +02:00
Christopher Rothert 997c442e69 Update movement speed formatting
* add property for movement speed text format
* add additional checks to camera speed progress calculation
* round movement speed to make it visually more appealing in the context menu
2023-10-08 01:07:36 +02:00
Ruan Lucas 95f40ecc0c clean code 2023-10-07 16:27:14 -04:00
minebill e903348d71 Fix incorrect mapping of Alt key on linux 2023-10-07 22:28:39 +03:00
Ruan Lucas 56c3080b10 fix edit text box 2023-10-07 11:06:23 -04:00
Nils Hausfeld d41ec15606 - Implemented support for surface parameters 2023-10-07 13:57:05 +02:00
GoaLitiuM 2eb49dba59 Move Use Inverse Squared Falloff above Falloff Exponent in lights
Prevents the checkbox in UI from moving around when toggling the value.
2023-10-07 14:38:58 +03:00
GoaLitiuM bc658bbfba Fix Dictionary iterator comparison
Missing change from 9291295a4d
2023-10-07 14:25:07 +03:00
GoaLitiuM 1f4343d664 Fix IES profile light computation formula 2023-10-07 14:24:54 +03:00
Christopher Rothert 00aa54cde8 Update camera speed stepping and easing
* remove complex curve function
* update camera easing feature to use Mathf.Pow instead
* add total camera speed steps to ViewportOptions
* change default value for max camera speed from 64 to 32
* update ViewportOptions ordering and grouping
* update string format for movement speed
2023-10-07 02:40:52 +02:00
NoriteSC 004e2ab5e8 Update Source/Engine/Tools/MaterialGenerator/MaterialGenerator.Material.cpp
Co-authored-by: stefnotch <stefnotch@users.noreply.github.com>
2023-10-06 23:07:19 +02:00
NoriteSC d7095957d0 Update Source/Editor/Surface/Archetypes/Material.cs
Co-authored-by: stefnotch <stefnotch@users.noreply.github.com>
2023-10-06 23:07:00 +02:00
Nils Hausfeld e4bd84bd6a - Fixed items in Surface Paramter Group getting duplicated over and over again 2023-10-06 23:02:00 +02:00
NoriteSC 4e2870e90c Update Source/Editor/Surface/Archetypes/Material.cs
Co-authored-by: stefnotch <stefnotch@users.noreply.github.com>
2023-10-06 22:56:16 +02:00
NoriteSC 1736aaeb6a Update Source/Editor/Surface/Archetypes/Material.cs
Co-authored-by: stefnotch <stefnotch@users.noreply.github.com>
2023-10-06 22:54:26 +02:00
NoriteSC d5c0ad0487 Merge branch 'FlaxEngine:master' into Nodes 2023-10-06 22:15:35 +02:00
Nils Hausfeld 78c0e1dd92 - Visual fix to preview connection when pulling out of an input box or a reroute node 2023-10-06 18:16:04 +02:00
Nils Hausfeld c4136dcaa9 Merge branch 'master' into AnimationSampleNode-AnimationAssetReferencePort 2023-10-06 17:50:36 +02:00
Nils Hausfeld 63d57151d0 - Minor cleanup 2023-10-06 17:50:19 +02:00
mafiesto4 a9dd9adc22 Merge branch 'MineBill-control-double-click' 2023-10-06 17:22:10 +02:00
mafiesto4 a8f6a90a2f Merge branch 'control-double-click' of https://github.com/MineBill/FlaxEngine into MineBill-control-double-click 2023-10-06 17:20:46 +02:00
mafiesto4 a40819e37b Merge branch 'Muzz-Vert-color-deduplication-check' 2023-10-06 17:06:29 +02:00
mafiesto4 e41e200305 Merge branch 'Vert-color-deduplication-check' of https://github.com/Muzz/FlaxEngine into Muzz-Vert-color-deduplication-check 2023-10-06 17:06:21 +02:00
mafiesto4 5cf1d2b46e Code format 2023-10-06 17:06:17 +02:00
NoriteSC d07a5e9823 Merge branch 'FlaxEngine:master' into Nodes 2023-10-06 17:03:32 +02:00
mafiesto4 0fd225b185 Merge branch 'Tryibion-pos-camera' 2023-10-06 17:02:58 +02:00
mafiesto4 f1557554ab Merge branch 'pos-camera' of https://github.com/Tryibion/FlaxEngine into Tryibion-pos-camera 2023-10-06 17:02:51 +02:00
mafiesto4 5c57f73328 Merge branch 'ontrigger-improved-scrolling' 2023-10-06 17:01:29 +02:00
mafiesto4 bc291f592e Merge branch 'improved-scrolling' of https://github.com/ontrigger/FlaxEngine into ontrigger-improved-scrolling 2023-10-06 16:58:36 +02:00
mafiesto4 2d2ee03266 Merge branch 'Tryibion-scene-scroll-fix' 2023-10-06 16:08:13 +02:00
mafiesto4 e041a2d006 Merge branch 'scene-scroll-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-scene-scroll-fix 2023-10-06 16:07:45 +02:00
mafiesto4 cd889604e1 Fix build regression 2023-10-06 16:02:31 +02:00
mafiesto4 2cac149741 Code cleanup for #1377 2023-10-06 15:58:23 +02:00
Nils Hausfeld ea355dd560 - Title of Animation sample node gets updated when connection of animation reference box changes 2023-10-06 15:30:52 +02:00
mafiesto4 4853ec9f49 Merge branch 'Withaust-viewlayer' 2023-10-06 15:26:20 +02:00
mafiesto4 58552afc40 Merge branch 'viewlayer' of https://github.com/Withaust/FlaxEngine into Withaust-viewlayer 2023-10-06 15:26:15 +02:00
mafiesto4 ae308ab27a Minor code cleanup #1619 2023-10-06 15:25:25 +02:00
Nils Hausfeld e07ae33040 - Added input box to animation sample node to receive animation assets
- AssetSelect not gets shown or hidden depending on if the box has a connection
- Animation asset reference box now overrides asset picker
2023-10-06 15:23:43 +02:00
mafiesto4 3c35396f47 Merge branch 'Chikinsupu-Visject-AutomaticCasting' 2023-10-06 14:39:03 +02:00
mafiesto4 b1e6e6a8d1 Merge branch 'Visject-AutomaticCasting' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-Visject-AutomaticCasting 2023-10-06 14:38:58 +02:00
mafiesto4 a698095bdd Fix spatial audio playback when clip is set after the audio source was enabled
#1622
2023-10-06 14:34:08 +02:00
mafiesto4 92e28f66af Fix various issues with audio clip data buffers to reduce artifacts (especially when using 24-bit data) 2023-10-06 14:19:22 +02:00
mafiesto4 e29d3d02a2 Refactor audio clip import settings to use auto-generated bindings via AudioTool 2023-10-06 14:08:48 +02:00
mafiesto4 560f699dd8 Fix various issues with OpenAL buffers playback (do proper bit convertion) 2023-10-06 13:59:03 +02:00
mafiesto4 176123eb1f Fix AudioClip loading error when buffer start times diff has rounding error 2023-10-06 11:40:39 +02:00
mafiesto4 9870d162e4 Fix creating prefabs directly from prefab objects
#1432
2023-10-06 10:07:57 +02:00
Christopher Rothert fd94cfb469 Update how camera settings widget is displayed
* add option to force a certain text width to ViewportWidgetButton
* force camera settings widget to fit longest possible speed value
* changed displayed camera speed using string.Format
* changed some lines to always correctly display the camera speed
* switched from Mathf.Clamp to Mathf.Saturate for values between 0 and 1
2023-10-05 20:04:09 +02:00
Tryibion 233eb8a39d Fix prefab window tree 2023-10-05 12:13:41 -05:00
Tryibion 544ff3d5f0 Fix HScroll bar from covering nodes in scene window. 2023-10-05 12:10:49 -05:00
mafiesto4 3a56e39306 Merge branch 'GoaLitiuM-disable_resharper_build' 2023-10-05 19:02:27 +02:00
mafiesto4 5810febc4a Merge branch 'disable_resharper_build' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-disable_resharper_build 2023-10-05 19:02:21 +02:00
mafiesto4 f0293679c4 Merge branch 'GoaLitiuM-rules_assembly_csharp_ver' 2023-10-05 19:00:47 +02:00
mafiesto4 cecc4a4106 Merge branch 'rules_assembly_csharp_ver' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-rules_assembly_csharp_ver 2023-10-05 19:00:37 +02:00
GoaLitiuM 88d9e60bee Generate Rider-specific user solution configuration files
Disables "Use Resharper Build" option by default in generated solutions,
Resharper can't detect file changes in project using custom build
commands.
2023-10-05 19:31:28 +03:00
GoaLitiuM 858baa0ee0 Use latest supported C# version for building rules assemblies 2023-10-05 19:31:07 +03:00
Nils Hausfeld dc6a2d4d25 - Cleanup and comments 2023-10-05 18:11:08 +02:00
Nils Hausfeld d7ade326a9 - Implemented automatic casting to visject 2023-10-05 18:04:55 +02:00
mafiesto4 5dac7c234b Merge branch 'nothingTVatYT-master' 2023-10-05 14:22:00 +02:00
mafiesto4 62894cb6b1 Merge branch 'master' of https://github.com/nothingTVatYT/FlaxEngine into nothingTVatYT-master 2023-10-05 14:21:52 +02:00
Christopher Rothert 3a9fdd8b52 Add possibility to disable camera easing
* add camera easing setting to camera settings widget
* add camera easing default setting to ViewportOptions
* update some settings in ViewportOptions
2023-10-05 13:10:02 +02:00
mafiesto4 546553b82d Add some new splash quotes 2023-10-05 11:44:14 +02:00
mafiesto4 9af6048bec Fix regression from #1312 when passing structure from C++ to C# thunk as already boxed value 2023-10-05 11:36:47 +02:00
mafiesto4 18aafb6fc7 Fix regression from #1312 when passing structure from C++ to C# thunk as already boxed value 2023-10-05 11:35:52 +02:00
mafiesto4 cd2f03d8ef Tweaks 2023-10-05 10:48:52 +02:00
mafiesto4 e6c45fccb3 Merge remote-tracking branch 'origin/master' into 1.7
# Conflicts:
#	Source/Engine/Level/Actors/AnimatedModel.cpp
2023-10-05 10:44:03 +02:00
mafiesto4 86d1d29820 Fix deadlock regression from fd679f0af5 when applying Game Settings itself 2023-10-05 10:13:49 +02:00
nothingTVatYT 9d4089dc0a Merge branch 'master' of github.com:nothingTVatYT/FlaxEngine 2023-10-05 00:08:04 +02:00
nothingTVatYT bc872ebff5 fix menu misalignment problem on Linux 2023-10-05 00:06:51 +02:00
Christopher Rothert 4b78d5e39e Orthographic/perspective mode toggle
Note: missing dedicated icon!
2023-10-04 23:30:51 +02:00
Christopher Rothert 1f2d665654 Add camera speed easing based on Mathf.InterpEaseInOut
* change camera move speed method to use easing curve
* add methods for inversion of Mathf.InterpEaseInOut (might have better alternative)
* add setting for easing curve degree in ViewportOptions

* update camera speed adjustments to use easing curve
* remove unused camera speed values array
* update some comments and namings
2023-10-04 23:30:51 +02:00
Christopher Rothert ccf37e9d68 Add saving and loading of cached values for camera settings
* remove "Default" from all settings in ViewportOptions as they are shown in the "Defaults" group anyway
2023-10-04 23:30:51 +02:00
Christopher Rothert a280ce3dc7 Add reset button to camera settings widget 2023-10-04 23:30:51 +02:00
Christopher Rothert 4f93a0d9c9 Add default camera settings to editor options
* update ViewportOptions to include new default camera settings
* update existing default settings in ViewportOptions
* extract viewport options setup into own method
* initialize new camera settings with default settings in EditorViewport
2023-10-04 23:30:50 +02:00
Christopher Rothert 67536f04e9 Improve camera panning
* add camera panning speed option to camera settings context menu
* add relative panning speed based on distance to camera target to camera settings context menu
* add relative panning option to camera settings context menu

* fix float comparisons
* remove invert panning entry from view widget
* remove unused show/hide method for camera widget
2023-10-04 23:30:50 +02:00
Christopher Rothert 3dcd1a5ffb Improve viewport camera settings
* remove fixed camera speed buttons from camera speed scale widget
* change camera speed scale widget to general camera settings widget
* move all camera-related settings from view mode widget to camera settings widget
* fix some typo

* add possibility to set camera speed manually
* add min/max camera speed options
2023-10-04 23:30:50 +02:00
mafiesto4 1838c7bba7 Minor cleanup 2023-10-04 23:21:40 +02:00
mafiesto4 469c599a5e Merge branch 'Tryibion-editor-font' 2023-10-04 23:15:41 +02:00
mafiesto4 a6e9637442 Merge branch 'editor-font' of https://github.com/Tryibion/FlaxEngine into Tryibion-editor-font 2023-10-04 23:15:29 +02:00
mafiesto4 fd679f0af5 Add automatic game settings apply when saving json file in Editor
#1440
2023-10-04 23:11:38 +02:00
Tryibion b586b5fe41 Ensure editor font is sent as something. 2023-10-04 15:57:28 -05:00
mafiesto4 d1c0900ad7 Fix potential error when loading Guid from Json 2023-10-04 22:38:06 +02:00
mafiesto4 d2eefd4345 Merge branch 'Chikinsupu-Visject-ContextSensitiveNodes' 2023-10-04 22:27:03 +02:00
mafiesto4 92f677f238 Codestyle formatting #1522 2023-10-04 22:25:27 +02:00
mafiesto4 2e6fa8fc25 Merge branch 'Visject-ContextSensitiveNodes' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-Visject-ContextSensitiveNodes 2023-10-04 22:15:31 +02:00
mafiesto4 7777f73c26 Fix warning 2023-10-04 20:20:35 +02:00
mafiesto4 b3cef29abc Merge branch 'Menotdan-material_import' 2023-10-04 20:16:39 +02:00
mafiesto4 f46cc32715 Cleanup code #1115 2023-10-04 20:15:23 +02:00
mafiesto4 c46303018e Merge branch 'material_import' of https://github.com/Menotdan/FlaxEngine into Menotdan-material_import 2023-10-04 19:59:42 +02:00
mafiesto4 6f28496754 Merge branch 'Tryibion-game-window-focus-issue' 2023-10-04 19:58:36 +02:00
mafiesto4 f2a3338dce Improve #859 2023-10-04 19:58:10 +02:00
mafiesto4 8811c9cda0 Merge branch 'game-window-focus-issue' of https://github.com/Tryibion/FlaxEngine into Tryibion-game-window-focus-issue 2023-10-04 19:02:18 +02:00
mafiesto4 1149d7a04f Merge branch 'GoaLitiuM-launchsettings_fix' 2023-10-04 18:57:55 +02:00
mafiesto4 1dcad007c7 Merge branch 'launchsettings_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-launchsettings_fix 2023-10-04 18:57:50 +02:00
mafiesto4 b1cb2cfb37 Merge branch 'GoaLitiuM-particle_update_fix' 2023-10-04 18:56:54 +02:00
mafiesto4 cbbe730d22 Merge branch 'particle_update_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-particle_update_fix 2023-10-04 18:56:49 +02:00
mafiesto4 1db179d0b2 Merge branch 'RuanLucasGD-import_mesh_with_collision_type_as_convex' 2023-10-04 17:39:44 +02:00
mafiesto4 a5374920bd Merge branch 'import_mesh_with_collision_type_as_convex' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-import_mesh_with_collision_type_as_convex 2023-10-04 17:39:39 +02:00
mafiesto4 57dc3e00c7 Merge branch 'Arcnor-pugixml_extra' 2023-10-04 17:37:02 +02:00
mafiesto4 bd14790628 Merge branch 'pugixml_extra' of https://github.com/Arcnor/FlaxEngine into Arcnor-pugixml_extra 2023-10-04 17:36:55 +02:00
mafiesto4 273a939229 Merge branch 'Tryibion-cs-script-namespace' 2023-10-04 17:36:19 +02:00
mafiesto4 099a80127e Merge branch 'cs-script-namespace' of https://github.com/Tryibion/FlaxEngine into Tryibion-cs-script-namespace 2023-10-04 17:36:10 +02:00
mafiesto4 f1d57e47cb Fix regression in some context menus on Windows due to recent changes to windows showing after first paint 2023-10-04 17:34:14 +02:00
mafiesto4 fe9b6d73a8 Fix build regression from b3b6251c10 2023-10-04 16:54:50 +02:00
mafiesto4 bed736a8ee Add support for importing embedded textures via Assimp importer
#669
2023-10-04 15:16:10 +02:00
Edu Garcia f1600b3014 Move custom pugixml changes to pugixml_extra 2023-10-04 13:14:06 +01:00
mafiesto4 d68c65d9d6 Fix build regression from 9fa709aa79 2023-10-04 13:50:15 +02:00
mafiesto4 391b03b5cd Merge branch 'Tryibion-windows-fix' 2023-10-04 13:37:10 +02:00
mafiesto4 a009afc1a3 Merge branch 'windows-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-windows-fix 2023-10-04 13:37:04 +02:00
mafiesto4 98241c0cbe Merge branch 'Tryibion-game-set-open' 2023-10-04 13:35:26 +02:00
mafiesto4 569a8eb538 Merge branch 'game-set-open' of https://github.com/Tryibion/FlaxEngine into Tryibion-game-set-open 2023-10-04 13:35:21 +02:00
mafiesto4 627c0a211d Merge branch 'Tryibion-skinned-box-fix' 2023-10-04 13:34:39 +02:00
mafiesto4 9bfc5f5daa Merge branch 'skinned-box-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-skinned-box-fix 2023-10-04 13:34:25 +02:00
mafiesto4 7c932d3a2f Merge branch 'nothingTVatYT-master' 2023-10-04 13:33:17 +02:00
mafiesto4 d2531273e6 Merge branch 'master' of https://github.com/nothingTVatYT/FlaxEngine into nothingTVatYT-master 2023-10-04 13:33:10 +02:00
mafiesto4 58f926fbb4 Merge branch 'Menotdan-restore_message_clearer' 2023-10-04 13:28:54 +02:00
mafiesto4 25e1c3deaf Merge branch 'restore_message_clearer' of https://github.com/Menotdan/FlaxEngine into Menotdan-restore_message_clearer 2023-10-04 13:28:40 +02:00
NoriteSC 329910ae0d missing input fix 2023-10-04 13:18:42 +02:00
NoriteSC d7b9056d94 added AAStep and resolved stefnotch reviewe 2023-10-04 13:15:17 +02:00
mafiesto4 9fa709aa79 Fix importing skinned models with meshes that don't have valid skinning to properly link into the node's bone
#1525
2023-10-04 12:42:11 +02:00
NoriteSC 367eaf2f89 adjustment to nodes size 2023-10-04 10:28:48 +02:00
mafiesto4 46353365da Fix missing debug shapes drawing when skeleton node gets selected
#1220
2023-10-04 10:24:36 +02:00
mafiesto4 52b9a995ad Fix bone Offset Matrix from fbx when using root RotationMatrix
#1525
2023-10-04 10:01:17 +02:00
NoriteSC 70ca1996c5 added Ratangle Mask and FWidth 2023-10-04 10:00:47 +02:00
mafiesto4 b3b6251c10 Add GlobalInfo parsing to OpenFBX
#1525
2023-10-04 09:47:48 +02:00
Tryibion c6bd989744 Add Game Settings open button to menu. 2023-10-03 22:47:13 -05:00
Tryibion b5d927baa5 Force windows window to be correct size when restoring window on maximize from minimize. 2023-10-03 16:22:43 -05:00
mafiesto4 68a713fb95 Fix model importer to use precomputed Offset Matrix for skeletal model bones
#1525
2023-10-03 22:30:58 +02:00
mafiesto4 4e83a0a757 Fix potential exception in drag and drop handling 2023-10-03 22:20:44 +02:00
Tryibion b948152a41 Simplify 2023-10-03 09:40:46 -05:00
GoaLitiuM 36b1dc1452 Fix particle effects not working properly at high framerate 2023-10-03 17:38:21 +03:00
Tryibion 9fbc51a22a Add back in fixed margin code. 2023-10-03 09:21:27 -05:00
Tryibion d6861696a5 Simplify. 2023-10-03 09:17:52 -05:00
Tryibion 60ac0a8196 Fix box changes from animations. 2023-10-03 08:25:05 -05:00
Tryibion 7bb3ddefeb Fix AnimatedModel box. 2023-10-03 07:51:15 -05:00
mafiesto4 167fead18d Backport https://github.com/nem0/OpenFBX/commit/0f53d0461f72a0b0879cd682097b597b85ae116f 2023-10-03 12:24:06 +02:00
mafiesto4 58c6e0cd15 Backport https://github.com/nem0/OpenFBX/commit/dde6cbeb14cab424b9bbbeb6d75c4b84cc22f633 2023-10-03 12:23:36 +02:00
mafiesto4 ee83c60e1f Backport https://github.com/nem0/OpenFBX/commit/756d9b28aa01915421a107552655efa68b804fcd 2023-10-03 12:23:13 +02:00
mafiesto4 78b08b4552 Backport https://github.com/nem0/OpenFBX/commit/ccceff4f7889611dd1fd9d5fd2d5ccecbc210b9f 2023-10-03 12:22:35 +02:00
mafiesto4 2caa168dd9 Fix using DefaultFrameRate for animation imported with Assimp
#1444
2023-10-03 10:00:57 +02:00
mafiesto4 8007417fe5 Fix applying scale to imported models with Assimp
#1445 #1443
2023-10-03 09:50:50 +02:00
nothingTVatYT 78b074e7da Fix segfault: target can be null when font size is changed 2023-10-03 01:14:35 +02:00
mafiesto4 94611c7f7e Merge branch 'Tryibion-input' 2023-10-02 21:30:41 +02:00
mafiesto4 3a2ff0f4a2 Merge branch 'input' of https://github.com/Tryibion/FlaxEngine into Tryibion-input 2023-10-02 21:30:31 +02:00
mafiesto4 4149da5f9e Fix crash when generating project files with toolchain setup that fails
#1537
2023-10-02 18:57:40 +02:00
Tryibion 4e42f84873 Fix bug in depreciated triggered action placement. 2023-10-02 08:39:13 -05:00
mafiesto4 dd66ee3521 Add using text Show in Finder on macOS in Editor 2023-10-02 13:26:26 +02:00
mafiesto4 5fe135e10b Fix updating Content folder name when renamed in Finder on macOS 2023-10-02 13:11:20 +02:00
mafiesto4 8a9d0271a3 Add ignoring ’.DS_Store’ files in Content on macOS 2023-10-02 13:04:21 +02:00
mafiesto4 b9198fc7a1 Merge remote-tracking branch 'origin/master' 2023-10-02 12:54:41 +02:00
mafiesto4 8bafdb0b78 Remove std::function usage from ArrayExtensions 2023-10-02 12:52:44 +02:00
mafiesto4 41f005f95b Fix typo from 17291a8a13 2023-10-02 12:49:02 +02:00
mafiesto4 17291a8a13 Fix Cannot find compatible metal driver on macOS due to the newest Vulkan SDK regression
#1469
2023-10-02 12:48:14 +02:00
mafiesto4 1156f72fbe Add versions sorting to VulkanSDK selection on macOS 2023-10-02 12:40:37 +02:00
mafiesto4 70f0fbe954 Fix crash on Vulkan when drawing shader without binding proper constant Buffer
#1289
2023-10-02 11:37:24 +02:00
mafiesto4 0ea3cb0d69 Improve workflow with Android project generated after #1570 2023-10-02 11:05:19 +02:00
Menotdan 10ea0b0665 Make it clearer what "Restore Materials on Reimport" means. 2023-10-02 03:32:11 -04:00
Menotdan 139aea5f2d Merge branch 'FlaxEngine:master' into material_import 2023-10-02 01:14:49 -04:00
Tryibion bd32619016 Small fix 2023-10-01 21:11:08 -05:00
mafiesto4 652510ee50 Minor codestyle tweaks for #1420 2023-10-01 21:55:20 +02:00
mafiesto4 9b605f445c Merge branch 'RedTheKitsune-better-missing-script-handling' 2023-10-01 21:12:07 +02:00
mafiesto4 ae654c2f0a Merge branch 'better-missing-script-handling' of https://github.com/RedTheKitsune/FlaxEngine into RedTheKitsune-better-missing-script-handling 2023-10-01 21:07:34 +02:00
mafiesto4 b492c9421b Fix Tag deserialization in cooked game
#1534
2023-10-01 21:02:08 +02:00
MineBill 8a34ae3ece Handle double clicking to eliminate perceived lag. 2023-10-01 18:41:32 +03:00
MineBill 618b1bfd39 Evaluate transition data before executing the transition rule. 2023-10-01 16:13:49 +03:00
mafiesto4 dd21020297 Merge remote-tracking branch 'origin/master' into 1.7 2023-10-01 13:17:41 +02:00
mafiesto4 a001a5fbdc Remove mutex usage since scenes are loaded in sync for now 2023-10-01 13:17:37 +02:00
mafiesto4 6d92d0b58f Merge branch 'RuanLucasGD-Remove-Background_From-CollisionDataWindow' 2023-10-01 12:35:27 +02:00
mafiesto4 2db55a3711 Merge branch 'Remove-Background_From-CollisionDataWindow' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-Remove-Background_From-CollisionDataWindow 2023-10-01 12:35:22 +02:00
mafiesto4 8de9e06b58 Merge branch 'Tryibion-main-win' 2023-10-01 12:33:59 +02:00
mafiesto4 fc499b763d Merge branch 'main-win' of https://github.com/Tryibion/FlaxEngine into Tryibion-main-win 2023-10-01 12:33:54 +02:00
mafiesto4 9acff68209 Merge branch 'Tryibion-rot-around-fix' 2023-10-01 12:32:51 +02:00
mafiesto4 4f5e7988c9 Merge branch 'rot-around-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-rot-around-fix 2023-10-01 12:32:42 +02:00
mafiesto4 20797fce5a Merge branch 'Tryibion-base-win-size' 2023-10-01 12:30:19 +02:00
mafiesto4 883abc2f3b Merge branch 'base-win-size' of https://github.com/Tryibion/FlaxEngine into Tryibion-base-win-size 2023-10-01 12:30:14 +02:00
mafiesto4 1e96bb7647 Merge branch 'GoaLitiuM-vs_android_intellisense_fix' 2023-10-01 12:29:43 +02:00
mafiesto4 ec7dcc4cfb Merge branch 'vs_android_intellisense_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-vs_android_intellisense_fix 2023-10-01 12:29:36 +02:00
mafiesto4 acc7d0893f Merge branch 'GoaLitiuM-vscode_csharp_build_tasks' 2023-10-01 12:28:38 +02:00
mafiesto4 3ae0e4f65e Merge branch 'vscode_csharp_build_tasks' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-vscode_csharp_build_tasks 2023-10-01 12:28:30 +02:00
mafiesto4 92382b42c4 Merge branch 'GoaLitiuM-assembly_load_fix' 2023-10-01 12:28:09 +02:00
mafiesto4 7dc3a3c1a2 Merge branch 'assembly_load_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-assembly_load_fix 2023-10-01 12:27:54 +02:00
mafiesto4 3f8c91c83a Merge branch 'GoaLitiuM-build_engine_bindings' 2023-10-01 12:27:22 +02:00
mafiesto4 5832d995eb Merge branch 'build_engine_bindings' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-build_engine_bindings 2023-10-01 12:27:14 +02:00
mafiesto4 3754b5c958 Merge branch 'GoaLitiuM-sln_generation_fix2' 2023-10-01 12:26:44 +02:00
mafiesto4 6e47db0ebe Merge branch 'sln_generation_fix2' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-sln_generation_fix2 2023-10-01 12:26:39 +02:00
mafiesto4 38cf756f1f Merge branch 'Tryibion-blur-fix' 2023-10-01 12:25:44 +02:00
mafiesto4 8c61b6d41b Merge branch 'blur-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-blur-fix 2023-10-01 12:25:39 +02:00
mafiesto4 18a2824753 Merge branch 'GoaLitiuM-sceneanim_null_check_fix' 2023-10-01 12:12:33 +02:00
mafiesto4 19a0eab966 Merge branch 'sceneanim_null_check_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-sceneanim_null_check_fix 2023-10-01 12:12:21 +02:00
mafiesto4 4e839c2e3d Merge branch 'Arcnor-renameNewActor' 2023-10-01 12:10:33 +02:00
mafiesto4 26040f27cc Merge branch 'renameNewActor' of https://github.com/Arcnor/FlaxEngine into Arcnor-renameNewActor 2023-10-01 12:08:01 +02:00
mafiesto4 450d49b0e7 Merge branch 'Arcnor-labelSetBaselineGap' 2023-10-01 12:07:04 +02:00
mafiesto4 da647d3403 Merge branch 'labelSetBaselineGap' of https://github.com/Arcnor/FlaxEngine into Arcnor-labelSetBaselineGap 2023-10-01 12:06:57 +02:00
mafiesto4 2dd6297d18 Merge branch 'GoaLitiuM-visualscript_valuetype_fix' 2023-10-01 12:06:19 +02:00
mafiesto4 3f3f31f70f Merge branch 'visualscript_valuetype_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-visualscript_valuetype_fix 2023-10-01 12:06:00 +02:00
mafiesto4 e8a093f0b3 Merge branch 'Tryibion-font-size-fixes' 2023-10-01 12:05:24 +02:00
mafiesto4 5e3bb4d51e Merge branch 'font-size-fixes' of https://github.com/Tryibion/FlaxEngine into Tryibion-font-size-fixes 2023-10-01 12:05:20 +02:00
mafiesto4 3078a9d212 Merge branch 'davevanegdom-Statusbar-Imrpovements' 2023-10-01 12:04:01 +02:00
mafiesto4 4d6a27c92a Merge branch 'Statusbar-Imrpovements' of https://github.com/davevanegdom/FlaxEngine into davevanegdom-Statusbar-Imrpovements 2023-10-01 12:01:31 +02:00
mafiesto4 e0f840563d Merge branch 'M-3-H-master' 2023-10-01 12:00:50 +02:00
mafiesto4 a761a7e857 Merge branch 'master' of https://github.com/M-3-H/FlaxEngine into M-3-H-master 2023-10-01 12:00:40 +02:00
mafiesto4 5e283b3d16 Merge branch 'Tryibion-fix-tooltip' 2023-10-01 11:59:36 +02:00
mafiesto4 818b2c3bb5 Merge branch 'fix-tooltip' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-tooltip 2023-10-01 11:59:30 +02:00
mafiesto4 0690d8695d Merge branch 'Chikinsupu-Visject-PrettierConnectionBezier' 2023-10-01 11:59:10 +02:00
mafiesto4 c35a21a1dc Merge branch 'Visject-PrettierConnectionBezier' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-Visject-PrettierConnectionBezier 2023-10-01 11:57:08 +02:00
mafiesto4 0eda67bd73 Fix nested profiler events usage
#https://github.com/FlaxEngine/FlaxEngine/issues/1380
2023-10-01 11:56:54 +02:00
mafiesto4 659a70dc81 Merge branch 'Tryibion-bool-fix' 2023-10-01 11:36:26 +02:00
mafiesto4 3a85b27cbe Merge branch 'bool-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-bool-fix 2023-10-01 11:36:21 +02:00
mafiesto4 8c69363fba Merge branch 'Zode-master' 2023-10-01 11:35:11 +02:00
mafiesto4 f4ee709bc6 Merge branch 'master' of https://github.com/Zode/FlaxEngine into Zode-master 2023-10-01 11:35:06 +02:00
mafiesto4 ecda813b4a Merge branch 'AndrejStojkovic-master' 2023-10-01 11:34:36 +02:00
mafiesto4 bd8240c5a5 Merge branch 'master' of https://github.com/AndrejStojkovic/FlaxEngine into AndrejStojkovic-master 2023-10-01 11:34:30 +02:00
mafiesto4 5bfcbd907a Merge branch 'Tryibion-output-win' 2023-10-01 11:27:19 +02:00
mafiesto4 0d0dc9bc07 Merge branch 'output-win' of https://github.com/Tryibion/FlaxEngine into Tryibion-output-win 2023-10-01 11:27:11 +02:00
mafiesto4 1c21939f40 Minor changes 2023-10-01 11:24:49 +02:00
mafiesto4 d10d52ec0c Add thread-safety to various scripting methods 2023-10-01 10:57:51 +02:00
mafiesto4 075f40b93a Minor fixes 2023-10-01 10:56:30 +02:00
mafiesto4 af3f6d0003 Fix crash in new Delegate when checking if it's binded 2023-10-01 10:56:09 +02:00
mafiesto4 0ae413d4fe Fix crash when using Visual Script runtime in async 2023-10-01 10:55:48 +02:00
mafiesto4 b960600102 Optimize scenes loading with Job System 2023-10-01 10:55:01 +02:00
Tryibion b943c7ca3e Add extra check for stationary rotation. 2023-09-30 22:19:09 -05:00
Tryibion 113307ddf9 Simplify to return main window even in editor. 2023-09-30 21:36:41 -05:00
Tryibion 8edd50c293 Simplify 2023-09-30 21:34:40 -05:00
Tryibion cc681de30e Fix more and add bool check to orient the actor or not. 2023-09-30 21:33:27 -05:00
Tryibion 260c48e41d Change blur panel to draw self. Fix issue with blur strength slider. 2023-09-30 17:44:42 -05:00
Tryibion bae1cfbc8a Change base editor window size to 75% of desktop size when restored for first time. 2023-09-30 17:35:42 -05:00
Tryibion 1366c2850f Fix Actor.RotateAround to rotate the actors orientation. 2023-09-30 17:21:48 -05:00
Nils Hausfeld 07d13f0144 - Implemented very basic support for method override nodes
- Cleanup
2023-09-30 23:06:26 +02:00
Tryibion 85a985cd7f Expose Main Window to c# through Screen class. 2023-09-30 13:52:20 -05:00
Nils Hausfeld aca6d7110d - Cleanup and comments 2023-09-30 20:27:51 +02:00
Nils Hausfeld 2e09c4fb63 - Made visject items a tiny tiny tiny bit taller 2023-09-30 20:22:49 +02:00
Nils Hausfeld 1dc01cd023 - Added compatibility checks to packing structures nodes
- Added compatibility checks to more function nodes
2023-09-30 20:07:33 +02:00
Nils Hausfeld 719efc4a99 - Added Input/Output compatibility check to event based nodes
- Removed a huge chunk of compatibility checking code out of CMItem
2023-09-30 13:45:21 +02:00
Nils Hausfeld 35f641955b - Removed NodeTypeHint
- Added delegates to check compatiblity with custom archetypes
- Added compatibility check to InvokeMethod archetype
2023-09-30 13:20:04 +02:00
GoaLitiuM 6483f95450 Fix Visual Studio project folder GUIDs randomization during regeneration 2023-09-30 03:26:56 +03:00
GoaLitiuM cc318dddd7 Remap non-native Editor VS build configurations to native configurations 2023-09-30 02:37:05 +03:00
GoaLitiuM c9324004eb Build C# bindings after generating engine project files 2023-09-30 01:22:43 +03:00
GoaLitiuM 8b8970e4b9 Generate VSCode attach profile for native debugging 2023-09-29 23:51:27 +03:00
GoaLitiuM bf2c10b036 Generate one VSCode debugger attach launch profile per debugger type 2023-09-29 23:51:24 +03:00
GoaLitiuM 8a19b5ddd6 Skip adding VSCode task and launch profiles for plugins and dependencies 2023-09-29 23:51:22 +03:00
GoaLitiuM 811d639573 Generate Visual Studio Code build tasks for C#-projects 2023-09-29 23:51:17 +03:00
Nils Hausfeld 3befe4bb4a - Fixed a bug where items with a string match didn't get highlighted anymore when the group name matched
- Remouved double filtering when group name matched
- Started fixing asynchronous Un/Packing nodes filtering
2023-09-29 21:53:34 +02:00
GoaLitiuM 18310c9264 Fix loading shared managed assemblies multiple times 2023-09-29 22:12:50 +03:00
Nils Hausfeld b5dc916568 - Moved ScriptType casting check from Box to ScriptType class
- Even more cleanup and comments, wowzers
2023-09-29 17:44:31 +02:00
Nils Hausfeld 091d34b20d - Even more cleanup and comments 2023-09-29 17:26:56 +02:00
Nils Hausfeld 4bf46c3af3 - More cleanup and comments 2023-09-29 17:19:38 +02:00
Nils Hausfeld a4970b7fce - Group names now get filtered again (currently doing a second filtering pass through the items)
- More cleanup
2023-09-29 16:25:34 +02:00
Edu Garcia 8cdd026826 Merge branch 'FlaxEngine:master' into renameNewActor 2023-09-29 15:04:23 +01:00
Nils Hausfeld 2144ad4f7b Merge branch 'master' into Visject-ContextSensitiveNodes 2023-09-29 16:00:15 +02:00
Luke Schneider b7b8213179 Some additional fixes to light theme support
Fixed some issues with light theme support:

1) Icons in content tree nodes (Folder icons) now use the foreground color.  I did not find a case where the content tree is used for other icons.

2) The asset picker now uses the Background Normal color (instead of a very transparent dark gray) for the background, and Orange for the text.  Did not seem like it warranted adding a new color, and Orange works in both dark and light styles.

3) The platform selector icons are now hard-coded instead of based on the style.  This may sound odd, but the icons are colored, so they should always use White as the fully active color.  Previously they worked with a dark theme because the Foreground was set to white.

4) Fixed the CollectionBackgroundColor in the light theme being dark gray instead of light gray like it should be.  This fixes certain lists of things having a dark background in the light theme.
2023-09-29 07:43:59 -05:00
Zode db8f721fa7 Fix build project generation under arch 2023-09-29 11:20:24 +03:00
Tryibion 8f5af2e149 Fix bool editor when null. 2023-09-28 19:49:59 -05:00
Ruan Lucas bb54229760 Simplify code 2023-09-28 20:13:57 -04:00
Tryibion 9975bde78c Change output window search and scroll bars to be like other windows. 2023-09-28 19:09:02 -05:00
Ruan Lucas ba20402900 Change OnDestroy order 2023-09-28 19:05:26 -04:00
mafiesto4 fd3f10864b Fixes for iOS #1312 2023-09-29 00:00:51 +02:00
mafiesto4 f77198c7ca Fixes for iOS #1312 2023-09-29 00:00:21 +02:00
GoaLitiuM 1d42988f39 Fix VisualScript method calls not working with value types 2023-09-29 00:50:19 +03:00
Edu Garcia 6d3fdeec8a Rename new actor after creating it 2023-09-28 22:50:07 +01:00
Edu Garcia 8eed667d5a Makes BaseLinesGapScale configurable for Label 2023-09-28 22:41:24 +01:00
Tryibion 9a5d8e2c51 Fix tooltip crash 2023-09-28 15:31:30 -05:00
Nils Hausfeld 84b240216f - Implemented context sensitive toggle functionality
- Item list now updates on the fly when toggleing context sensitivity
- Added profiling
- Fixed a highlighting bug
- Minor cleanup
2023-09-28 21:31:58 +02:00
Tryibion 137951201d Refactor to use Camera Node. 2023-09-28 14:09:08 -05:00
GoaLitiuM 96d880df6a Fix crash in SceneAnimationPlayer 2023-09-28 22:06:07 +03:00
GoaLitiuM 58445f04c4 Fix potential incorrect null checks in FlaxEngine.Objects
The null-conditional operator checks for reference equality of the
Object, but doesn't check the validity of the unmanaged pointer. This
check is corrected in cases where the object was not immediately
returned from the bindings layer and may have been destroyed earlier.
2023-09-28 22:05:58 +03:00
GoaLitiuM ea201b6173 Fix null check in SceneAnimationWindow
The null-conditional operator checks for reference equality of the
Object, but doesn't check the unmanaged pointer validity.
2023-09-28 22:05:17 +03:00
Nils Hausfeld b96098e555 Merge branch 'master' into Visject-ContextSensitiveNodes 2023-09-28 20:59:59 +02:00
Nils Hausfeld 9acee40746 - Added context sensitive toggle gui 2023-09-28 20:53:47 +02:00
mafiesto4 58b9d76d24 Merge remote-tracking branch 'origin/master' into 1.7
# Conflicts:
#	Source/Editor/Viewport/PrefabWindowViewport.cs
#	Source/Engine/Physics/PhysX/SimulationEventCallbackPhysX.cpp
2023-09-28 20:42:54 +02:00
Nils Hausfeld 98f65ec303 Merge branch 'master' into Visject-ContextSensitiveNodes 2023-09-28 20:34:56 +02:00
mafiesto4 310d61edda Merge branch 'Tryibion-prevent-full-desktop' 2023-09-28 20:34:29 +02:00
mafiesto4 983694eb4f Merge branch 'prevent-full-desktop' of https://github.com/Tryibion/FlaxEngine into Tryibion-prevent-full-desktop 2023-09-28 20:34:12 +02:00
Tryibion 9694522b4e Change to use enum value. 2023-09-28 13:25:56 -05:00
mafiesto4 7e55a61444 Merge branch 'GoaLitiuM-editor_bindings' 2023-09-28 20:18:35 +02:00
mafiesto4 481bbd3a77 Merge branch 'editor_bindings' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-editor_bindings 2023-09-28 20:17:35 +02:00
mafiesto4 139e6d0d1f Improve #1514 to share code for tooltip position wrapping 2023-09-28 20:16:57 +02:00
mafiesto4 28c651252a Merge branch 'Tryibion-tooltip-move' 2023-09-28 20:07:50 +02:00
mafiesto4 b242820132 Merge branch 'tooltip-move' of https://github.com/Tryibion/FlaxEngine into Tryibion-tooltip-move 2023-09-28 19:59:59 +02:00
mafiesto4 88758a4f3a Merge branch 'Tryibion-editor-options-save-popup' 2023-09-28 19:58:29 +02:00
mafiesto4 9ad607c054 Merge branch 'editor-options-save-popup' of https://github.com/Tryibion/FlaxEngine into Tryibion-editor-options-save-popup 2023-09-28 19:58:24 +02:00
mafiesto4 e319b4dedc Minor optimization for PhysX events cleanup 2023-09-28 19:37:08 +02:00
mafiesto4 82b2f46b48 Post-merge tweaks for #1312 2023-09-28 19:21:06 +02:00
mafiesto4 30482f62e2 Merge branch 'GoaLitiuM-marshalling_scriptingobject_changes' 2023-09-28 18:41:30 +02:00
mafiesto4 279528a30d Merge branch 'marshalling_scriptingobject_changes' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-marshalling_scriptingobject_changes
# Conflicts:
#	Source/Engine/Engine/NativeInterop.Unmanaged.cs
#	Source/Engine/Scripting/Runtime/DotNet.cpp
2023-09-28 18:41:20 +02:00
mafiesto4 46e00af723 Merge branch 'NoriteSC-BugFixes' into 1.7 2023-09-28 13:11:15 +02:00
mafiesto4 d71c171412 Cleanup code in #1367 and fix api compatibility, revert joint changes 2023-09-28 13:10:58 +02:00
mafiesto4 3b94792f2e Merge branch 'BugFixes' of https://github.com/NoriteSC/FlaxEngineFork into NoriteSC-BugFixes
# Conflicts:
#	Source/Engine/Networking/NetworkReplicator.cpp
2023-09-28 12:28:19 +02:00
mafiesto4 7cc6163a38 Restore C# method caching in Editor 1d7ba2210a 2023-09-28 12:09:56 +02:00
mafiesto4 15377acc25 Merge remote-tracking branch 'origin/master' into 1.7 2023-09-28 12:01:34 +02:00
mafiesto4 53c53c1166 Merge branch 'GoaLitiuM-sln_generation_fix' 2023-09-28 11:51:26 +02:00
mafiesto4 d89400b84e Merge branch 'sln_generation_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-sln_generation_fix 2023-09-28 11:51:20 +02:00
mafiesto4 c50bbfff76 Merge branch 'GoaLitiuM-clang_detect_fix' 2023-09-28 11:48:44 +02:00
mafiesto4 bd842e60bd Merge branch 'clang_detect_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-clang_detect_fix 2023-09-28 11:48:19 +02:00
mafiesto4 23cfc522e8 Merge branch 'GoaLitiuM-managed_error_dialog' 2023-09-28 11:47:30 +02:00
mafiesto4 0a8fa46f77 Merge branch 'managed_error_dialog' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-managed_error_dialog 2023-09-28 11:47:23 +02:00
mafiesto4 77f962b33d Fix soft refs in bindings to match C# version that is not generic 2023-09-28 11:47:16 +02:00
mafiesto4 98d5769558 Fix performance bug in Development/Release builds due to incorrect draw calls batching (uninitialized memory) 2023-09-28 10:59:09 +02:00
mafiesto4 b7e871ecfd Minor tweaks 2023-09-28 10:58:29 +02:00
MZ 2cc6e80958 Checked my working. 2023-09-28 16:07:38 +10:00
MZ 299f68ebfe Vert color deduplication check 2023-09-28 16:00:31 +10:00
Luke Schneider ad28a3fdbf Better light theme (Style) support, and a Default light theme (as a secondary option)
1) Added ForegroundViewport as a new color.  It is used in the main game viewport (ViewportWidgetButton), and the viewport for rendering of particles and materials.  It is needed because the default foreground in a Light theme is black, but black does not work well in a viewport.  A new color seemed appropriate.

2) Fixed the profiler window to use the Foreground color in multiple text elements, instead of Color.White (or no default TitleColor).  This includes  the Row class, Asset class, SingleChart class, Timeline Class, and more.

3) Added a second theme/Style (DefaultLight) to include with the engine.  It uses RGB float values because those were easier to transfer from the saved values that I had created (and they're easier for me to edit if necessary).  I tried to emulate how the Default theme is created/loaded/etc as closely as possible.
2023-09-27 21:54:34 -05:00
GoaLitiuM bcccb71373 Show full exception message in error message box for managed exceptions 2023-09-28 00:25:26 +03:00
mafiesto4 37d166dce7 Merge branch 'GoaLitiuM-mutex_delegate_fixes' into 1.7 2023-09-27 22:42:36 +02:00
mafiesto4 9a5165ebdd Merge branch 'mutex_delegate_fixes' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-mutex_delegate_fixes 2023-09-27 22:42:23 +02:00
ontrigger 249ded3d1f fix incorrect link 2023-09-27 22:12:21 +03:00
GoaLitiuM 8338d1cc37 Fix Which not returning the found executable on success 2023-09-27 21:47:45 +03:00
GoaLitiuM d7db26cf89 Detect latest versions of clang 2023-09-27 21:47:41 +03:00
Nils Hausfeld 155d11c07b - Filtering now also applies when dragging a connection from an input port 2023-09-27 19:28:06 +02:00
GoaLitiuM 22e5afdb6f Fix Visual Studio project GUIDs getting randomized during regeneration 2023-09-27 20:17:19 +03:00
Nils Hausfeld 98e9c75cb8 Merge branch 'master' into Visject-ContextSensitiveNodes 2023-09-27 18:52:59 +02:00
GoaLitiuM 0c00dc20a2 Always generate additional Visual Studio solution files for all platforms 2023-09-27 19:43:59 +03:00
GoaLitiuM bff18a5564 Add -genproject -rider option for generating Rider compatible solution files 2023-09-27 19:43:56 +03:00
mafiesto4 2f9c601678 Merge remote-tracking branch 'origin/master' into 1.7 2023-09-27 17:32:47 +02:00
Nils Hausfeld 63c213aec0 - Support for Impulse ports 2023-09-27 17:04:35 +02:00
Nils Hausfeld c4da34a463 - Implemented function node and bind/unbind node compatiblility/filtering
- Added NodeTypeHint enum
2023-09-27 16:24:33 +02:00
mafiesto4 44292efa04 Fix editing array of tags in Editor that is null initially
#1451
2023-09-27 13:38:03 +02:00
mafiesto4 86c06297e8 Merge branch 'GoaLitiuM-unsub_event_nothrow' 2023-09-27 13:21:18 +02:00
mafiesto4 934457ac0b Merge branch 'unsub_event_nothrow' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-unsub_event_nothrow 2023-09-27 13:21:12 +02:00
mafiesto4 4dd6653098 Merge branch 'solnem-fix/editor-window-closing-during-camera-flight' 2023-09-27 13:18:17 +02:00
mafiesto4 75711a16bc Merge branch 'fix/editor-window-closing-during-camera-flight' of https://github.com/solnem/FlaxEngine into solnem-fix/editor-window-closing-during-camera-flight 2023-09-27 13:18:10 +02:00
mafiesto4 b00156f519 Add some improvements to particles editing
#1395
2023-09-27 13:04:44 +02:00
mafiesto4 523a14af56 Fix missing Variant marshalling for scripting structures bindings
#1395
2023-09-27 13:04:14 +02:00
Nils Hausfeld be944e35a5 Merge branch 'master' into Visject-ContextSensitiveNodes 2023-09-27 12:48:07 +02:00
mafiesto4 e5e37f3a41 Add android_native_app_glue.h to be included in engine package 2023-09-27 11:31:52 +02:00
mafiesto4 bff9c3419d Merge branch 'GoaLitiuM-fix_uaf' 2023-09-26 21:30:04 +02:00
Tryibion d14dc56b5c Change name to AxisValueChanged. 2023-09-26 10:26:06 -05:00
Tryibion 9b48d1feb8 Update comments 2023-09-26 10:04:08 -05:00
Tryibion 071a73c6d9 Add AxisChanged event to InputAxis. 2023-09-26 10:03:34 -05:00
Tryibion 3a9dd3f8f8 Small wording change 2023-09-26 09:41:41 -05:00
Tryibion ed2dd7211a Add back depriciated Triggered event. 2023-09-26 09:40:30 -05:00
GoaLitiuM e8088f42ac Fix string use-after-free while loading managed assemblies 2023-09-26 17:37:53 +03:00
Tryibion eeab9774a9 Add easily getting action state 2023-09-26 09:31:23 -05:00
Tryibion ea1da0481f Change input event to trigger different input states. 2023-09-26 08:35:10 -05:00
mafiesto4 0ddb0e4350 Merge branch 'Tryibion-ui-adds' 2023-09-26 10:48:32 +02:00
mafiesto4 a919130434 Merge branch 'ui-adds' of https://github.com/Tryibion/FlaxEngine into Tryibion-ui-adds 2023-09-26 10:47:24 +02:00
mafiesto4 c015feac84 Merge branch 'stefnotch-patch-13' 2023-09-26 10:46:11 +02:00
mafiesto4 3b26d1e0ea Merge branch 'patch-13' of https://github.com/stefnotch/FlaxEngine into stefnotch-patch-13 2023-09-26 10:46:05 +02:00
mafiesto4 6621e70ae7 Add objects replication and RPC stats table to Network Profiler 2023-09-26 10:33:12 +02:00
stefnotch 1bc7ad5e9d Update SerializeAttribute.cs 2023-09-26 10:30:57 +02:00
Menotdan f06af4d589 Visual studio auto-formatting fixed by just editing it in notepad :) 2023-09-26 00:09:57 -04:00
Menotdan 0f53c486ed Fixed formatting to match master branch 2023-09-26 00:05:50 -04:00
Menotdan fdf760f483 Merge branch 'master' of https://github.com/Menotdan/FlaxEngine into material_import
Merge Upstream Changes.
2023-09-25 23:51:34 -04:00
ontrigger 2d37e59e73 completely remove SmoothingScale 2023-09-26 00:51:44 +03:00
Nils Hausfeld d8e2b06c38 - Minor cleanup 2023-09-25 23:26:33 +02:00
ontrigger 056d8d5b6c don't animate when scrollbar is held 2023-09-25 23:46:16 +03:00
ontrigger a18d2d0eba remove logging 2023-09-25 23:35:52 +03:00
ontrigger 6a62dac49b remove usages of SmoothingScale across the codebase 2023-09-25 23:29:29 +03:00
ontrigger 9667848c96 make scrolling duration based and deprecate SmoothingScale 2023-09-25 23:28:29 +03:00
Nils Hausfeld 3b393ef4db Groups now get filtered by box type when added after the context menu was opened 2023-09-25 22:07:50 +02:00
Christopher Rothert 5ced9453d4 Fix editor window closing when using RMB + Ctrl + W for slow camera flight 2023-09-25 22:03:40 +02:00
Nils Hausfeld 33c51d0a8e - Filtering is functioning now for all default groups 2023-09-25 19:10:05 +02:00
Tryibion fd3a5c55e1 Simplify code 2023-09-25 11:50:04 -05:00
Tryibion 5eff51d47e Add button to position camera to editor viewport view. 2023-09-25 11:46:37 -05:00
mafiesto4 da47088250 Add conditional profiling in Editor (run only when using Profiler window) 2023-09-25 18:34:07 +02:00
mafiesto4 216a5e9f92 Add support for displaying all active Network Peer stats in Editor Profiler tab 2023-09-25 16:49:18 +02:00
mafiesto4 a672f6aa6b Merge branch 'Tryibion-npute-editor-improve' 2023-09-25 16:34:09 +02:00
mafiesto4 c374127de1 Fix error when loading project on non-ASCII path
#1439
2023-09-25 16:34:01 +02:00
mafiesto4 96b6313acb Fix crash when loading C# assembly from non-ASNSI path
#1439
2023-09-25 16:30:24 +02:00
mafiesto4 cfd53eea60 Merge branch 'npute-editor-improve' of https://github.com/Tryibion/FlaxEngine into Tryibion-npute-editor-improve 2023-09-25 15:47:38 +02:00
mafiesto4 273e70da09 Merge branch 'Tryibion-fix-rightclick-source' 2023-09-25 15:46:49 +02:00
mafiesto4 d7b5a582f2 Merge branch 'fix-rightclick-source' of https://github.com/Tryibion/FlaxEngine into Tryibion-fix-rightclick-source 2023-09-25 15:46:43 +02:00
mafiesto4 212a2e1ded Format code from recent PRs 2023-09-25 15:42:23 +02:00
mafiesto4 ef106c6a29 Merge branch 'Radiangames-MMB_Pan' 2023-09-25 15:41:08 +02:00
mafiesto4 c46ec41f6f Merge branch 'MMB_Pan' of https://github.com/Radiangames/FlaxEngine into Radiangames-MMB_Pan 2023-09-25 15:40:19 +02:00
mafiesto4 90a4fba767 Improve #1490 performance to use Ordinal string comparision and just check for extension on some generated files 2023-09-25 15:39:00 +02:00
mafiesto4 e37d9017c0 Merge branch 'Tryibion-gen-file-filter' 2023-09-25 15:37:23 +02:00
mafiesto4 8ac23e556a Merge branch 'gen-file-filter' of https://github.com/Tryibion/FlaxEngine into Tryibion-gen-file-filter 2023-09-25 15:37:11 +02:00
mafiesto4 0e5755ddaf Merge branch 'Chikinsupu-TextBox-ControlBackspaceSupport' 2023-09-25 15:36:17 +02:00
mafiesto4 1b9d61b408 Merge branch 'TextBox-ControlBackspaceSupport' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-TextBox-ControlBackspaceSupport 2023-09-25 15:34:40 +02:00
mafiesto4 ee5c11cef5 Merge branch 'Chikinsupu-ContainerControl-ShiftTabSupport' 2023-09-25 15:34:11 +02:00
mafiesto4 2fb1778801 Merge branch 'ContainerControl-ShiftTabSupport' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-ContainerControl-ShiftTabSupport 2023-09-25 15:31:23 +02:00
mafiesto4 8d72b1661b Merge branch 'GoaLitiuM-vulkan_shader_comp_fix' 2023-09-25 15:22:55 +02:00
mafiesto4 4fd8697082 Working improvements from docs PR 2023-09-25 11:11:56 +02:00
mafiesto4 b2ec235f01 Minor tweaks 2023-09-25 11:00:49 +02:00
Tryibion 84ecd49439 Fix slider clipping left most pixel of fill bar. 2023-09-24 15:40:56 -05:00
Tryibion 8a2272b825 Add has border and border thickness options. 2023-09-24 15:40:40 -05:00
Tryibion cb89daad36 Clean up comments. 2023-09-24 15:15:53 -05:00
Tryibion 87ef35cd4f Add tooltips to move with the mouse cursor. 2023-09-24 15:14:28 -05:00
Nils Hausfeld 50ebd5cb87 - Fixed massive UI freeze because of perform layout oversight 2023-09-24 20:31:22 +02:00
Nils Hausfeld 8d39d51f90 - Added profiling 2023-09-24 20:22:44 +02:00
Nils Hausfeld 038a3603e4 - Possible nodes get filtered now depending on the available node ports 2023-09-24 19:33:03 +02:00
mafiesto4 626bdf2e37 Add Variant::AsStructure to comparision operator between VariantType and ScriptingTypeHandle 2023-09-24 19:27:23 +02:00
mafiesto4 8a00a3e61e Expose moveTo node functions to override in C# 2023-09-24 19:26:41 +02:00
mafiesto4 65583ac6aa Add NavMeshRuntime to scripting api 2023-09-24 19:26:17 +02:00
Nils Hausfeld 0de31f630f - Moved control point calculation into its own function since multiple parts of the code depend on it
- 'DrawConnection' function now calls the control point calculation function
- 'IntersectsConnection' function now calls the control point calculation function
2023-09-24 18:40:34 +02:00
Ruan Lucas 1e3debf1ec Remake #1413 2023-09-24 11:37:14 -04:00
Ruan Lucas 409b17df2d Remake 2023-09-24 11:28:07 -04:00
GoaLitiuM 9021deb49e Fix Vulkan shader compilation with source files missing the last newline 2023-09-24 15:39:24 +03:00
mafiesto4 15b1e0a984 Minor fixes 2023-09-24 13:20:19 +02:00
mafiesto4 959bd33efc Rename AllocState to NewState 2023-09-24 13:17:59 +02:00
Nils Hausfeld b6ad252305 - Removed unnecessary null-conditional operator
- Removed unnecessary Float2 allocation
2023-09-23 19:14:06 +02:00
GoaLitiuM 10bcb26005 Fix invalid characters in generated C# launch settings paths 2023-09-23 18:29:53 +03:00
mafiesto4 dc324b4ec6 Fix crash when max files open limit is too small on macOS/iOS 2023-09-23 14:47:16 +02:00
mafiesto4 f09aebacad Add editor app packaging for macOS 2023-09-23 14:42:05 +02:00
GoaLitiuM 080091c271 Fix missing bindings for Actor related actions 2023-09-23 15:35:55 +03:00
GoaLitiuM 385c3541c9 Apply global editor bindings in most windows 2023-09-23 15:23:09 +03:00
GoaLitiuM 52cf4df641 Add input bindings for File menu actions 2023-09-23 15:23:09 +03:00
GoaLitiuM a1cbaba743 Add Editor input bindings for Profiler window and Profiler actions 2023-09-23 15:23:09 +03:00
GoaLitiuM 8ed57863b8 Add Editor input bindings for Tools menu items 2023-09-23 15:23:09 +03:00
GoaLitiuM efbc757369 Cancel camera rotation toggle when entering playmode or hitting escape 2023-09-23 15:23:08 +03:00
GoaLitiuM 2023aa8c94 Add viewport camera movement speed adjustment input bindings 2023-09-23 15:23:08 +03:00
GoaLitiuM 0122a9f699 Implement viewport camera rotation toggle for trackpad users 2023-09-23 15:23:08 +03:00
GoaLitiuM 69ce189c5d Add input bindings for Scene viewport related actions and Pilot Actor 2023-09-23 15:23:08 +03:00
GoaLitiuM 964913013d Add shortcut key to gizmo buttons 2023-09-23 15:23:07 +03:00
GoaLitiuM 17e1afb04a Add Editor input option for toggling gizmo transform space 2023-09-23 15:23:07 +03:00
GoaLitiuM 61b4738b6a Fix Editor bindings with no modifiers triggering with modifiers pressed 2023-09-23 15:23:07 +03:00
GoaLitiuM 642766d9cc Add Editor input options for Play Current Scenes and running cooked game 2023-09-23 15:23:07 +03:00
Nils Hausfeld 963300c2cb - Implemented shift tab support for Container Controls 2023-09-23 11:56:45 +02:00
mafiesto4 1c20398d8c Merge remote-tracking branch 'origin/master' into 1.7 2023-09-22 22:43:29 +02:00
mafiesto4 248304a78f Fix regression of importing only a single material for models with split objects enabled
#1483
2023-09-22 19:43:00 +02:00
Meh d11e3b5bd4 Update SplashScreen.cpp 2023-09-22 19:25:16 +02:00
Nils Hausfeld df23174deb - Added proper control backspace support 2023-09-22 19:23:16 +02:00
Meh 25708e2875 add more quotes 2023-09-22 19:01:37 +02:00
mafiesto4 0948f7f18e Merge branch 'Tryibion-copy-paste-fix' 2023-09-22 18:56:44 +02:00
mafiesto4 07db94c4f7 Merge branch 'copy-paste-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-copy-paste-fix 2023-09-22 18:56:39 +02:00
mafiesto4 aa969ec023 Merge branch 'Tryibion-create-folder-fix' 2023-09-22 18:54:53 +02:00
mafiesto4 cb423f78f4 Merge branch 'create-folder-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-create-folder-fix 2023-09-22 18:50:57 +02:00
mafiesto4 86a7484947 Merge branch 'Tryibion-max-min-on-click' 2023-09-22 18:49:19 +02:00
mafiesto4 19651db45e Merge branch 'max-min-on-click' of https://github.com/Tryibion/FlaxEngine into Tryibion-max-min-on-click 2023-09-22 18:49:14 +02:00
mafiesto4 72d61017f1 Merge branch 'Chikinsupu-fix-VisjectContextMenu-SpaceInput' 2023-09-22 18:46:00 +02:00
mafiesto4 2b4911ef06 Merge branch 'fix-VisjectContextMenu-SpaceInput' of https://github.com/Chikinsupu/FlaxEngine into Chikinsupu-fix-VisjectContextMenu-SpaceInput 2023-09-22 18:45:55 +02:00
Meh 45231a8b04 Update SplashScreen.cpp 2023-09-22 18:13:31 +02:00
Meh 7b051ce827 Update SplashScreen.cpp 2023-09-22 18:08:14 +02:00
Meh b82436cf4e Refactor splash screen quotes
removed bad ones and added more nice quotes.
2023-09-22 17:58:13 +02:00
mafiesto4 cf4fc535b3 Merge branch 'GoaLitiuM-debug_log_exception_line_fix' 2023-09-22 17:49:11 +02:00
Meh 15859134a3 Refactor splash screen quotes
Removed bad and weird quotes, added nice ones.
2023-09-22 17:33:17 +02:00
mafiesto4 dbbd6ce045 Add codesigning to macOS editor package binaries 2023-09-22 17:19:14 +02:00
GoaLitiuM 08d04ea6fb Fix exceptions in Debug Log Window not using correct line numbers
Additions to fix in commit 1714bc243a
2023-09-22 16:54:58 +03:00
Tryibion bd864c42fa Add popup to editor options to remind the user to save or not. 2023-09-22 08:40:38 -05:00
Nils Hausfeld d0679c1f9b - Made Visject connection bezier curves bend around nodes 2023-09-22 15:28:46 +02:00
davevanegdom d94dfe9fa9 Merge remote-tracking branch 'upstream/master' into Statusbar-Imrpovements 2023-09-22 13:19:57 +02:00
mafiesto4 faeb21a77a Merge branch 'GoaLitiuM-csproj_file_structure' 2023-09-22 13:02:42 +02:00
mafiesto4 da00d3b971 Merge branch 'csproj_file_structure' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-csproj_file_structure 2023-09-22 13:02:20 +02:00
mafiesto4 bd4efe5f02 Merge branch 'wackoisgod-macos-bugs-two' 2023-09-22 13:01:28 +02:00
mafiesto4 79aba00ab4 Merge branch 'macos-bugs-two' of https://github.com/wackoisgod/FlaxEngine into wackoisgod-macos-bugs-two 2023-09-22 13:01:21 +02:00
mafiesto4 1a0fad5be0 Merge branch 'MineBill-rider-open-file' 2023-09-22 12:58:04 +02:00
mafiesto4 6b8d1f448e Merge branch 'rider-open-file' of https://github.com/MineBill/FlaxEngine into MineBill-rider-open-file 2023-09-22 12:57:54 +02:00
mafiesto4 787479357e Codestyle fix #1495 2023-09-22 12:57:07 +02:00
mafiesto4 5f9a81a664 Merge branch 'GoaLitiuM-window_flicker_fix' 2023-09-22 12:55:18 +02:00
mafiesto4 d6c177ffca Merge branch 'window_flicker_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-window_flicker_fix 2023-09-22 12:55:11 +02:00
mafiesto4 2b01e3781c Merge branch 'GoaLitiuM-unloaded_assembly_fix' 2023-09-22 12:54:30 +02:00
mafiesto4 9731d76a94 Merge branch 'unloaded_assembly_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-unloaded_assembly_fix 2023-09-22 12:54:22 +02:00
mafiesto4 bccb796baf Merge branch 'MineBill-shader-division' 2023-09-22 12:53:22 +02:00
mafiesto4 97be8b572f Merge branch 'shader-division' of https://github.com/MineBill/FlaxEngine into MineBill-shader-division 2023-09-22 12:53:16 +02:00
mafiesto4 053e27ca9c Merge branch 'wackoisgod-macos-csproj-fix' 2023-09-22 12:51:25 +02:00
mafiesto4 0fbb3f4414 Merge branch 'macos-csproj-fix' of https://github.com/wackoisgod/FlaxEngine into wackoisgod-macos-csproj-fix 2023-09-22 12:51:08 +02:00
mafiesto4 62c2008cbc Fix crash in C# JobSystem.Dispatch due to GC collecting Delegate object 2023-09-22 12:50:50 +02:00
mafiesto4 a0de513a43 Optimize updating scripts tick arrays 2023-09-22 12:37:35 +02:00
mafiesto4 31b3f56ddb Fix visibility of some internal NativeInterop methods for game bindings 2023-09-22 12:37:13 +02:00
mafiesto4 abcfc8af35 Add using exact C# method profiler data for profiler events in overriden thunk method callbacks 2023-09-22 12:04:41 +02:00
Andrew Spiering ab7ca683bb Addressing Feedback
* use a better method of getting Editor binary folder
2023-09-22 02:59:38 -07:00
Andrew Spiering 1537f49e73 Fixing Editor Path
* Again the path was hardcoded to win64
2023-09-22 02:41:09 -07:00
Andrew Spiering 017967d5f8 Fixing non-windows platforms csproj files
* Seems there was a hardcoded path ? for the prebuilt binaries for the FlaxEngine dll
2023-09-22 02:13:49 -07:00
MineBill 1714bc243a Fix not capturing the the Debug.Log line in the DebugLogWindow 2023-09-22 11:03:59 +03:00
Tryibion 7012832050 Add filter to content window to hide generated files. Hide by default. 2023-09-21 21:29:21 -05:00
Tryibion 521b180352 Fix issue with copying and poasting in same folder. 2023-09-21 18:56:45 -05:00
davevanegdom 5fc9176ce7 Removed customization for "Normal" and "TextColor" 2023-09-21 23:18:46 +02:00
Red Kitsune 794ccd42ff - Added MissingScriptEditor 2023-09-21 22:00:20 +02:00
GoaLitiuM bbf8883275 Fix docking hint areas not hiding after dragging a window 2023-09-21 20:13:06 +03:00
GoaLitiuM bf68d17afe Create VS folder structure for BuildScripts and FlaxEngine source files 2023-09-21 19:44:21 +03:00
GoaLitiuM 7d69abadb7 Fix script reload crash with .NET libraries 2023-09-21 19:44:01 +03:00
Nils Hausfeld d19984d3e9 - Pressing space to open visject context menu now ignores the space char as input 2023-09-21 18:02:00 +02:00
davevanegdom 80a3bb2ae2 Replaced string color lookups 2023-09-21 17:10:49 +02:00
Luke Schneider 65bf13ea4f Removed debug messages 2023-09-21 08:38:18 -05:00
Luke Schneider ad29dd0c92 MMB Panning
Added MMB panning to VisjectSurfaces (materials/etc).
2023-09-21 08:37:13 -05:00
davevanegdom 21c742bd8a Customizable statusbar 2023-09-21 14:54:57 +02:00
MineBill 8f668c8506 Ensure floating numbers are formatted with enough precision 2023-09-21 12:39:19 +03:00
mafiesto4 97ed46bc4f Merge branch 'GoaLitiuM-default_configurations_fix' 2023-09-21 11:31:43 +02:00
mafiesto4 38671e0e01 Merge branch 'default_configurations_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-default_configurations_fix 2023-09-21 11:28:59 +02:00
mafiesto4 4bc3d922d0 Merge branch 'GoaLitiuM-msbuild_detect_fix' 2023-09-21 11:28:04 +02:00
mafiesto4 b66cbc1d67 Merge branch 'msbuild_detect_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-msbuild_detect_fix 2023-09-21 11:27:59 +02:00
mafiesto4 d94c0d3323 Fix C#-only game projects to reference precompiled DLLs instead of FlaxEngine.csproj 2023-09-21 11:26:04 +02:00
mafiesto4 a420ca72d6 Fix Visual Studio solution project to ensure that main project is the first one 2023-09-21 11:23:57 +02:00
Andrew Spiering d4c71b5fd9 Launching Rider on macOS
* Fixing issues where when the editor would try and launch rider on an M1/2 machine it would not properly open because it was the wrong architecture which is now resolved because open will do the right thing
* Making the ParseArgs function a little more resilient against escaped arguments
2023-09-20 23:16:38 -07:00
Tryibion f315286e26 Change wording to "Set To Null" 2023-09-20 19:08:36 -05:00
Tryibion 12c0ce9ea5 Revert maximize. 2023-09-20 18:09:16 -05:00
Red Kitsune 74acc93c0c Add XML comments 2023-09-21 01:03:35 +02:00
Tryibion ccb3f40de0 Prevent inital window from being covering the task bar on restore of windows window 2023-09-20 17:58:08 -05:00
Tryibion eb5a1f1103 Fix max and min on double click main menu buttons for custom menu bar 2023-09-20 17:49:17 -05:00
GoaLitiuM ed51791b58 Prevent generating VS configurations for Win32 and engine projects 2023-09-21 01:00:04 +03:00
mafiesto4 da7ba0ecba Fix regression on cooking ios game 2023-09-20 22:41:47 +02:00
Tryibion ffbd14ad49 Fix right clicking on source folder to sometimes select non-visible child. 2023-09-20 15:35:36 -05:00
Tryibion cadd0d2356 Fix visuals 2023-09-20 15:18:33 -05:00
mafiesto4 bcce08e81c Codestyle fix and doc 2023-09-20 22:14:54 +02:00
GoaLitiuM 07da23338b Update README 2023-09-20 23:14:13 +03:00
GoaLitiuM d328f0adc4 Update build scripts to detect only supported versions of MSBuild 2023-09-20 23:14:11 +03:00
mafiesto4 386e097fe9 Merge branch 'wackoisgod-macos-flex-build-bugs' 2023-09-20 22:07:33 +02:00
Tryibion 812813251d Fix being able to create folder from project folder. 2023-09-20 14:42:18 -05:00
GoaLitiuM fea296bcbb Fix white window flickering in context menus 2023-09-20 22:00:16 +03:00
Tryibion dfb9f1985f Improve input editors to use combo box. 2023-09-20 13:19:03 -05:00
Andrew Spiering 821c373ae2 Allow for better support for running on m1/2 machines
* So we need to account for 2 possible situations where you are running under and emulated process and a native process with a different target host in this case x64
2023-09-20 09:12:48 -07:00
Menotdan 2b1266147c Add new condition from split object bugfix on master. 2023-09-20 11:02:19 -04:00
mafiesto4 20a4e348ef Bump up build number and version 2023-09-20 16:07:24 +02:00
mafiesto4 9f97787099 Merge remote-tracking branch 'origin/master' into 1.7 2023-09-20 16:02:48 +02:00
mafiesto4 3ede4c2192 Fix typo 2023-09-20 16:02:24 +02:00
mafiesto4 4611de5ed6 Bump up build number 2023-09-20 16:02:15 +02:00
mafiesto4 8cd8ae93c3 Add ObjectRadius to DrawCall to properly cull local lights and env probes in Forward Shading 2023-09-20 15:01:02 +02:00
mafiesto4 8bd6649510 Refactor managed array unboxing to handle case of C# array passes as object
#1415
2023-09-20 14:17:11 +02:00
mafiesto4 5c5c64cf76 Update macOS app cooking to properly execute tools 2023-09-20 11:52:26 +02:00
mafiesto4 34a36d822a Improve parsing command line in build tools when using lots of quotes 2023-09-20 10:06:16 +02:00
mafiesto4 1740cbf2eb Improve process starting on mac 2023-09-20 09:21:56 +02:00
mafiesto4 e3cf9c05e4 Fix logging macOS process to remove redundant newlines 2023-09-20 09:06:54 +02:00
mafiesto4 038c67c819 Merge branch 'wackoisgod-macos-fixes' 2023-09-20 08:48:14 +02:00
Andrew Spiering f40657ea04 macOS support fixes
* Adding macOS FileSystemWatcher, this should allow files to be monitored and update like the other OSs
* Reworked how macOS launches processes to use NSTask which just deals with escaped and unescaped paths better
* Made a change to the ScriptsBuilder::RunBuildTool, this was adding the escaped values to the path, in reality it should be up to the underlying OS to make sure things are properly escaped, so removed those as they just end up causing issues. Also instead of appending the args to the fileName we just properly use the Arguments variable on the CreateProcessSettings
* No longer use open in order to show files in the finder, we use the proper method selectFile
* made a slight cleanup change to the MacPlatform Tick function
* Added ToNSString functions just to make that easier
* Added a ParseArguments function that will take a string and turn it into an array for NSTask
2023-09-19 20:58:12 -07:00
mafiesto4 92733d1a69 Merge branch 'GoaLitiuM-genproject_startup_fix' 2023-09-19 23:48:36 +02:00
mafiesto4 ea37a0924b Merge branch 'genproject_startup_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-genproject_startup_fix 2023-09-19 23:48:30 +02:00
mafiesto4 7e81fdbd75 Fix crash when D3D11 backend fails to create shader due to driver failure 2023-09-19 23:45:30 +02:00
GoaLitiuM 4a1787dfbe Generate project files at startup when project Cache was cleared 2023-09-20 00:15:25 +03:00
mafiesto4 a56ce92867 Fix crash when importing model with materials and Split Objects enabled 2023-09-19 23:07:10 +02:00
mafiesto4 417d911bab Merge branch 'dector-fix/1384/use-xdg-open-on-linux' 2023-09-19 22:01:35 +02:00
mafiesto4 5dd5bc3583 Merge branch 'fix/1384/use-xdg-open-on-linux' of https://github.com/dector/FlaxEngine into dector-fix/1384/use-xdg-open-on-linux 2023-09-19 22:01:28 +02:00
mafiesto4 6514ab3680 Merge branch 'Crawcik-unix-dotnet-location' 2023-09-19 22:00:42 +02:00
mafiesto4 d9333018c2 Merge branch 'unix-dotnet-location' of https://github.com/Crawcik/FlaxEngine into Crawcik-unix-dotnet-location
# Conflicts:
#	Source/Tools/Flax.Build/Build/DotNet/DotNetSdk.cs
2023-09-19 22:00:36 +02:00
mafiesto4 c7bfd70628 Merge branch 'eLeSTRaGo-Dev-fix/launch_editor_second_time_on_linux' into 1.7 2023-09-19 21:53:43 +02:00
mafiesto4 b6971e1788 Merge branch 'fix/launch_editor_second_time_on_linux' of https://github.com/eLeSTRaGo-Dev/FlaxEngine into eLeSTRaGo-Dev-fix/launch_editor_second_time_on_linux 2023-09-19 21:53:31 +02:00
mafiesto4 a71de7357c Merge remote-tracking branch 'origin/master' into 1.7 2023-09-19 21:42:53 +02:00
mafiesto4 f0b5d3b838 Minor improvements 2023-09-19 21:37:24 +02:00
mafiesto4 e9cf188c2d Add outline for relevant BT nodes when debugging tree 2023-09-19 21:24:00 +02:00
mafiesto4 336fe46e03 Add GetDebugInfo to BT nodes for debugging 2023-09-19 20:57:19 +02:00
mafiesto4 f845344d03 Add internal access level to Scripting API members (field, properties and functions) 2023-09-19 20:39:48 +02:00
Andrej Stojkovikj 35ee890f9f Fix in typo, should be length instead of magnitude 2023-09-19 19:33:25 +02:00
Andrej Stojkovikj cb460af264 Revert last feature since feature already exists 2023-09-19 19:29:59 +02:00
Denys 4c5168a976 Use xdg-open to open file manager in Linux
`nautilus` is GNOME file manager. Other distros might use another FM.

As a common ground we can use `xdg-open` which is a part of `freedesktop.org` and should be available almost everywhere.
2023-09-19 16:50:17 +02:00
Andrej Stojkovikj 8930c7ba56 Implemented static functions for length and length squared for Vectors 2023-09-19 16:09:18 +02:00
Andrej Stojkovikj 3f299f4cf6 Just in case change type cast for other variables as well 2023-09-19 15:57:33 +02:00
Andrej Stojkovikj e1f528ec9a Fix SmoothDamp missed type casting for Vector2 2023-09-19 15:48:16 +02:00
Andrej Stojkovikj 4e44002259 Fix SmoothDamp missed type casting for Vector 3 2023-09-19 15:47:38 +02:00
mafiesto4 49a6b5734a Fix crash when setting material instance base material before it's loaded 2023-09-19 14:14:57 +02:00
mafiesto4 255e47fa1e Fix crash due to invalid message in Assimp 2023-09-19 14:00:37 +02:00
mafiesto4 2655dd12d6 Reapply e218cc417f but a little better 2023-09-19 13:40:01 +02:00
mafiesto4 bb5ff740bf Update recastnavigation lib to 1.6 2023-09-19 13:34:32 +02:00
mafiesto4 0083ebd887 Fix missing C# static fields in native scripting api 2023-09-19 09:32:37 +02:00
Red Kitsune 7c0546c68d After CR changes 2023-09-19 00:21:56 +02:00
mafiesto4 10dc06be9b Fix crash if OpenAL internal device name is all whitespaces 2023-09-18 19:23:10 +02:00
mafiesto4 c4b22b2120 Merge branch 'Tryibion-slider-thumb-highlighting' 2023-09-18 17:34:07 +02:00
mafiesto4 3c28fbe44c Merge branch 'slider-thumb-highlighting' of https://github.com/Tryibion/FlaxEngine into Tryibion-slider-thumb-highlighting 2023-09-18 17:29:41 +02:00
mafiesto4 fa73d9d451 Merge branch 'Tryibion-clamp-node-size' 2023-09-18 17:29:10 +02:00
mafiesto4 cdcba9bddb Merge branch 'clamp-node-size' of https://github.com/Tryibion/FlaxEngine into Tryibion-clamp-node-size 2023-09-18 17:29:02 +02:00
mafiesto4 b64db5ec88 Merge branch 'GoaLitiuM-dotnet8_compat_fix' 2023-09-18 17:27:09 +02:00
mafiesto4 b8a626c95d Merge branch 'dotnet8_compat_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-dotnet8_compat_fix 2023-09-18 17:27:02 +02:00
mafiesto4 6ff088d0cb Merge branch 'GoaLitiuM-hostfxr_msg' 2023-09-18 17:25:06 +02:00
mafiesto4 3381751c54 Merge branch 'hostfxr_msg' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-hostfxr_msg 2023-09-18 17:24:57 +02:00
mafiesto4 04713a829f Merge branch 'MineBill-fix_folder_rename' 2023-09-18 16:57:03 +02:00
mafiesto4 40c98ac9e5 Merge branch 'fix_folder_rename' of https://github.com/MineBill/FlaxEngine into MineBill-fix_folder_rename 2023-09-18 16:56:53 +02:00
mafiesto4 bf5b940892 Merge branch 'GoaLitiuM-editor_module_lookup_fix' 2023-09-18 15:16:14 +02:00
mafiesto4 502af0b67a Merge branch 'editor_module_lookup_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-editor_module_lookup_fix 2023-09-18 15:16:07 +02:00
mafiesto4 960b825b4c Code style fix 2023-09-18 12:21:12 +02:00
elestrago 4fe02a24e9 Fix find Rider versions 2022 and later 2023-09-18 12:19:58 +02:00
Walrusking 4b0e70aa06 Fixes Rider 2022 not detected when installed with toolbox 2023-09-18 12:19:50 +02:00
Walrusking 03b8b9f73f Fix rider search detecting any jetbrains product as rider 2023-09-18 12:19:38 +02:00
mafiesto4 8b022af360 Merge branch 'wackoisgod-macos-rider-support' 2023-09-18 12:18:35 +02:00
mafiesto4 1de8581e6d Merge branch 'macos-rider-support' of https://github.com/wackoisgod/FlaxEngine into wackoisgod-macos-rider-support 2023-09-18 12:18:27 +02:00
mafiesto4 1c246db400 Merge branch 'Walrusking16-fix/detect-rider-installed-from-toolbox-windows' into 1.7 2023-09-18 12:16:43 +02:00
mafiesto4 db790a13d4 Merge branch 'fix/detect-rider-installed-from-toolbox-windows' of https://github.com/Walrusking16/FlaxEngine into Walrusking16-fix/detect-rider-installed-from-toolbox-windows 2023-09-18 12:16:37 +02:00
mafiesto4 f69b4ca410 Merge branch 'eLeSTRaGo-Dev-fix/detect-rider-installed-from-toolbox-linux' into 1.7 2023-09-18 12:12:18 +02:00
mafiesto4 79bf226fe1 Codestyle fix 2023-09-18 12:11:28 +02:00
mafiesto4 0ece806230 Merge branch 'wackoisgod-macos-flex-build-fixes' 2023-09-18 11:49:49 +02:00
mafiesto4 c63e2802a1 Merge branch 'macos-flex-build-fixes' of https://github.com/wackoisgod/FlaxEngine into wackoisgod-macos-flex-build-fixes 2023-09-18 11:49:43 +02:00
mafiesto4 a33647ecf1 Merge branch 'wackoisgod-script-generics-crash' 2023-09-18 11:47:40 +02:00
mafiesto4 342877ec42 Merge branch 'script-generics-crash' of https://github.com/wackoisgod/FlaxEngine into wackoisgod-script-generics-crash 2023-09-18 11:47:33 +02:00
mafiesto4 e38a8bda7a Codestyle fix for #1425 2023-09-18 11:26:56 +02:00
mafiesto4 1f386f9ce0 Merge branch 'wackoisgod-macos-ios-build-issue' 2023-09-18 11:25:55 +02:00
Andrew Spiering 97f595922e Fixing broken build
Have to actually set it to true
2023-09-17 23:11:23 -07:00
Andrew Spiering 9f4429f87c When building the engine if you don't have iOS SDK Installed then don't build it
Currently when you try and build macOS editor it assumes you also want to build iOS because of the way this check works which assumes if you have Xcode Installed you are ready to go. This really should not be the case, so instead lets check to see if you have the iophonesdk installed for your current Xcode if not then skip it.
2023-09-17 22:26:50 -07:00
Andrew Spiering 3ac00b1e4e Fixing a crash when generic classes spanned across different assemblies
This code attempts to resolve an issue where if you had a class in Assembly A and it was generic and you had a class that inherited from it in Assembly B it would not properly resolve these classes, also added an error check for if I was not able to find the TypeIndex then log it and return thus also preventing a crash when it goes to resolve the NativeType
2023-09-17 20:37:37 -07:00
Andrew Spiering 824ee9ec7f Fixing a typo :/ 2023-09-17 18:48:54 -07:00
Tryibion 6e94b21452 Fix build issue 2023-09-17 20:02:22 -05:00
Andrew Spiering 69e54d7f88 Fixing an issue if running an x64 machine already 2023-09-17 15:53:48 -07:00
Tryibion 17383fe0b6 Small fix to error message 2023-09-17 17:49:38 -05:00
Tryibion c1104e803d Code cleanup 2023-09-17 17:48:09 -05:00
Andrew Spiering 183ab7738f Fixing Flex Build issues on M1/2 macs
* This resolves some issues where if you are building the actual C# dlls you also need them to be x64 based if you are targeting an x64 based target. This is a little complicated here because we set all this up ahead of time assuming that all the targets are compatible but in this case they are not so, just following what other places in the code are doing around this specifically dotnet AOT.
2023-09-17 15:42:26 -07:00
Tryibion 478c946c1c Add automatic module creation. 2023-09-17 17:42:18 -05:00
Andrew Spiering 76945b9144 MacOS Rider Support
* Adding in code to properly look for rider on macOS
* Also fixing an issue in the macOS CreateProcess where spaces where not properly escaped for popen(which one should likely use NSTask long term)
2023-09-17 14:56:22 -07:00
Andrej Stojkovikj 831500faa7 Fix type definition for Vector2 and Vector3 2023-09-17 23:16:08 +02:00
Red Kitsune 5cc3e40902 Implemented better missing script handling 2023-09-17 20:28:34 +02:00
mafiesto4 ffec2f751d Merge branch 'wackoisgod-macos-arm-dotnet-fix' 2023-09-17 19:24:07 +02:00
mafiesto4 660dc81d8e Merge branch 'macos-arm-dotnet-fix' of https://github.com/wackoisgod/FlaxEngine into wackoisgod-macos-arm-dotnet-fix 2023-09-17 19:23:50 +02:00
mafiesto4 c0d5cf8022 Merge branch 'GoaLitiuM-contentdb_delete_fix' 2023-09-17 19:22:08 +02:00
Andrew Spiering bdd182f3da Fixing x64 editor/runtime on arm64 macs
* This allows for a much more broader check for the dotnet sdk runtime to support running x64 binaries on arm64
2023-09-16 18:23:27 -07:00
Tryibion ab2d60e6d2 Fix viewport options extras locations. 2023-09-16 15:30:49 -05:00
Andrej Stojkovikj d87a60de48 Naming scheme for Vector2 fix 2023-09-16 22:27:12 +02:00
Tryibion e9bafed2c7 Fix about dialog button 2023-09-16 15:22:15 -05:00
Tryibion f4b7ae41a9 Fix profiler rows with larger font sizes. 2023-09-16 14:51:47 -05:00
Tryibion 1d08e4b1b8 Add several fixes to button sizes when fonts are larger. 2023-09-16 14:28:21 -05:00
Andrej Stojkovikj 7a73c04688 SmoothDamp implementation for Vector2 and Vector3 2023-09-16 21:18:00 +02:00
Walrusking 425d625aa7 Fix rider search detecting any jetbrains product as rider 2023-09-16 13:48:49 -04:00
Tryibion dabbd7bc6a Add highlighting when mouse is over slider thumb. 2023-09-16 11:46:36 -05:00
MineBill 9931a5c026 Don't treat '.' in folder names as extensions. 2023-09-16 19:09:38 +03:00
GoaLitiuM 9a7fb82738 Fix tests 2023-09-16 18:39:01 +03:00
Tryibion a89856bece Increase size of clamp node to handle vector4. 2023-09-16 10:15:26 -05:00
GoaLitiuM 5ab299fed9 Fix assets getting deleted when modified by external applications 2023-09-16 18:11:22 +03:00
GoaLitiuM 785943bef8 Add missing marshaller methods for compatibility 2023-09-16 16:00:12 +03:00
GoaLitiuM f114301e97 Improve hostfxr error messages 2023-09-16 15:03:09 +03:00
GoaLitiuM 58b2530ac4 Remove redundant reference counter from Delegate 2023-09-16 14:16:25 +03:00
GoaLitiuM 2d2bfd9cd1 Include EditorModules in Assembly lookup paths 2023-09-16 14:15:09 +03:00
Ruan Lucas 23b6b93726 add collision type to model importer 2023-09-15 19:13:32 -04:00
Menotdan 451900b7ee Merge branch 'FlaxEngine:master' into material_import 2023-09-15 02:17:34 -04:00
Walrusking f319e9f234 Fixes Rider 2022 not detected when installed with toolbox 2023-09-15 01:31:33 -04:00
elestrago 8226764eec Fix find Rider versions 2022 and later 2023-09-15 02:35:20 +02:00
elestrago 2efc31a74e Execute map window before resize in LinuxWindow 2023-09-15 02:13:13 +02:00
Crawcik 1dd7a27568 Checking for executable 2023-09-14 23:19:36 +02:00
Crawcik 64a5d895bd Better version checking 2023-09-14 23:18:12 +02:00
Crawcik 73bf28dc47 Change of priorities on RID 2023-09-14 22:37:56 +02:00
Crawcik 6dd0957c4a Adding better finding dotnet root location for mac&unix 2023-09-14 22:34:03 +02:00
mafiesto4 ae9b807cc1 Allow using CustomValueContainer as readonly if setter action is null 2023-09-14 13:54:31 +02:00
mafiesto4 f7787a9221 Add Behavior knowledge data debugging 2023-09-14 13:53:19 +02:00
mafiesto4 35609c9883 Merge remote-tracking branch 'origin/master' into 1.7 2023-09-14 13:25:59 +02:00
mafiesto4 722133165b Fix marshalling Array<Variant> as object[] (C# codegen error) 2023-09-14 13:18:52 +02:00
GoaLitiuM c686e59fd6 Lazy allocate mutex in Delegate 2023-09-13 17:30:13 +03:00
mafiesto4 b8abcb5755 Merge branch 'GoaLitiuM-delegate_mutex' into 1.7 2023-09-13 11:44:55 +02:00
mafiesto4 936018c49e Add DELEGATE_USE_ATOMIC to toggle #1319 for backward compatibility 2023-09-13 11:44:44 +02:00
Wiktor Kocielski d389348260 Add View Layers button & Reset/Disable/Copy/Paste buttons to View Flags/Debug View & Camera RenderFlags/RenderView addition 2023-09-13 12:17:34 +03:00
mafiesto4 38f7606923 Merge branch 'delegate_mutex' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-delegate_mutex 2023-09-13 10:57:34 +02:00
mafiesto4 682ff2fb3a Minor tweaks 2023-09-13 10:52:46 +02:00
mafiesto4 6bdbaecc18 Merge remote-tracking branch 'origin/master' into 1.7
# Conflicts:
#	Source/Engine/Physics/PhysX/SimulationEventCallbackPhysX.cpp
2023-09-13 10:29:28 +02:00
mafiesto4 cb2ed817a2 Merge branch 'GoaLitiuM-physx_collision_perf' into 1.7 2023-09-13 10:28:14 +02:00
mafiesto4 656d984df7 Merge branch 'physx_collision_perf' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-physx_collision_perf 2023-09-13 10:27:29 +02:00
mafiesto4 963c12a75f Merge branch 'RuanLucasGD-add_spline_edit_options' 2023-09-12 22:25:28 +02:00
mafiesto4 cb44c9370e Refactor new spline editor to use icons via Tabs control #1292 2023-09-12 22:25:18 +02:00
mafiesto4 dbd85fddfe Refactor Editor Tab controls system to allows customizing the tab header controls 2023-09-12 22:24:15 +02:00
mafiesto4 3e1940c799 Add new spline icons #1292 2023-09-12 22:18:26 +02:00
mafiesto4 2a8e35d1ff Format code #1292 2023-09-12 14:38:23 +02:00
mafiesto4 f2e6bfdead Merge branch 'add_spline_edit_options' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-add_spline_edit_options 2023-09-12 14:26:39 +02:00
mafiesto4 aa34f85b39 Merge branch 'Tryibion-input-editors' 2023-09-12 14:21:39 +02:00
mafiesto4 097d26f8cb Codestyle fix #1262 2023-09-12 14:21:27 +02:00
mafiesto4 6ece66b018 Merge branch 'input-editors' of https://github.com/Tryibion/FlaxEngine into Tryibion-input-editors 2023-09-12 14:09:49 +02:00
mafiesto4 9bbdf16623 Fix potential content tree freeze when toggling engine/plugins files showing 2023-09-12 14:03:53 +02:00
mafiesto4 04be05239a Merge branch 'Tryibion-lods' 2023-09-12 13:56:52 +02:00
mafiesto4 3170142171 Merge branch 'lods' of https://github.com/Tryibion/FlaxEngine into Tryibion-lods 2023-09-12 13:56:42 +02:00
mafiesto4 44eba3fdae Fix missing xml comment line from #1291 2023-09-12 13:54:01 +02:00
mafiesto4 a9c8a76f87 Merge branch 'Withaust-layeraddition' 2023-09-12 13:52:30 +02:00
mafiesto4 4cae6e50d5 Merge branch 'layeraddition' of https://github.com/Withaust/FlaxEngine into Withaust-layeraddition 2023-09-12 13:52:23 +02:00
mafiesto4 7b4c8e391a Minor optimization for clearing collider from simulation events cache 2023-09-12 13:50:50 +02:00
mafiesto4 c10658c3fc Fix deserialization, add more docs and tweaks to #1345 2023-09-12 13:50:22 +02:00
mafiesto4 452cdfd163 Merge branch 'Tryibion-physics-settings' 2023-09-12 13:03:12 +02:00
mafiesto4 1591da75ac Merge branch 'physics-settings' of https://github.com/Tryibion/FlaxEngine into Tryibion-physics-settings 2023-09-12 13:03:04 +02:00
mafiesto4 639149b63b Fix crash when toggling WheeledVehicle active state
#1351
2023-09-12 11:41:33 +02:00
mafiesto4 3e35a6a7af Fix cloth sim due to culling bug in cooked game 2023-09-11 22:55:03 +02:00
mafiesto4 fb488cbaf7 Merge remote-tracking branch 'origin/master' into 1.7 2023-09-11 22:43:46 +02:00
mafiesto4 762960bee1 Merge branch 'Tryibion-plugin-project-creation' 2023-09-11 22:42:55 +02:00
mafiesto4 9d494679ac Add formatting MyPlugin.cs for new plugin setup
#1335
2023-09-11 22:42:48 +02:00
mafiesto4 985d6cc811 Add UTF8 format for created plugin files and format code
#1335
2023-09-11 22:32:37 +02:00
mafiesto4 99c2adc1f3 Add game settings formatting for created plugin ProjectInfo
#1335
2023-09-11 22:32:17 +02:00
mafiesto4 776fbe2a7b Fix creating plugin with whitespace or non-ASCII character in the name
#1335
2023-09-11 22:30:51 +02:00
mafiesto4 2fa7740a0f Merge branch 'plugin-project-creation' of https://github.com/Tryibion/FlaxEngine into Tryibion-plugin-project-creation 2023-09-11 21:48:31 +02:00
mafiesto4 0a5f983ff4 Fix error when model is missing in Editor for prefab editor
#1354
2023-09-11 21:36:36 +02:00
mafiesto4 b7cf0d4420 Merge branch 'NoriteSC-ContentBrowserImprovement' 2023-09-11 20:03:51 +02:00
mafiesto4 16fed8927c Refactor #1266 (code quality and simplicity) 2023-09-11 20:02:53 +02:00
mafiesto4 2ddb44afa8 Merge branch 'ContentBrowserImprovement' of https://github.com/NoriteSC/FlaxEngineFork into NoriteSC-ContentBrowserImprovement
# Conflicts:
#	Source/Editor/Windows/ContentWindow.cs
2023-09-11 15:39:48 +02:00
mafiesto4 59c460ccbc Format code 2023-09-11 15:08:13 +02:00
mafiesto4 748ff3b8a5 Optimize CultureInfoEditor and TagEditor performance when searching entries by text 2023-09-11 15:07:37 +02:00
mafiesto4 829d3b3642 Add editor shortcuts usability when toolstrip or main menu controls are focused 2023-09-11 15:07:06 +02:00
mafiesto4 48d4a51c1b Fix crash when boxing native array to managed value 2023-09-11 15:06:26 +02:00
mafiesto4 1134cfa6a6 Fix using ManagedDictionary when item value type is array
#1305
2023-09-11 15:05:46 +02:00
mafiesto4 9afa98e905 Fix Random Range nodes in CPU particles/script graphs when using int
#1341
2023-09-11 13:59:10 +02:00
mafiesto4 fb27606541 Add missing Particle Scale getter node to Particle Emitter graph
#1343
2023-09-11 13:54:44 +02:00
mafiesto4 716e643f2a Fix applying prefab changes to nesting prefab instances
#1256
2023-09-10 21:07:41 +02:00
mafiesto4 ae27d51dc6 Fix building for Android with the latest Java version (update to Gradle 8.3) 2023-09-10 14:53:58 +02:00
mafiesto4 a4312590e7 Fix debug draw leftover from 9da686cd52
#1369 #1365
2023-09-10 13:34:46 +02:00
Wiktor Kocielski 8008f05d64 Merge branch 'master' into layeraddition 2023-09-10 13:39:31 +03:00
mafiesto4 328bfa8322 Merge branch 'Tryibion-sort-projects' 2023-09-10 12:06:30 +02:00
mafiesto4 e1a75b9ae9 Merge branch 'sort-projects' of https://github.com/Tryibion/FlaxEngine into Tryibion-sort-projects 2023-09-10 12:05:14 +02:00
mafiesto4 f08e1019b4 Merge branch 'Tryibion-content-item-improve' 2023-09-10 12:03:47 +02:00
mafiesto4 212b7970fc Merge branch 'content-item-improve' of https://github.com/Tryibion/FlaxEngine into Tryibion-content-item-improve 2023-09-10 12:00:20 +02:00
mafiesto4 9da686cd52 Improve #1369 for #1365 2023-09-10 11:58:54 +02:00
mafiesto4 948ca92b4f Merge branch 'RuanLucasGD-master' 2023-09-10 11:44:40 +02:00
mafiesto4 3962285b87 Merge branch 'master' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-master 2023-09-10 11:44:34 +02:00
mafiesto4 53deeff116 Missing change from 9291295a4d 2023-09-10 11:33:08 +02:00
mafiesto4 9291295a4d Fix Dictionary and HashSet iterators to prevent unwanted data copies
#1361
2023-09-10 11:25:36 +02:00
mafiesto4 0c89aa1958 Merge branch 'Withaust-resizedelegate' 2023-09-10 11:12:25 +02:00
mafiesto4 9d031fadc0 Merge branch 'resizedelegate' of https://github.com/Withaust/FlaxEngine into Withaust-resizedelegate 2023-09-10 11:12:19 +02:00
mafiesto4 d730d712fb Merge branch 'Tryibion-slider' 2023-09-10 11:09:37 +02:00
mafiesto4 317c7021a3 Merge branch 'slider' of https://github.com/Tryibion/FlaxEngine into Tryibion-slider 2023-09-10 11:08:10 +02:00
mafiesto4 d11a90a680 Merge branch 'RuanLucasGD-add_DebugDraw_DrawRay' 2023-09-10 11:03:37 +02:00
mafiesto4 f8d56fceec Merge branch 'add_DebugDraw_DrawRay' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-add_DebugDraw_DrawRay 2023-09-10 11:03:31 +02:00
mafiesto4 bd63fadfbd Merge branch 'scene-select-fix' of https://github.com/Tryibion/FlaxEngine 2023-09-10 10:59:13 +02:00
mafiesto4 b279adbaab Merge branch 'GoaLitiuM-managed_utf8_str_fix' 2023-09-10 10:52:21 +02:00
mafiesto4 002d46cddd Merge branch 'managed_utf8_str_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-managed_utf8_str_fix 2023-09-10 10:52:08 +02:00
mafiesto4 6bbc74caf2 Merge branch 'Tryibion-cache-clothgizmo-values' into 1.7 2023-09-10 10:47:41 +02:00
mafiesto4 36e19b112a Merge branch 'cache-clothgizmo-values' of https://github.com/Tryibion/FlaxEngine into Tryibion-cache-clothgizmo-values 2023-09-10 10:47:34 +02:00
mafiesto4 8a31a63713 Fix build 2023-09-10 10:25:03 +02:00
mafiesto4 f20977732e Merge branch 'Tryibion-remove-tag' 2023-09-10 10:18:52 +02:00
mafiesto4 d653300e18 Merge branch 'remove-tag' of https://github.com/Tryibion/FlaxEngine into Tryibion-remove-tag 2023-09-10 10:18:45 +02:00
Ruan Lucas c6ad4d0e19 small doc fix 2023-09-09 13:07:39 -04:00
Ruan Lucas 420e02e3c1 add empty drawRay 2023-09-09 09:28:06 -04:00
Ruan Lucas 317384ed28 add debugdraw::drawray 2023-09-08 22:19:09 -04:00
Tryibion 99627da9b2 Cache cloth gizmo values. 2023-09-08 21:16:13 -05:00
Ruan Lucas fc7c24f771 Fix for #1365 2023-09-07 11:33:16 -04:00
Wiktor Kocielski 5ceafaad77 WindowBase::Resized delegate 2023-09-06 05:47:51 +03:00
Wiktor Kocielski d9a1eb349d Implement tags recursive addition 2023-09-06 05:43:27 +03:00
Wiktor Kocielski 7c9959bca5 Merge branch 'FlaxEngine:master' into layeraddition 2023-09-06 05:19:55 +03:00
Tryibion d96f19e5c6 Change exposed positionns to float 2 2023-09-05 08:44:59 -05:00
Tryibion 65a02f032f Expose helpful slider data. 2023-09-05 08:25:25 -05:00
Tryibion 20f35e332f Add slider control 2023-09-04 20:15:59 -05:00
Menotdan 1ed84a9b40 Merge branch 'FlaxEngine:master' into material_import 2023-09-04 11:42:05 -04:00
Tryibion 39ecfe8c24 Small bug fix 2023-09-03 12:11:33 -05:00
Mr. Capybara 0a094ca916 Merge branch 'FlaxEngine:master' into add_spline_edit_options 2023-09-03 09:25:14 -04:00
Tryibion 924e1c6d81 Fix right click deselecting scene tree nodes. 2023-09-03 06:36:29 -05:00
GoaLitiuM afec6afe4c Fix managed UTF-8 string allocation not using correct encoding 2023-09-03 14:05:21 +03:00
GoaLitiuM 4ffec5e09a Use HashSet as backing storage for bound Delegate functions 2023-09-02 23:14:38 +03:00
GoaLitiuM 6278fea496 Optimize PhysX collision event handling and onContact callback 2023-09-02 23:04:35 +03:00
Tryibion 92a5432d22 Sort plugin projects in content tree. 2023-09-02 13:13:34 -05:00
mafiesto4 6a5e660c2e Merge remote-tracking branch 'origin/master' into 1.7 2023-09-02 19:02:52 +02:00
Tryibion 67909e33c8 Add difference for folders. 2023-09-01 16:37:14 -05:00
Tryibion 53861c4795 Improve content item in tile view. Decrease margin between list view items. 2023-09-01 14:28:26 -05:00
mafiesto4 36dca16991 Fix WheeledVehicle driving in Drive4W mode when wheels are in custom order
#1352
2023-09-01 13:43:36 +02:00
Tryibion 5b5c298a96 Add remove tag method to actor. 2023-09-01 06:35:52 -05:00
mafiesto4 5a8944a82d Add support for editing WheeledVehicle engine/differential config at runtime without full physics state rebuild
#1348
2023-09-01 12:52:01 +02:00
mafiesto4 b0ec8525aa Add support for editing WheeledVehicle wheels config at runtime without full physics state rebuild
#1324
2023-09-01 12:40:51 +02:00
mafiesto4 a8cc4d7fcb Fix wheel vehicle drive when EnableSimulation is disabled
#1323
2023-09-01 12:14:26 +02:00
mafiesto4 23db68b416 Merge branch 'Tryibion-progress-bar-improv' 2023-09-01 11:59:12 +02:00
mafiesto4 622293a55b Merge branch 'progress-bar-improv' of https://github.com/Tryibion/FlaxEngine into Tryibion-progress-bar-improv 2023-09-01 11:59:05 +02:00
mafiesto4 60178da101 Merge branch 'Tryibion-add-reset-ibrush' 2023-09-01 11:58:42 +02:00
mafiesto4 50fe02d7ad Merge branch 'add-reset-ibrush' of https://github.com/Tryibion/FlaxEngine into Tryibion-add-reset-ibrush 2023-09-01 11:58:19 +02:00
mafiesto4 462da342a7 Fix ContextMenuSingleSelectGroup selection of the first item that had default value 2023-09-01 11:43:02 +02:00
mafiesto4 21b90fb829 Fix crash when spawning large amount of network objects at once by sending spawn message in parts
#1344
2023-09-01 11:42:31 +02:00
Tryibion a98458be1f Small improvements. 2023-08-31 14:14:01 -05:00
Tryibion e4dfda7202 Add method enum. 2023-08-31 14:07:17 -05:00
mafiesto4 8ff96723db Add async update to Behavior via Task Graph System 2023-08-31 14:54:26 +02:00
mafiesto4 f43f17a783 Add Move To node to BT 2023-08-31 14:02:03 +02:00
mafiesto4 5d2fae5896 Add GetColliders utility to RigidBody 2023-08-31 14:01:30 +02:00
mafiesto4 67d5d3a3fb Fix missing Variant typename for Object or Asset value to properly pass type checks 2023-08-31 09:37:54 +02:00
mafiesto4 5500e99ed8 Add NavMeshPathFlags to navmesh for partial paths info 2023-08-31 09:37:27 +02:00
mafiesto4 540681e59d Add MoveTowards to vector3 2023-08-31 09:23:16 +02:00
Tryibion 53fd158f2d Add a way to reset an IBrush to null for default functionality. 2023-08-30 18:09:59 -05:00
Tryibion d7112dc534 Improve progress bar to add switch between clipping and stretch and add direction. 2023-08-30 17:59:39 -05:00
mafiesto4 b6c8a08b58 Add Has Goal decorator to BT 2023-08-29 17:31:35 +02:00
mafiesto4 57ee884397 Add hot-reload support for BT to properly reload node instances data 2023-08-29 16:33:41 +02:00
mafiesto4 c32a139dbd Fix crash when unboxing managed structure with refs into Variant 2023-08-29 11:57:18 +02:00
mafiesto4 16930466d5 Hide some compiler-generated types from TypeSearchPopup 2023-08-29 11:43:11 +02:00
mafiesto4 c7d277ca74 Fix crash when unboxing managed structure with refs into Variant 2023-08-29 11:42:47 +02:00
mafiesto4 597f186902 Fix Editor UI when one of the properties panel throws exceptions 2023-08-29 11:42:12 +02:00
mafiesto4 17cbd66aed Fix Label to draw text under children 2023-08-29 11:41:29 +02:00
mafiesto4 0defecaeb9 Add concept of Goals to Behavior Knowledge 2023-08-29 11:41:07 +02:00
mafiesto4 81a2898d4e Add double-reference support for scripting function parameters to move value 2023-08-28 14:19:02 +02:00
mafiesto4 8906453b15 Merge remote-tracking branch 'origin/master' into 1.7 2023-08-28 09:11:29 +02:00
mafiesto4 bd750d2634 Fix incoming drag drop location on macOS 2023-08-27 22:41:57 +02:00
mafiesto4 fa77a52a2c Fix prefab apply bug when one of the prefabs in project is broken 2023-08-27 20:08:27 +02:00
mafiesto4 1292fa3f45 Merge branch 'Withaust-replicationdisabling' 2023-08-27 16:43:31 +02:00
mafiesto4 0909c5bcc0 Merge branch 'replicationdisabling' of https://github.com/Withaust/FlaxEngine into Withaust-replicationdisabling 2023-08-27 16:43:24 +02:00
mafiesto4 8681f37218 Merge branch 'GoaLitiuM-xaudio2_crash' 2023-08-27 16:38:37 +02:00
mafiesto4 dc871a637b Merge branch 'xaudio2_crash' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-xaudio2_crash 2023-08-27 16:38:21 +02:00
mafiesto4 68db761c8b Merge branch 'Tryibion-animevent-abswrapper-remove' 2023-08-27 16:36:45 +02:00
mafiesto4 3b163b6c4b Minor cleanup 2023-08-27 16:36:37 +02:00
mafiesto4 94bd4d39f7 Merge branch 'animevent-abswrapper-remove' of https://github.com/Tryibion/FlaxEngine into Tryibion-animevent-abswrapper-remove 2023-08-27 16:31:48 +02:00
mafiesto4 9b184fd618 Merge branch 'Tryibion-add-tab-breaks' 2023-08-27 16:30:46 +02:00
mafiesto4 6261f02d1c Merge branch 'add-tab-breaks' of https://github.com/Tryibion/FlaxEngine into Tryibion-add-tab-breaks 2023-08-27 16:29:31 +02:00
mafiesto4 698e933e18 Merge branch 'Tryibion-timeline-ui' 2023-08-27 16:28:44 +02:00
mafiesto4 97b56d1e72 Minor tweak #1332 2023-08-27 16:28:35 +02:00
mafiesto4 6274c2a8e6 Merge branch 'timeline-ui' of https://github.com/Tryibion/FlaxEngine into Tryibion-timeline-ui 2023-08-27 16:25:29 +02:00
mafiesto4 87e19ef4bc Fix crash on terrain export in Editor
#1330
2023-08-27 16:19:25 +02:00
mafiesto4 9069d0a853 Merge branch 'Tryibion-filter-cm' 2023-08-27 15:37:27 +02:00
mafiesto4 48c74e5ea5 Merge branch 'filter-cm' of https://github.com/Tryibion/FlaxEngine into Tryibion-filter-cm 2023-08-27 15:37:22 +02:00
mafiesto4 542a89bffc Merge branch 'Tryibion-show-jsonasset-type' 2023-08-27 15:36:49 +02:00
Tryibion 44598d4741 Small change in showing target error 2023-08-26 17:07:04 -05:00
Tryibion 87aba23299 Add tab breaks for window tabs. 2023-08-26 16:49:37 -05:00
Tryibion c5ff2c8c2f Add tooltip text. 2023-08-26 16:17:21 -05:00
Tryibion 514bc00310 Show Json Asset Type on ToolStrip of Json Asset Window. 2023-08-26 16:10:59 -05:00
Tryibion d969a7f8b0 Add more physics settings. 2023-08-26 15:17:45 -05:00
mafiesto4 50669a341d Improve connections drawing for BehaviorTree and AnimGraph 2023-08-26 09:38:33 +02:00
Tryibion 8ad4c94545 Add not closing contnent filter cm on click 2023-08-25 15:25:51 -05:00
GoaLitiuM 3939106e78 Fix crash with XAudio2 backend when source is playing
The array containing the sources might grow and invalidate existing
pointers to sources while some of the previous sources are still playing.
2023-08-25 22:09:00 +03:00
NoriteSC 1cb3c798e5 Revent 2023-08-25 19:12:35 +02:00
Tryibion ff2f239858 Add system reference. 2023-08-25 08:17:09 -05:00
mafiesto4 1287731816 Add reordering and reparenting decorators (with undo) 2023-08-25 14:54:40 +02:00
NoriteSC 6ab2e540a3 Bug Fixes
script and actors not having connect transform in on awake and in on start

join auto anchor having wrong anchor because was including scale

fixed selection do to changes to transform accessibility ?
2023-08-25 14:51:49 +02:00
mafiesto4 99547a1ff4 Add Has Tag decorator 2023-08-25 10:42:53 +02:00
mafiesto4 b31f262214 Add Knowledge Conditional and Knowledge Values Conditional decorators to BT 2023-08-25 10:25:24 +02:00
mafiesto4 cc7e93e2ee Don't recheck decorators conditions if the node is already relevant 2023-08-25 10:22:33 +02:00
mafiesto4 992cc381d5 Simplify Variant code with define for ManagedObject handle 2023-08-25 10:22:09 +02:00
Wiktor Kocielski 87e36bcfd5 Stop replication if NetworkManager::NetworkFPS < 0 2023-08-25 02:44:23 +03:00
Wiktor Kocielski 7b44075ac8 Add recursive methods for layers 2023-08-25 00:01:31 +03:00
Tryibion 0bbd619e32 Code cleanup 2023-08-24 13:54:55 -05:00
Tryibion 51664fc236 Use pltform process. 2023-08-24 13:51:08 -05:00
Tryibion fb69bc64f8 Add automated plugin project creation and Git cloning. 2023-08-24 11:38:14 -05:00
mafiesto4 2026c84baa Hide node close button when read-only (eg. play mode) 2023-08-24 16:56:28 +02:00
mafiesto4 a27cb4e215 Refactor BT nodes methods to always use context structure as input 2023-08-24 16:51:25 +02:00
mafiesto4 8c1dfb3087 Add Time Limit and Cooldown decorators to BT 2023-08-24 16:41:01 +02:00
mafiesto4 d2034622cb Add Invert, ForceSuccess, ForceFailed and Loop decorators to BT 2023-08-24 13:06:55 +02:00
mafiesto4 69ab69c5cc Add Decorators support to BT graph 2023-08-24 13:05:54 +02:00
mafiesto4 0c206564be Fix generic typename to be properly converted to C# 2023-08-24 13:02:29 +02:00
mafiesto4 5f581bf156 Add OnPasted to Visject Surface nodes for custom post-paste logic 2023-08-24 10:43:59 +02:00
mafiesto4 952fe61515 Add SurfaceNodeActions for more contextual surface nodes scripting 2023-08-24 10:43:22 +02:00
mafiesto4 60e5c5446c Add SealedNodes feature to Visject Surface nodes 2023-08-24 10:41:02 +02:00
mafiesto4 c58dc51291 Various improvements to Visject Surface 2023-08-24 10:12:40 +02:00
Tryibion 7e429854d6 Simplify check to use attribute. 2023-08-23 09:03:56 -05:00
Tryibion e1645210b3 Add check and indication if no anim events are found. 2023-08-23 08:46:21 -05:00
Tryibion e16e2e2877 Prevent AbstractWrapper from showing in Add AnimEvent CM. 2023-08-23 08:35:35 -05:00
mafiesto4 73c0758410 Add releasing nested nodes state when BT tree goes irrelevant 2023-08-23 13:43:46 +02:00
Tryibion 3295d58684 Simplify 2023-08-22 21:34:36 -05:00
Tryibion 72488c4250 Update cs script temple to use non-indented namespace. 2023-08-22 21:14:33 -05:00
Tryibion a737e7bb05 Small fix to UI 2023-08-22 17:36:09 -05:00
Tryibion ce4cf9b34b Add timeline position numbers and add to GUI. 2023-08-22 15:42:16 -05:00
mafiesto4 3259af3368 Add Force Finish node to BT 2023-08-22 11:12:05 +02:00
mafiesto4 d86eb5a4c2 Add drag&drop for nested BT spawning in Editor 2023-08-22 10:45:50 +02:00
mafiesto4 50c85aec6d Minor improvements to #1315 and add getter of current window style 2023-08-21 23:33:33 +02:00
mafiesto4 d432654a57 Merge branch 'Tryibion-set-window-mode' 2023-08-21 22:42:20 +02:00
mafiesto4 b4adb7f3e1 Merge branch 'set-window-mode' of https://github.com/Tryibion/FlaxEngine into Tryibion-set-window-mode 2023-08-21 22:42:13 +02:00
mafiesto4 3edae2f686 Merge branch 'Withaust-terraincache' 2023-08-21 22:31:18 +02:00
mafiesto4 845697cc4a Merge branch 'terraincache' of https://github.com/Withaust/FlaxEngine into Withaust-terraincache 2023-08-21 22:31:01 +02:00
mafiesto4 6bf2f219db Merge branch 'Tryibion-rename-popup-check' 2023-08-21 22:02:45 +02:00
mafiesto4 c137b5743a Merge branch 'rename-popup-check' of https://github.com/Tryibion/FlaxEngine into Tryibion-rename-popup-check 2023-08-21 22:02:38 +02:00
mafiesto4 dc3ae040a3 Merge branch 'Tryibion-dont-close-cm' 2023-08-21 21:58:15 +02:00
mafiesto4 131b2ae688 Merge branch 'dont-close-cm' of https://github.com/Tryibion/FlaxEngine into Tryibion-dont-close-cm 2023-08-21 21:56:40 +02:00
mafiesto4 3e92409d66 Merge branch 'Tryibion-button-border' 2023-08-21 21:55:03 +02:00
mafiesto4 8c230e7cb0 Merge branch 'button-border' of https://github.com/Tryibion/FlaxEngine into Tryibion-button-border 2023-08-21 21:54:56 +02:00
mafiesto4 863b6338ce Fix missing asset refs from BT nodes data 2023-08-21 18:28:05 +02:00
mafiesto4 cc5cde5bc7 Add Nested node to BT 2023-08-21 17:38:48 +02:00
mafiesto4 a6e503d21b Add Selector node to BT 2023-08-21 00:07:25 +02:00
mafiesto4 fce82247ab Add Delay node to BT 2023-08-20 21:42:43 +02:00
mafiesto4 2e9facc429 Add Random::RandRange 2023-08-20 21:41:20 +02:00
mafiesto4 a44c1521af Fix property value sliders usage in BT editor 2023-08-20 21:40:03 +02:00
GoaLitiuM 9ec7b09771 Merge fixes 2023-08-20 20:31:45 +03:00
GoaLitiuM 42ab218a8e Merge branch 'master' into marshalling_scriptingobject_changes
# Conflicts:
#	Source/Engine/Engine/NativeInterop.Invoker.cs
#	Source/Engine/Engine/NativeInterop.Unmanaged.cs
2023-08-20 20:24:41 +03:00
Tryibion 1286a29462 Add not closing some cm buttons 2023-08-19 14:30:08 -05:00
mafiesto4 eee53dfbdc Add BehaviorKnowledgeSelector for Behavior Knowledge unified data access 2023-08-19 19:50:17 +02:00
Tryibion 134273abd9 Remove popup from appearing if the content item can not re renamed. 2023-08-19 12:47:29 -05:00
mafiesto4 dee2f11ae4 Merge remote-tracking branch 'origin/master' into 1.7 2023-08-19 19:46:19 +02:00
mafiesto4 9afb8778e8 Merge branch 'GoaLitiuM-variant_fix' 2023-08-19 19:45:18 +02:00
mafiesto4 3498806588 Add support for accessing scripting properties via ManagedBinaryModule fields API 2023-08-19 17:45:42 +02:00
Tryibion 5354063129 Add simple way to remove button border. 2023-08-19 10:43:04 -05:00
mafiesto4 de6254b5a5 Various fixes for scripting bindings codegen 2023-08-19 17:00:05 +02:00
mafiesto4 e36bf6e19a Add MarshalAs tag to APi structs/classes for custom marshaling via implicit casting 2023-08-19 16:59:39 +02:00
GoaLitiuM 769a20002d Fix Variant move assignment operator with managed objects 2023-08-19 13:12:50 +03:00
mafiesto4 32c47949fa Fix error when scripting structure uses StringAnsi field 2023-08-18 13:32:06 +02:00
mafiesto4 f088f2b61d Merge remote-tracking branch 'origin/master' into 1.7 2023-08-18 10:33:51 +02:00
mafiesto4 122524bd19 Fix linux build 2023-08-18 09:12:10 +02:00
mafiesto4 430d55aada Merge branch 'GoaLitiuM-manageddict_cache' 2023-08-18 00:25:12 +02:00
mafiesto4 de270d7478 Merge branch 'manageddict_cache' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-manageddict_cache 2023-08-18 00:25:07 +02:00
mafiesto4 fe9cc8576a Merge branch 'GoaLitiuM-actor_paste' 2023-08-18 00:18:55 +02:00
mafiesto4 52691d3230 Merge branch 'actor_paste' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-actor_paste 2023-08-18 00:18:50 +02:00
mafiesto4 595bb2b7fa Fix nested animation playrate when the framerate is different
#1258
2023-08-18 00:17:27 +02:00
mafiesto4 925b5abb78 Fix crash on Linux when using unmapped keyboard Keyboard
#1321
2023-08-17 21:47:02 +02:00
mafiesto4 b78db755ec Fix crash regression d9ee8f4665
#1318
2023-08-17 21:40:36 +02:00
mafiesto4 1e3e75cb99 Add relevancy to Behavior Tree nodes 2023-08-17 21:24:19 +02:00
mafiesto4 14ffd0aa08 Add Variant new value init for objects 2023-08-17 16:10:07 +02:00
mafiesto4 fad825690e Add BehaviorTree nodes sorting by X position on a surface 2023-08-17 15:44:30 +02:00
mafiesto4 70228ca355 Various improvements to Variant 2023-08-17 15:29:11 +02:00
mafiesto4 c15a48b0b4 Allow Scripting Object as BT blackboard but don't support plain classes 2023-08-17 15:29:00 +02:00
mafiesto4 5f79fdd5f9 Fix bt node sizing on spawm 2023-08-17 15:27:02 +02:00
mafiesto4 77f7d55f5a Fix log spam from TypeEditor if type is missing 2023-08-17 15:26:50 +02:00
mafiesto4 c18625e017 Add initial Behavior simulation 2023-08-17 15:26:31 +02:00
mafiesto4 d1e2d6699e Add bt nodes init 2023-08-16 22:28:48 +02:00
mafiesto4 6e85bb8f75 Add ScriptingType to msvc natvis 2023-08-16 22:27:52 +02:00
mafiesto4 66678fc219 Fix log spam from TypeEditor if type is missing 2023-08-16 22:27:17 +02:00
mafiesto4 dd8e05ed49 Add C#-only types for Variant value storage from 0cb049167b 2023-08-16 22:27:03 +02:00
GoaLitiuM 3e33c63957 Optimize actor pasting performance with huge amount of actors
- Name lookups are cached to avoid checking the name from same Actor multiple times
- Avoid getting actor children multiple times for same parent
2023-08-16 20:24:19 +03:00
mafiesto4 0cb049167b Add NewValue/DeleteValue to Variant for owned value storage 2023-08-16 18:29:59 +02:00
GoaLitiuM 017b45d674 Use mutex over atomic operations in Delegate 2023-08-16 17:39:08 +03:00
mafiesto4 18b47257fd Add **Behavior Tree** asset type and editing 2023-08-16 13:26:33 +02:00
mafiesto4 f8dc59d670 Change Debug to be static 2023-08-16 13:10:58 +02:00
mafiesto4 81622c92ae Add ReadOnly to CustomEditorPresenter 2023-08-16 13:09:50 +02:00
Tryibion 8e1cac7d2f Add to be able to choose sloppy mesh simplification or not in model import settings for LODs. 2023-08-15 21:34:07 -05:00
Wiktor Kocielski a3063258e5 Add ability to clean patch caches 2023-08-15 12:35:32 +03:00
Tryibion 6e5f693459 Small change to allow other platforms to use fullscreen and windowed in WindowMode function 2023-08-14 18:25:19 -05:00
Tryibion cfd11a7e77 Add borderless window on Windows platform and add easy function in Screen class to change window mode. 2023-08-14 18:11:05 -05:00
mafiesto4 73076dc5cb Merge branch 'RuanLucasGD-locked_focus' 2023-08-14 18:53:20 +02:00
mafiesto4 95fdcf01be Codestyle fix 2023-08-14 18:53:11 +02:00
mafiesto4 b3fc7b3b68 Merge branch 'locked_focus' of https://github.com/RuanLucasGD/FlaxEngine into RuanLucasGD-locked_focus 2023-08-14 18:46:48 +02:00
mafiesto4 9f7fd42677 Codestyle fix 2023-08-14 18:44:21 +02:00
mafiesto4 7664744683 Merge branch 'envision3d-feature/1151-play-mode-refactor-cleanup' 2023-08-14 18:42:11 +02:00
mafiesto4 7da93ad68d Merge branch 'feature/1151-play-mode-refactor-cleanup' of https://github.com/envision3d/FlaxEngine into envision3d-feature/1151-play-mode-refactor-cleanup 2023-08-14 18:42:05 +02:00
mafiesto4 1948a84301 Add crash to soft-return if managed event bind target object native instance is gone
#1278
2023-08-14 18:40:03 +02:00
mafiesto4 b3a359b158 Merge branch 'Withaust-navigationfix' 2023-08-14 18:31:13 +02:00
mafiesto4 f1d46979b3 Merge branch 'navigationfix' of https://github.com/Withaust/FlaxEngine into Withaust-navigationfix 2023-08-14 18:31:08 +02:00
mafiesto4 b8db87a678 Merge branch 'Withaust-foreignobject' 2023-08-14 18:29:19 +02:00
mafiesto4 06d8ff02b3 Merge branch 'foreignobject' of https://github.com/Withaust/FlaxEngine into Withaust-foreignobject 2023-08-14 18:29:10 +02:00
mafiesto4 0e2d1b6ad2 Merge remote-tracking branch 'origin/master' into 1.7 2023-08-14 18:14:59 +02:00
mafiesto4 0b1c23dde3 Merge branch 'GoaLitiuM-postfxmaterial_marshalling_fix' 2023-08-14 18:10:22 +02:00
mafiesto4 87bc486c8b Merge branch 'postfxmaterial_marshalling_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-postfxmaterial_marshalling_fix 2023-08-14 18:10:17 +02:00
GoaLitiuM 5e3018817c Fix marshalling issue with PostFxMaterialSettings Materials 2023-08-14 18:25:48 +03:00
mafiesto4 3014a2a7d8 Merge branch 'Tryibion-paste-fix' 2023-08-14 16:20:14 +02:00
mafiesto4 55ca419aba Merge branch 'paste-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-paste-fix 2023-08-14 16:18:44 +02:00
mafiesto4 66042845e4 Codestyle fixe 2023-08-14 16:13:55 +02:00
mafiesto4 00ecdcd2ec Merge branch 'Withaust-replicationfix' 2023-08-14 16:03:33 +02:00
mafiesto4 4e81f80495 Merge branch 'replicationfix' of https://github.com/Withaust/FlaxEngine into Withaust-replicationfix 2023-08-14 16:03:27 +02:00
mafiesto4 a2fda47688 Merge branch 'GoaLitiuM-object_destroynow_csharp' 2023-08-14 15:51:57 +02:00
mafiesto4 3197479cc0 Merge branch 'object_destroynow_csharp' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-object_destroynow_csharp 2023-08-14 15:51:45 +02:00
mafiesto4 860dce487f Codestyle fixes 2023-08-14 15:47:24 +02:00
mafiesto4 dbd1fa3de6 Merge branch 'GoaLitiuM-managedhandlepool_refactor' 2023-08-14 15:44:03 +02:00
mafiesto4 6af6afc6a4 Merge branch 'managedhandlepool_refactor' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-managedhandlepool_refactor 2023-08-14 15:43:57 +02:00
mafiesto4 6d26c05ced Merge branch 'GoaLitiuM-managedarray_pool_cache' 2023-08-14 15:39:50 +02:00
mafiesto4 d5245f6a8c Merge branch 'managedarray_pool_cache' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-managedarray_pool_cache 2023-08-14 15:39:44 +02:00
mafiesto4 4106a0febb Merge branch 'GoaLitiuM-arraytype_cache' 2023-08-14 15:36:33 +02:00
mafiesto4 342ec4c3c2 Merge branch 'arraytype_cache' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-arraytype_cache 2023-08-14 15:36:27 +02:00
mafiesto4 13e0582ef2 Codestyle fixes 2023-08-14 15:36:19 +02:00
mafiesto4 72a5aa7ec6 Merge branch 'GoaLitiuM-invoker_ret_refactor' 2023-08-14 15:31:56 +02:00
mafiesto4 238ff38bf2 Merge branch 'invoker_ret_refactor' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-invoker_ret_refactor 2023-08-14 15:31:50 +02:00
mafiesto4 b4c42defb3 Merge branch 'GoaLitiuM-unboxvalue_fixes' 2023-08-14 15:28:29 +02:00
mafiesto4 838af2bcbe Merge branch 'unboxvalue_fixes' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-unboxvalue_fixes 2023-08-14 15:28:24 +02:00
mafiesto4 5ae27a0e92 Code style fix 2023-08-14 15:25:12 +02:00
mafiesto4 86fde59a7a Merge branch 'GoaLitiuM-mclass_method_iter' 2023-08-14 15:24:56 +02:00
mafiesto4 212aba4375 Merge branch 'mclass_method_iter' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-mclass_method_iter 2023-08-14 15:24:47 +02:00
mafiesto4 57be27b5e5 Merge branch 'GoaLitiuM-intellisense_stdcpp' 2023-08-14 15:09:12 +02:00
mafiesto4 22a1f433a1 Merge branch 'intellisense_stdcpp' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-intellisense_stdcpp 2023-08-14 15:09:00 +02:00
mafiesto4 ca687ac805 Merge branch 'Withaust-commonvalue' 2023-08-14 15:07:40 +02:00
mafiesto4 430a4eb57f Merge branch 'commonvalue' of https://github.com/Withaust/FlaxEngine into Withaust-commonvalue 2023-08-14 15:03:47 +02:00
mafiesto4 f0d851e846 Merge branch 'GoaLitiuM-csharp_optimize_dev' 2023-08-14 14:41:03 +02:00
mafiesto4 19f14919c0 Allow modifying surface node archetype reference 2023-08-14 13:11:42 +02:00
mafiesto4 da44babb03 Add ignoring types with CompilerGeneratedAttribute in Editor 2023-08-14 13:11:00 +02:00
GoaLitiuM 53b1d0dd85 Optimize ScriptingObject managed initialization 2023-08-13 23:56:27 +03:00
GoaLitiuM cd56101aa3 Expose Object::DeleteObjectNow as Object.DestroyNow in managed scripting 2023-08-13 23:46:38 +03:00
GoaLitiuM 0008123e76 Cache ManagedDictionary types and helper method thunks 2023-08-13 23:15:06 +03:00
GoaLitiuM d4d404ac0b Optimize native interop marshallers runtime type checking 2023-08-13 22:28:56 +03:00
GoaLitiuM 1b0976d99b Refactor ManagedHandlePool
Weak handles are now stored in one sets of dictionarys synchronized with
other threads. This so far seems the fastest way to manage the
dictionaries for now.
2023-08-13 22:14:37 +03:00
GoaLitiuM 65de284a66 Optimize managed method invokers return value marshalling 2023-08-13 22:10:07 +03:00
GoaLitiuM d9ee8f4665 Cache pooled ManagedArray managed handles 2023-08-13 21:56:52 +03:00
GoaLitiuM 27e1401fc7 Slightly improve MClass::GetMethod method iteration
Check the number of parameters first before expensive string comparison
2023-08-13 21:54:44 +03:00
GoaLitiuM 1254af8bbb Optimize UnboxValue performance, safety and memory usage
- Avoids unnecessary boxing of the converted values by storing them in
unmanaged memory.
- Wrap ToNative-method in a delegate and cache it
- Fixes returning address to unpinned memory by pinning POD-types for
a short period of time.
2023-08-13 21:53:42 +03:00
GoaLitiuM 44b70d87e5 Cache MakeArrayType results in native interop 2023-08-13 21:42:40 +03:00
GoaLitiuM e6878942f9 Fix missing C++ standard version in VC++ projects intellisense options 2023-08-13 21:33:17 +03:00
GoaLitiuM 4ce1f31f12 Enable optimizations for Editor module in Development builds 2023-08-13 21:30:40 +03:00
GoaLitiuM 3df044d07b Add build option to change code optimization level in C# modules 2023-08-13 21:29:38 +03:00
mafiesto4 bb8f098714 Add reroute node usage to Visject only if surface type allows it 2023-08-13 19:14:57 +02:00
mafiesto4 ae4bce7a68 Add Visject surface boxes and connections drawing customization via style 2023-08-13 19:14:23 +02:00
Wiktor Kocielski f44156eb80 Remove another unnecessary exposed CommonValue.h 2023-08-13 09:02:43 +03:00
Wiktor Kocielski 1413da189e NetworkReplicator::ResolveForeignObject 2023-08-13 06:39:35 +03:00
Mr. Capybara 79eddd07aa Merge branch 'FlaxEngine:master' into add_spline_edit_options 2023-08-12 11:03:22 -04:00
Ruan Lucas be33fc6018 improv scroll locked focus 2023-08-11 22:31:12 -04:00
Wiktor Kocielski b35065ab3f Fix annoying error that happens due to an oversight 2023-08-12 03:58:28 +03:00
Ruan Lucas db806ad500 fix for large worlds 2023-08-11 08:28:28 -04:00
Ruan Lucas 645977f148 add scroll to focus 2023-08-10 22:41:48 -04:00
Ruan Lucas f2072028d4 change default key 2023-08-10 22:31:03 -04:00
Ruan Lucas aa3dd14bfc add locked focus 2023-08-10 22:24:55 -04:00
mafiesto4 e27f1a8a41 Merge remote-tracking branch 'origin/master' into 1.7 2023-08-10 18:34:27 +02:00
mafiesto4 09be2375f6 Merge branch 'GoaLitiuM-skip_postprocess_pass' 2023-08-10 12:05:00 +02:00
mafiesto4 7e75b9ad78 Merge branch 'skip_postprocess_pass' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-skip_postprocess_pass 2023-08-10 12:04:52 +02:00
mafiesto4 a2b338f704 Merge branch 'GoaLitiuM-load_library_fix' 2023-08-10 11:59:23 +02:00
mafiesto4 6da1a61726 Merge branch 'load_library_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-load_library_fix 2023-08-10 11:59:17 +02:00
mafiesto4 33512fd19b Merge branch 'GoaLitiuM-alc_reload_fix' 2023-08-10 11:56:24 +02:00
mafiesto4 85eb3541eb Merge branch 'alc_reload_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-alc_reload_fix 2023-08-10 11:56:17 +02:00
mafiesto4 ef1e89848f Merge branch 'Withaust-particleeffectfix' 2023-08-10 11:53:30 +02:00
mafiesto4 71c273d8f6 Merge branch 'particleeffectfix' of https://github.com/Withaust/FlaxEngine into Withaust-particleeffectfix 2023-08-10 11:53:20 +02:00
mafiesto4 cd949382cb Merge branch 'GoaLitiuM-vspreview_build_fix' 2023-08-10 11:48:59 +02:00
mafiesto4 9853181600 Merge branch 'vspreview_build_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-vspreview_build_fix 2023-08-10 11:48:51 +02:00
Menotdan a1a274df37 Merge branch 'FlaxEngine:master' into material_import 2023-08-09 15:31:44 -04:00
Menotdan 52e546b3ba fix unneeded include. 2023-08-09 15:29:14 -04:00
Menotdan af3d9d0eb3 Re-implement functionality for importing materials as instances. 2023-08-09 15:28:47 -04:00
Menotdan 9156e7727b Merge commit 'refs/pull/1115/head' of https://github.com/FlaxEngine/FlaxEngine into material_import1.6
Repair merge
2023-08-09 15:28:15 -04:00
GoaLitiuM 9d8105e3f3 Separate managed assembly unloading and scripting ALC reinitialization
Fixes an issue with multiple managed assemblies unloading and releasing
all cached data before native resources were fully released in other
assemblies.
2023-08-08 17:39:31 +03:00
Wiktor Kocielski 47c6e54406 Fix exposed public CommonValue inclusion 2023-08-08 08:45:14 +03:00
envision3d b9ffb950f3 Refactor and more appropriately organize logic
- move play logic to simulation module
- update play hotkey to call play game/scene delegate function
- link hotkey tooltip text to inputOptions
2023-08-06 13:11:45 -05:00
Ruan Lucas dc3e71a262 fix for large worlds 2023-08-05 21:26:27 -04:00
Ruan Lucas 6b1cc5bf2f adjust again... 2023-08-05 12:07:40 -04:00
Ruan Lucas 144f0a1717 Merge branch 'add_spline_edit_options' of https://github.com/RuanLucasGD/FlaxEngine into add_spline_edit_options 2023-08-05 12:00:50 -04:00
Mr. Capybara 78cf55904e Merge branch 'FlaxEngine:master' into add_spline_edit_options 2023-08-05 11:11:11 -04:00
Ruan Lucas 38492ffe70 small adjust 2023-08-05 11:01:15 -04:00
mafiesto4 1958adb126 Add AI module to engine 2023-08-04 13:19:03 +02:00
mafiesto4 73bbe63c1e Missing change for 05d477d6c8 2023-08-04 13:10:36 +02:00
mafiesto4 05d477d6c8 Add SelectionChanged public event for VisjectSurface and properly invoke it only when selection actually changes 2023-08-04 12:52:54 +02:00
mafiesto4 b5fa5fa68e Add SerializableScriptingObject for easier serialization of scripting objects in gameplay or content 2023-08-04 10:11:58 +02:00
mafiesto4 cab1d8cac4 Fix missing Visject CM groups auto-expanding if enabled 2023-08-03 16:29:07 +02:00
mafiesto4 c0d32a99b0 Refactor Visject surface nodes cache to reuse between graphs 2023-08-03 15:44:02 +02:00
mafiesto4 bb96f2cd6d Add GroupArchetype to Visject nodes spawn query check 2023-08-03 14:53:02 +02:00
Wiktor Kocielski ec3b921a4f Fix navigation rebuilding 2023-08-02 05:17:49 +03:00
GoaLitiuM fe87eb96e6 Skip post processing when tonemapping and camera artifacts are disabled 2023-08-01 20:20:34 +03:00
GoaLitiuM db56284ca4 Fix WindowsPlatform::LoadLibrary to not modify the string parameter 2023-08-01 20:19:10 +03:00
mafiesto4 8dc98174cf Minor tweaks 2023-08-01 14:14:27 +02:00
mafiesto4 869649e5ed Merge remote-tracking branch 'origin/master' into 1.7 2023-08-01 14:05:49 +02:00
mafiesto4 94386d24ab Minor tweaks 2023-08-01 10:27:31 +02:00
mafiesto4 f29cd1b7b8 Simplify code #1275 2023-08-01 10:03:47 +02:00
mafiesto4 453d326303 Merge branch 'Withaust-gridscale' 2023-08-01 10:01:37 +02:00
mafiesto4 ef1c812349 Merge branch 'gridscale' of https://github.com/Withaust/FlaxEngine into Withaust-gridscale 2023-08-01 10:01:32 +02:00
mafiesto4 911cdb3f2d Softlock fix 2023-08-01 10:01:00 +02:00
mafiesto4 f79390baa4 Merge branch 'Withaust-mordorfix' 2023-08-01 09:59:41 +02:00
mafiesto4 714b35b520 Merge branch 'mordorfix' of https://github.com/Withaust/FlaxEngine into Withaust-mordorfix 2023-08-01 09:59:36 +02:00
mafiesto4 cfab58ccc6 Fix some actor assets into soft checks 2023-08-01 09:57:38 +02:00
Ruan Lucas f511259a33 draw spline point size by distance from camera 2023-07-31 22:43:33 -04:00
Ruan Lucas 600659e453 Move DrawSpline from Spline.cpp to SplineNode.cs 2023-07-31 22:34:50 -04:00
Ruan Lucas 2b7b80ad38 makes more easy select a spline point or spline tangent 2023-07-31 22:05:13 -04:00
Ruan Lucas b80682c97e set spline points / tangents size by camera distance 2023-07-31 19:21:26 -04:00
Ruan Lucas 84bed5b1c9 Revert "test"
This reverts commit b5eadbc531.
2023-07-31 14:02:03 -04:00
mafiesto4 dfbda334f9 Merge branch 'Tryibion-dup-fix' 2023-07-31 19:10:18 +02:00
mafiesto4 64446bea53 Merge branch 'dup-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-dup-fix 2023-07-31 19:10:13 +02:00
mafiesto4 479366c47f Merge branch 'envision3d-feature/1151-play-mode-actions' 2023-07-31 19:03:09 +02:00
mafiesto4 81860e5f18 Cleanup code #1215 and add cook game icon 2023-07-31 19:02:53 +02:00
mafiesto4 6e9b9b6d0e Merge branch 'feature/1151-play-mode-actions' of https://github.com/envision3d/FlaxEngine into envision3d-feature/1151-play-mode-actions 2023-07-31 17:24:55 +02:00
mafiesto4 71bce781f7 Force disable flot128 in fmt 2023-07-31 17:24:47 +02:00
mafiesto4 89c0b9a24d Merge branch 'GoaLitiuM-dotnet_defines' 2023-07-31 17:13:57 +02:00
mafiesto4 8d48b27608 Merge branch 'dotnet_defines' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-dotnet_defines 2023-07-31 17:13:52 +02:00
mafiesto4 de55f465fc Merge branch 'GoaLitiuM-dotnet_analyzer_support' 2023-07-31 17:12:23 +02:00
mafiesto4 9774f62e32 Merge branch 'dotnet_analyzer_support' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-dotnet_analyzer_support 2023-07-31 17:12:18 +02:00
mafiesto4 dc9fe11c47 Merge branch 'GoaLitiuM-generic_asset_reference_attrib' 2023-07-31 16:59:54 +02:00
Ruan Lucas b5eadbc531 test 2023-07-31 09:06:39 -04:00
GoaLitiuM e598746980 Fix build issues in Visual Studio 2022 Preview 5 2023-07-30 22:09:23 +03:00
GoaLitiuM 735b2e30f0 Output generated .NET source generator files to Intermediate folder
Mostly useful for debugging source generators, VS doesn't seem to
utilize these files in any way.
2023-07-30 21:58:16 +03:00
GoaLitiuM 13e11091fc Support user defined .NET analyzers/source generators in Flax.Build 2023-07-30 21:58:11 +03:00
GoaLitiuM 3ba05f52df Add common .NET SDK preprocessor definitions 2023-07-30 21:57:44 +03:00
GoaLitiuM bf351f71bf Guard generic AssetReferenceAttribute to work only in .NET 7 2023-07-30 20:48:36 +03:00
GoaLitiuM 06250fcb6d Implement a generic version of AssetReferenceAttribute 2023-07-30 20:40:30 +03:00
Wiktor Kocielski 383b21c108 Softlock fix 2023-07-29 18:55:29 +03:00
Wiktor Kocielski 8250f92af3 Add grid scale to the editor viewport settings 2023-07-29 13:34:46 +03:00
Wiktor Kocielski eb641e142e ShadowOfMordor terrain fix 2023-07-29 01:00:07 +03:00
NoriteSC 0b89164328 Merge branch 'FlaxEngine:master' into ContentBrowserImprovement 2023-07-28 15:56:40 +02:00
NoriteSC 131060efa7 bug fix 2023-07-28 12:48:43 +02:00
Tryibion 5cd72c9b24 Fix duplicating actor in scene on shift click if the actor has not been moved 2023-07-27 16:51:44 -05:00
Tryibion d6bfcbcc3d Add for prefab 2023-07-27 10:49:29 -05:00
Tryibion 10c8454e8f Paste at same level of selected actor parent node instead of as child of selected actor for better behavior. 2023-07-27 10:33:30 -05:00
mafiesto4 80bcc0f32e Merge branch 'Tryibion-prefab-batch' 2023-07-26 21:21:20 +02:00
mafiesto4 36db7ad7dd Merge branch 'prefab-batch' of https://github.com/Tryibion/FlaxEngine into Tryibion-prefab-batch 2023-07-26 21:19:57 +02:00
mafiesto4 95922bb38b Fix compilation 2023-07-26 21:18:22 +02:00
mafiesto4 63e83d1f92 Merge branch 'NoriteSC-MathLib' 2023-07-26 19:33:13 +02:00
mafiesto4 77daf85fc1 Add unit test for angles unwind math #1267 2023-07-26 19:31:43 +02:00
mafiesto4 fae20daac9 Cleanup code #1267 2023-07-26 19:28:55 +02:00
mafiesto4 dceea2656e Merge branch 'MathLib' of https://github.com/NoriteSC/FlaxEngineFork into NoriteSC-MathLib 2023-07-26 18:32:31 +02:00
mafiesto4 36cc80a003 Merge branch 'GoaLitiuM-api_inject_code_dup_fix' 2023-07-26 18:25:29 +02:00
GoaLitiuM c2fffbcfdb Fix API_INJECT_CODE injecting duplicated code 2023-07-25 20:49:20 +03:00
NoriteSC 3bd8d930e0 doc fixes and code corections
mathf UnwindRadians has fixed coust
added UnwindRadiansAccurate oldversion
2023-07-25 15:27:18 +02:00
Ruan Lucas 714d0c2ca0 small fix 2023-07-24 22:41:45 -04:00
Ruan Lucas ea48a89e00 improve auto smooth 2023-07-24 22:34:48 -04:00
Ruan Lucas 7b0e9b9e06 simplify code 2023-07-24 19:30:31 -04:00
mafiesto4 ce16debabd Merge remote-tracking branch 'origin/master' into 1.7 2023-07-24 23:21:03 +02:00
NoriteSC 6a65ccd5ef rev1 2023-07-24 22:10:12 +02:00
mafiesto4 543433440e Fix nested animation playrate when the framerate is different
#1258
2023-07-24 19:21:03 +02:00
mafiesto4 be0baa172e Merge branch 'mtszkarbowiak-fix/string-marshalling' 2023-07-24 18:14:30 +02:00
mafiesto4 619b0bff6b Merge branch 'fix/string-marshalling' of https://github.com/mtszkarbowiak/FlaxEngine into mtszkarbowiak-fix/string-marshalling 2023-07-24 18:14:24 +02:00
mafiesto4 c9254457a9 Code style tweaks 2023-07-24 16:24:39 +02:00
mafiesto4 7cfcca860a Merge branch 'Tryibion-platform-ref-fix' 2023-07-24 16:18:11 +02:00
mafiesto4 cf4ca17241 Merge branch 'platform-ref-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-platform-ref-fix 2023-07-24 16:17:57 +02:00
mafiesto4 93aa202eed Merge branch 'Tryibion-assetpicker-scroll' 2023-07-24 16:15:23 +02:00
mafiesto4 4903fe8191 Merge branch 'assetpicker-scroll' of https://github.com/Tryibion/FlaxEngine into Tryibion-assetpicker-scroll 2023-07-24 16:15:18 +02:00
mafiesto4 5f090c2bf2 Merge branch 'GoaLitiuM-api_param_params' 2023-07-24 16:14:08 +02:00
mafiesto4 2643234718 Merge branch 'api_param_params' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-api_param_params 2023-07-24 16:14:03 +02:00
Ruan Lucas 56285e544e disable set all linear / smooth when select many splines 2023-07-24 08:54:53 -04:00
mafiesto4 11bb6d4364 Fix crash when using custom Anim Graph node (.NET 7 regression) 2023-07-24 14:23:28 +02:00
Ruan Lucas c79c91a19a add undo / redo to edit spline options and some small changes 2023-07-23 20:27:45 -04:00
Tryibion f80b7ee2a5 Fix spacing 2023-07-23 18:58:47 -05:00
Tryibion 12005ad314 Simplify functionality into function. 2023-07-23 15:20:57 -05:00
Tryibion 02d135053f Add scroll to selected asset/content item on asset picker select menu open. 2023-07-23 15:10:31 -05:00
GoaLitiuM d1a6bdceed Add params tag to API_PARAM for C# variadic parameters support 2023-07-23 12:47:00 +03:00
Mateusz Karbowiak 91e0e2011c Fix visibility of string wrapper 2023-07-22 18:44:36 +02:00
Ruan Lucas 1a72aeeb24 disable edit tangent buttons when select multiple values 2023-07-21 22:15:43 -04:00
Ruan Lucas bd8c5985b1 remove debug 2023-07-21 22:11:30 -04:00
Ruan Lucas f8da0708e1 add suport to loop spline on set tangent linear 2023-07-21 22:11:15 -04:00
Ruan Lucas 1bd7210107 don't let aligned or free mode on first or end spline point 2023-07-21 21:05:36 -04:00
Ruan Lucas 6872f35add don't let set smooth tangent in/out on start/end spline if isn't loop 2023-07-21 21:00:08 -04:00
Tryibion 0ba9f7c51d Small simplification of null checking for input editors 2023-07-21 13:33:00 -05:00
Tryibion 9b0c6a070a Add InputEvent and InputAxis editors and changed UICanvas to use them. 2023-07-21 13:26:51 -05:00
Ruan Lucas 008f219883 organize smooth in and smooth out tangents code 2023-07-21 10:25:55 -04:00
Tryibion 83427ba1d4 Add batch creating prefabs from mutiple selected actors in the scene tree. 2023-07-20 23:02:26 -05:00
Tryibion a1cdf3e733 Fix bug of populating asset picker if option platform type does not exist. 2023-07-20 21:31:07 -05:00
Ruan Lucas 5c7faf7262 disable edit tangent options when deselect tangents or spline points on spline editor 2023-07-20 16:40:05 -04:00
Ruan Lucas 4cf2bba840 fix edit buttons style on spline editor 2023-07-20 13:19:18 -04:00
Ruan Lucas e6715ad095 add methods to auto select tangents or points on change edit mode on spline editor 2023-07-20 13:05:56 -04:00
Ruan Lucas 50f1688140 add smooth in tangent and smooth out tangent 2023-07-20 10:52:07 -04:00
Ruan Lucas 902a3c1eed smooth point on set linear point to free 2023-07-20 09:36:05 -04:00
Ruan Lucas e40c0be00d fix set type on press edit buttons not working 2023-07-20 09:25:48 -04:00
envision3d dba0675873 Merge branch 'master' of https://github.com/FlaxEngine/FlaxEngine into feature/1151-play-mode-actions 2023-07-20 02:00:53 -05:00
Ruan Lucas 8a9b76a468 clean code 2023-07-19 16:28:15 -04:00
Ruan Lucas 7855db951e auto detect tangent type when click on spline keyframe 2023-07-19 16:01:05 -04:00
Ruan Lucas 7036e77d60 fix auto smooth point on click 2023-07-19 10:20:30 -04:00
Ruan Lucas 95c934d6b4 se button color when set tangent mode 2023-07-19 09:07:40 -04:00
Ruan Lucas a42dc8f434 change tangent edit option base class name 2023-07-19 08:44:22 -04:00
Ruan Lucas 1ec2df1a29 disable edit tangents buttons when don't have any tangent or point selected 2023-07-19 08:43:11 -04:00
mafiesto4 32d9067710 Fix build 2023-07-19 09:08:17 +02:00
Ruan Lucas 590a892f16 set spline point as selected when has a tangent selected and set as linear 2023-07-18 21:54:30 -04:00
Ruan Lucas 2fac4c9284 add smooth tangent on first and last keyframe 2023-07-18 20:28:28 -04:00
Ruan Lucas 2be6a6be9e add basic options 2023-07-18 16:48:15 -04:00
mafiesto4 b26b9302e0 Remove unused TIsArithmetic 2023-07-18 18:43:10 +02:00
mafiesto4 eea0b37dc3 Merge remote-tracking branch 'origin/master' into 1.7 2023-07-18 18:35:44 +02:00
mafiesto4 b2b10ce7da Fix various core types to be trivially constructible as properly POD-type 2023-07-18 18:20:11 +02:00
mafiesto4 872509df2a Fix incorrect Transform Position To Screen UV in particles graph in CPU code path 2023-07-18 18:13:19 +02:00
mafiesto4 e96e338fd3 Merge branch 'Tryibion-log-count' 2023-07-18 17:45:25 +02:00
mafiesto4 a80e3f5a15 Merge branch 'log-count' of https://github.com/Tryibion/FlaxEngine into Tryibion-log-count 2023-07-18 17:45:18 +02:00
Tryibion be079b9b67 Improvements to debug log count. 2023-07-18 09:51:21 -05:00
mafiesto4 e39a56fc4e Merge remote-tracking branch 'origin/master' into 1.7 2023-07-18 11:47:39 +02:00
mafiesto4 60c0995bc3 Add undo for #1247 2023-07-18 11:46:15 +02:00
mafiesto4 8f8c0e4b81 Minor fixes for #1247 2023-07-18 10:55:15 +02:00
mafiesto4 338499536f Add ModelInstanceActor::GetMaterialSlots 2023-07-18 10:55:00 +02:00
mafiesto4 0f613abfb9 Add ToSpan from 24c03c0e4b 2023-07-18 10:54:21 +02:00
mafiesto4 fdb06424d4 Merge branch 'Tryibion-mat-entry' 2023-07-18 10:25:46 +02:00
mafiesto4 5b40f770b1 Merge branch 'mat-entry' of https://github.com/Tryibion/FlaxEngine into Tryibion-mat-entry 2023-07-18 10:25:35 +02:00
mafiesto4 488958ce44 Fix DrawSceneDepth to properly draw scene objects when custom actors list is empty
#1253
2023-07-18 10:16:11 +02:00
mafiesto4 a535c701e5 Merge branch 'GoaLitiuM-generic_type_fix' 2023-07-18 09:51:14 +02:00
mafiesto4 9c2cff6f3c Merge branch 'generic_type_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-generic_type_fix 2023-07-18 09:50:56 +02:00
mafiesto4 44518e88d5 Fix crash when using Vector3 soft casting in Visual Scripts 2023-07-18 09:48:43 +02:00
mafiesto4 07ef07e979 Merge remote-tracking branch 'origin/1.7' into 1.7
# Conflicts:
#	Source/Engine/Physics/Actors/Cloth.cpp
2023-07-17 18:27:31 +02:00
mafiesto4 5012d4432e Add NvCloth for Linux 2023-07-17 18:22:40 +02:00
mafiesto4 3d5d7ad968 Don't recook cloth mesh when rebuilding it 2023-07-17 15:34:38 +02:00
mafiesto4 868084286c Add automatic cloth rebuild when simulation fails with NaN 2023-07-17 15:17:22 +02:00
mafiesto4 1af076f180 Add distance-based and frustum-based culling to cloth 2023-07-17 11:16:01 +02:00
mafiesto4 de8613e223 Merge remote-tracking branch 'origin/master' into 1.7 2023-07-16 22:40:02 +02:00
mafiesto4 10d9942e8f Add async pre-sim update for cloth via job system 2023-07-16 22:39:56 +02:00
mafiesto4 2046eca45a Add NvCloth fabric reusing for multiple instances of the same cloth mesh 2023-07-16 14:40:11 +02:00
mafiesto4 e075a1c6aa Run cloth simulation in async via job system 2023-07-16 12:59:18 +02:00
mafiesto4 adfaf8c961 Don't update cloth colliders every frame 2023-07-16 12:53:59 +02:00
mafiesto4 9179586f14 Fix cloth painting in prefab window 2023-07-16 12:36:38 +02:00
mafiesto4 011162744c Fix various keyboard handling on macOS 2023-07-16 12:04:22 +02:00
mafiesto4 6853aa6e81 Add control/command/option keys handling on macOS 2023-07-16 12:04:18 +02:00
mafiesto4 6fc168bdf1 Add macOS message box with buttons 2023-07-16 12:04:12 +02:00
mafiesto4 6d48fce763 Fix mouse cursor setting on macOS to properly handle screen scale 2023-07-16 12:04:06 +02:00
mafiesto4 371db610a9 Merge remote-tracking branch 'origin/1.7' into 1.7 2023-07-16 12:03:06 +02:00
mafiesto4 31943ca9bd Add normals computing to cloth mesh 2023-07-16 12:02:33 +02:00
mafiesto4 f0496d53e8 Add RenderTools::CalculateTangentFrame utility 2023-07-16 11:57:21 +02:00
Tryibion 868db7c848 Add functionality to combine similar logs into a log with a count. 2023-07-15 13:52:10 -05:00
Tryibion c89421438b Code cleanup 2023-07-15 10:42:41 -05:00
Tryibion 02219beac9 Handle edge case 2023-07-15 10:27:59 -05:00
Tryibion c8edaf5d6e Fix bug with not using slot material 2023-07-15 10:10:37 -05:00
Tryibion ba93e1e1d0 Add showing default materials to model entries. 2023-07-15 10:00:34 -05:00
mafiesto4 1ae89c7545 Fix various keyboard handling on macOS 2023-07-15 15:07:52 +02:00
mafiesto4 4a0235785b Add control/command/option keys handling on macOS 2023-07-15 15:00:55 +02:00
mafiesto4 8f4ada2555 Add macOS message box with buttons 2023-07-15 14:42:54 +02:00
mafiesto4 a7e436412c Fix mouse cursor setting on macOS to properly handle screen scale 2023-07-15 14:01:56 +02:00
GoaLitiuM ff56152ef2 Fix releasing non-collectible types with collectible generic types 2023-07-15 13:20:56 +03:00
mafiesto4 18fb7fb849 Add NvCloth for iOS 2023-07-15 11:27:26 +02:00
mafiesto4 6664972fbf Add NvCloth for macOS 2023-07-15 11:22:00 +02:00
mafiesto4 2645b69ec0 Tweak air lif/drag coeffs to properly simulate wind on cloth 2023-07-14 17:10:28 +02:00
mafiesto4 aef3ae14d4 Add animated model pose handling as a input to cloth for proper character clothing sim 2023-07-14 17:10:09 +02:00
mafiesto4 68d97fcc48 Improve cloth paint picking logic 2023-07-14 14:17:19 +02:00
mafiesto4 3f9e286279 Fix crash when creating cloth with all vertices fixed 2023-07-14 14:12:30 +02:00
mafiesto4 3141b4fb04 Merge remote-tracking branch 'origin/master' into 1.7
# Conflicts:
#	Source/Engine/Level/Actors/SplineModel.cpp
#	Source/Engine/Level/Actors/SplineModel.h
2023-07-14 14:10:21 +02:00
mafiesto4 b1056e160a Add debug sanity checks to cloth to solve issues 2023-07-14 13:36:44 +02:00
mafiesto4 84c99ea1c3 Fix nested animation sampling bug
#1244
2023-07-14 13:10:20 +02:00
mafiesto4 f5f948ea4c Fix culling artifacts in animated model preview in Editor 2023-07-14 12:17:21 +02:00
mafiesto4 a6924d37c1 Add ModelInstanceActor::GetMaterial to get actual material used to render certain entries 2023-07-14 11:58:51 +02:00
mafiesto4 7b88569e73 Add sealed tag to virtual functions in API bindings to block inheritance in C#/VS 2023-07-14 11:57:38 +02:00
mafiesto4 40fc2f8295 Fix missing header files in deployed engine package
#1242
2023-07-14 11:25:54 +02:00
mafiesto4 843abca8ca Fix error when opening shader asset if it's not visible in Content window 2023-07-14 10:59:04 +02:00
mafiesto4 24c03c0e4b Add cloth painting tools to Editor 2023-07-13 23:30:37 +02:00
mafiesto4 3b90e75307 Various improvements to serialization of data encoded via Base64 to Json 2023-07-13 13:10:34 +02:00
mafiesto4 c6a82b8c36 Add DebugDraw::DrawLine with separate start/end colors 2023-07-13 13:08:53 +02:00
mafiesto4 15b2d4e041 Add IPresenterOwner to editor Custom Editor for more context and advanced interactions 2023-07-12 12:36:30 +02:00
mafiesto4 159beae8ae Merge remote-tracking branch 'origin/master' into 1.7 2023-07-12 12:24:24 +02:00
mafiesto4 8a07c486bc Refactor Editor gizmo modes ownership to support using them in prefab window 2023-07-12 12:24:13 +02:00
mafiesto4 3e801dbc8d Merge branch 'Tryibion-debug-lights' 2023-07-10 12:52:10 +02:00
mafiesto4 170906e483 Merge branch 'debug-lights' of https://github.com/Tryibion/FlaxEngine into Tryibion-debug-lights 2023-07-10 12:52:05 +02:00
mafiesto4 a22cedf286 Merge branch 'Tryibion-spotlight-inner-debug' 2023-07-10 12:46:48 +02:00
mafiesto4 ae1c0b45d8 Merge branch 'spotlight-inner-debug' of https://github.com/Tryibion/FlaxEngine into Tryibion-spotlight-inner-debug 2023-07-10 12:46:40 +02:00
mafiesto4 6ae77d0c17 Merge remote-tracking branch 'origin/1.6' into 1.7 2023-07-09 11:55:50 +02:00
Tryibion 0a57cbbecf Add not showing lights debug based on other light flags as well. 2023-07-07 17:48:16 -05:00
Tryibion a0bb3f2995 Add light debug view flag to draw light shapes 2023-07-07 17:32:46 -05:00
Tryibion 48474065d7 Add spot light inner circle debug lines. 2023-07-07 16:46:35 -05:00
mafiesto4 e4c3461053 Merge remote-tracking branch 'origin/master' into 1.7 2023-07-03 22:01:50 +02:00
mafiesto4 53ee65a5a6 Add thickness to cloth to prevent intersecting with colliders 2023-07-03 14:13:35 +02:00
mafiesto4 f81989a171 Add **Cloth** simulation with physics 2023-07-03 10:38:36 +02:00
mafiesto4 8818b3b07c Add NvCloth dependency 2023-07-03 09:51:42 +02:00
mafiesto4 99ee0b1bfe Add MeshDeformation utility for generic meshes vertices morphing (eg. via Blend Shapes or Cloth) 2023-07-03 09:49:23 +02:00
mafiesto4 60181a29a3 Add copy/move ctor/operator to Delegate 2023-07-02 15:46:55 +02:00
mafiesto4 04963fef18 Various code fixes and tweaks 2023-07-02 15:46:29 +02:00
mafiesto4 0d7e7edf80 Optimize BoundingBox::Transform 2023-06-29 16:50:53 +02:00
mafiesto4 e3cbe1458d Add MeshReference to ModelInstanceActor for easy mesh referencing and its data access interface 2023-06-29 16:50:00 +02:00
mafiesto4 656866c1d4 Various improvements in Editor code 2023-06-29 16:41:15 +02:00
envision3d 940b0e02e5 improve state syncing of context menus and editor options 2023-06-28 04:08:36 -05:00
envision3d 39f4c00135 add play button actions, number of players
- add context menu support for toolstrip buttons
- add "Play Game" vs. "Play Scenes"
- add context menu for choosing play button action to toolstrip button
- add number of game client selection for cook & run
- add context menu for cook & run to toolstrip button
- add menu items for the above
- add editor option entries for saving user preferences for the above
2023-06-28 02:02:10 -05:00
mafiesto4 4741f194f6 Update CMake project to the latest VS 2022 2023-06-21 23:07:52 +02:00
mafiesto4 9b0fdb2cbd Disable assertions in Release build mode 2023-06-19 13:59:04 +02:00
mafiesto4 f952a392de Add **stencil buffer** support to GPUPipelineState 2023-06-19 13:46:37 +02:00
mafiesto4 a6353c0bb9 Rename GPUPipelineState::Description::PrimitiveTopologyType to PrimitiveTopology 2023-06-19 11:53:40 +02:00
mafiesto4 7fc3b264ac Improve DX12 PSO debug name building 2023-06-19 11:21:53 +02:00
mafiesto4 1c9d8aa470 Add GPUContext::SetStencilRef to stencil reference value 2023-06-19 11:21:35 +02:00
Menotdan e3f004b831 remove extraneous stack trace print that i used for debugging 2023-05-22 14:26:55 -04:00
Menotdan 284c3d832a fix a couple of bugs with importing without material instances 2023-05-22 14:26:20 -04:00
Menotdan 4acfffeaf4 Make it so the material instances get linked to the material slots. 2023-05-22 13:51:13 -04:00
Menotdan 37fe1154a3 Importing as instances works now 2023-05-22 10:12:00 -04:00
Menotdan f03bb60d5b Figured out where I actually need to add code, and added code there. 2023-05-21 00:20:54 -04:00
Menotdan 89ce2b087e Add parameter for AddMaterial() as an experiment, messing around with ideas. 2023-05-20 00:13:45 -04:00
Menotdan 9a71e0274f Add required options for material instance importing. 2023-05-20 00:03:40 -04:00
GoaLitiuM bf9dbbc79e Restore disabled compiler warnings of unused events 2023-01-14 18:01:14 +02:00
GoaLitiuM 5fa10fd17b Allow unsubscribing from managed events multiple times 2023-01-14 17:45:21 +02:00
Tryibion fd4b9a5a9f Return focus to parent on mouse leave. 2022-12-16 16:29:43 -06:00
1107 changed files with 51513 additions and 16727 deletions
+1 -1
View File
@@ -33,4 +33,4 @@ jobs:
git lfs pull git lfs pull
- name: Build - name: Build
run: | run: |
.\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -arch=ARM64 -platform=Android -configuration=Release -buildtargets=FlaxGame .\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -dotnet=7 -arch=ARM64 -platform=Android -configuration=Release -buildtargets=FlaxGame
+1 -1
View File
@@ -33,4 +33,4 @@ jobs:
git lfs pull git lfs pull
- name: Build - name: Build
run: | run: |
./Development/Scripts/Mac/CallBuildTool.sh -build -log -arch=ARM64 -platform=iOS -configuration=Release -buildtargets=FlaxGame ./Development/Scripts/Mac/CallBuildTool.sh -build -log -dotnet=7 -arch=ARM64 -platform=iOS -configuration=Release -buildtargets=FlaxGame
+2 -2
View File
@@ -36,7 +36,7 @@ jobs:
git lfs pull git lfs pull
- name: Build - name: Build
run: | run: |
./Development/Scripts/Linux/CallBuildTool.sh -build -log -printSDKs -arch=x64 -platform=Linux -configuration=Development -buildtargets=FlaxEditor ./Development/Scripts/Linux/CallBuildTool.sh -build -log -printSDKs -dotnet=7 -arch=x64 -platform=Linux -configuration=Development -buildtargets=FlaxEditor
# Game # Game
game-linux: game-linux:
@@ -64,4 +64,4 @@ jobs:
git lfs pull git lfs pull
- name: Build - name: Build
run: | run: |
./Development/Scripts/Linux/CallBuildTool.sh -build -log -printSDKs -arch=x64 -platform=Linux -configuration=Release -buildtargets=FlaxGame ./Development/Scripts/Linux/CallBuildTool.sh -build -log -printSDKs -dotnet=7 -arch=x64 -platform=Linux -configuration=Release -buildtargets=FlaxGame
+2 -2
View File
@@ -30,7 +30,7 @@ jobs:
git lfs pull git lfs pull
- name: Build - name: Build
run: | run: |
./Development/Scripts/Mac/CallBuildTool.sh -build -log -printSDKs -arch=x64 -platform=Mac -configuration=Development -buildtargets=FlaxEditor ./Development/Scripts/Mac/CallBuildTool.sh -build -log -printSDKs -dotnet=7 -arch=x64 -platform=Mac -configuration=Development -buildtargets=FlaxEditor
# Game # Game
game-mac: game-mac:
@@ -55,4 +55,4 @@ jobs:
git lfs pull git lfs pull
- name: Build - name: Build
run: | run: |
./Development/Scripts/Mac/CallBuildTool.sh -build -log -printSDKs -arch=x64 -platform=Mac -configuration=Release -buildtargets=FlaxGame ./Development/Scripts/Mac/CallBuildTool.sh -build -log -printSDKs -dotnet=7 -arch=x64 -platform=Mac -configuration=Release -buildtargets=FlaxGame
+2 -2
View File
@@ -30,7 +30,7 @@ jobs:
git lfs pull git lfs pull
- name: Build - name: Build
run: | run: |
.\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -arch=x64 -platform=Windows -configuration=Development -buildtargets=FlaxEditor .\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -dotnet=7 -arch=x64 -platform=Windows -configuration=Development -buildtargets=FlaxEditor
# Game # Game
game-windows: game-windows:
@@ -55,4 +55,4 @@ jobs:
git lfs pull git lfs pull
- name: Build - name: Build
run: | run: |
.\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -arch=x64 -platform=Windows -configuration=Release -buildtargets=FlaxGame .\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -dotnet=7 -arch=x64 -platform=Windows -configuration=Release -buildtargets=FlaxGame
+5 -5
View File
@@ -34,8 +34,8 @@ jobs:
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev
- name: Build - name: Build
run: | run: |
./GenerateProjectFiles.sh -vs2022 -log -verbose -printSDKs ./GenerateProjectFiles.sh -vs2022 -log -verbose -printSDKs -dotnet=7
./Development/Scripts/Linux/CallBuildTool.sh -build -log -arch=x64 -platform=Linux -configuration=Development -buildtargets=FlaxTestsTarget ./Development/Scripts/Linux/CallBuildTool.sh -build -log -dotnet=7 -arch=x64 -platform=Linux -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
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
@@ -48,7 +48,7 @@ jobs:
dotnet test -f net7.0 Binaries/Tests/FlaxEngine.CSharp.dll dotnet test -f net7.0 Binaries/Tests/FlaxEngine.CSharp.dll
- name: Test UseLargeWorlds - name: Test UseLargeWorlds
run: | run: |
./Development/Scripts/Linux/CallBuildTool.sh -build -log -arch=x64 -platform=Linux -configuration=Development -buildtargets=FlaxTestsTarget -UseLargeWorlds=true ./Development/Scripts/Linux/CallBuildTool.sh -build -log -dotnet=7 -arch=x64 -platform=Linux -configuration=Development -buildtargets=FlaxTestsTarget -UseLargeWorlds=true
${GITHUB_WORKSPACE}/Binaries/Editor/Linux/Development/FlaxTests ${GITHUB_WORKSPACE}/Binaries/Editor/Linux/Development/FlaxTests
# Tests on Windows # Tests on Windows
@@ -72,8 +72,8 @@ jobs:
git lfs pull git lfs pull
- name: Build - name: Build
run: | run: |
.\GenerateProjectFiles.bat -vs2022 -log -verbose -printSDKs .\GenerateProjectFiles.bat -vs2022 -log -verbose -printSDKs -dotnet=7
.\Development\Scripts\Windows\CallBuildTool.bat -build -log -arch=x64 -platform=Windows -configuration=Development -buildtargets=FlaxTestsTarget .\Development\Scripts\Windows\CallBuildTool.bat -build -log -dotnet=7 -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
- name: Test - name: Test
run: | run: |
+1
View File
@@ -12,6 +12,7 @@ Source/*.csproj
/Package_*/ /Package_*/
!Source/Engine/Debug !Source/Engine/Debug
/Source/Platforms/Editor/Linux/Mono/etc/mono/registry /Source/Platforms/Editor/Linux/Mono/etc/mono/registry
PackageEditor_Cert.command
PackageEditor_Cert.bat PackageEditor_Cert.bat
PackagePlatforms_Cert.bat PackagePlatforms_Cert.bat
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.
+25 -26
View File
@@ -2,35 +2,34 @@
using System.Collections.Generic; using System.Collections.Generic;
using FlaxEngine; using FlaxEngine;
namespace %namespace% namespace %namespace%;
/// <summary>
/// %class% Script.
/// </summary>
public class %class% : Script
{ {
/// <summary> /// <inheritdoc/>
/// %class% Script. public override void OnStart()
/// </summary>
public class %class% : Script
{ {
/// <inheritdoc/> // Here you can add code that needs to be called when script is created, just before the first game update
public override void OnStart() }
{
// Here you can add code that needs to be called when script is created, just before the first game update /// <inheritdoc/>
} public override void OnEnable()
{
/// <inheritdoc/> // Here you can add code that needs to be called when script is enabled (eg. register for events)
public override void OnEnable() }
{
// Here you can add code that needs to be called when script is enabled (eg. register for events)
}
/// <inheritdoc/> /// <inheritdoc/>
public override void OnDisable() public override void OnDisable()
{ {
// Here you can add code that needs to be called when script is disabled (eg. unregister from events) // Here you can add code that needs to be called when script is disabled (eg. unregister from events)
} }
/// <inheritdoc/> /// <inheritdoc/>
public override void OnUpdate() public override void OnUpdate()
{ {
// Here you can add code that needs to be called every frame // Here you can add code that needs to be called every frame
}
} }
} }
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -11
View File
@@ -11,16 +11,6 @@ for %%I in (Source\Logo.png) do if %%~zI LSS 2000 (
call "Development\Scripts\Windows\GetMSBuildPath.bat" call "Development\Scripts\Windows\GetMSBuildPath.bat"
if errorlevel 1 goto Error_NoVisualStudioEnvironment if errorlevel 1 goto Error_NoVisualStudioEnvironment
if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" goto Compile
for /f "delims=" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -latest -products * -requires Microsoft.Component.MSBuild -property installationPath') do (
for %%j in (15.0, Current) do (
if exist "%%i\MSBuild\%%j\Bin\MSBuild.exe" (
set MSBUILD_PATH="%%i\MSBuild\%%j\Bin\MSBuild.exe"
goto Compile
)
)
)
:Compile :Compile
md Cache\Intermediate >nul 2>nul md Cache\Intermediate >nul 2>nul
dir /s /b Source\Tools\Flax.Build\*.cs >Cache\Intermediate\Flax.Build.Files.txt dir /s /b Source\Tools\Flax.Build\*.cs >Cache\Intermediate\Flax.Build.Files.txt
@@ -44,7 +34,7 @@ goto Exit
echo CallBuildTool ERROR: The script is in invalid directory. echo CallBuildTool ERROR: The script is in invalid directory.
goto Exit goto Exit
:Error_NoVisualStudioEnvironment :Error_NoVisualStudioEnvironment
echo CallBuildTool ERROR: Missing Visual Studio 2015 or newer. echo CallBuildTool ERROR: Missing Visual Studio 2022 or newer.
goto Exit goto Exit
:Error_CompilationFailed :Error_CompilationFailed
echo CallBuildTool ERROR: Failed to compile Flax.Build project. echo CallBuildTool ERROR: Failed to compile Flax.Build project.
+13 -53
View File
@@ -4,66 +4,26 @@ rem Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
set MSBUILD_PATH= set MSBUILD_PATH=
rem Look for MSBuild version 17.0 or later
if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" goto VsWhereNotFound if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" goto VsWhereNotFound
for /f "delims=" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -latest -products * -requires Microsoft.Component.MSBuild -property installationPath') do ( for /f "delims=" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -version 17.0 -latest -products * -requires Microsoft.Component.MSBuild -property installationPath') do (
if exist "%%i\MSBuild\15.0\Bin\MSBuild.exe" (
set MSBUILD_PATH="%%i\MSBuild\15.0\Bin\MSBuild.exe"
goto End
)
)
for /f "delims=" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -latest -prerelease -products * -requires Microsoft.Component.MSBuild -property installationPath') do (
if exist "%%i\MSBuild\15.0\Bin\MSBuild.exe" (
set MSBUILD_PATH="%%i\MSBuild\15.0\Bin\MSBuild.exe"
goto End
)
if exist "%%i\MSBuild\Current\Bin\MSBuild.exe" ( if exist "%%i\MSBuild\Current\Bin\MSBuild.exe" (
set MSBUILD_PATH="%%i\MSBuild\Current\Bin\MSBuild.exe" set MSBUILD_PATH="%%i\MSBuild\Current\Bin\MSBuild.exe"
goto End goto End
) )
) )
:VsWhereNotFound
if exist "%ProgramFiles(x86)%\MSBuild\14.0\bin\MSBuild.exe" ( rem Look for MSBuild version 17.0 or later in pre-release versions
set MSBUILD_PATH="%ProgramFiles(x86)%\MSBuild\14.0\bin\MSBuild.exe" for /f "delims=" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -version 17.0 -latest -prerelease -products * -requires Microsoft.Component.MSBuild -property installationPath') do (
goto End if exist "%%i\MSBuild\Current\Bin\MSBuild.exe" (
set MSBUILD_PATH="%%i\MSBuild\Current\Bin\MSBuild.exe"
goto End
)
) )
echo GetMSBuildPath ERROR: Could not find MSBuild version 17.0 or later.
call :GetInstallPath Microsoft\VisualStudio\SxS\VS7 15.0 MSBuild\15.0\bin\MSBuild.exe exit /B 1
if not errorlevel 1 goto End :VsWhereNotFound
call :GetInstallPath Microsoft\MSBuild\ToolsVersions\14.0 MSBuildToolsPath MSBuild.exe echo GetMSBuildPath ERROR: vswhere.exe was not found.
if not errorlevel 1 goto End
call :GetInstallPath Microsoft\MSBuild\ToolsVersions\12.0 MSBuildToolsPath MSBuild.exe
if not errorlevel 1 goto End
call :GetInstallPath Microsoft\MSBuild\ToolsVersions\4.0 MSBuildToolsPath MSBuild.exe
if not errorlevel 1 goto End
exit /B 1 exit /B 1
:End :End
exit /B 0 exit /B 0
:GetInstallPath
for /f "tokens=2,*" %%A in ('REG.exe query HKCU\SOFTWARE\%1 /v %2 2^>Nul') do (
if exist "%%B%%3" (
set MSBUILD_PATH="%%B%3"
exit /B 0
)
)
for /f "tokens=2,*" %%A in ('REG.exe query HKLM\SOFTWARE\%1 /v %2 2^>Nul') do (
if exist "%%B%3" (
set MSBUILD_PATH="%%B%3"
exit /B 0
)
)
for /f "tokens=2,*" %%A in ('REG.exe query HKCU\SOFTWARE\Wow6432Node\%1 /v %2 2^>Nul') do (
if exist "%%B%%3" (
set MSBUILD_PATH="%%B%3"
exit /B 0
)
)
for /f "tokens=2,*" %%A in ('REG.exe query HKLM\SOFTWARE\Wow6432Node\%1 /v %2 2^>Nul') do (
if exist "%%B%3" (
set MSBUILD_PATH="%%B%3"
exit /B 0
)
)
exit /B 1
+3 -2
View File
@@ -2,8 +2,9 @@
"Name": "Flax", "Name": "Flax",
"Version": { "Version": {
"Major": 1, "Major": 1,
"Minor": 6, "Minor": 7,
"Build": 6344 "Revision": 2,
"Build": 6407
}, },
"Company": "Flax", "Company": "Flax",
"Copyright": "Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.", "Copyright": "Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.",
+6
View File
@@ -248,6 +248,7 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=bitangent/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=bitangent/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=bitangents/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=bitangents/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Bokeh/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=Bokeh/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=borderless/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=BRDF/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=BRDF/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=coeff/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=coeff/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=colliders/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=colliders/@EntryIndexedValue">True</s:Boolean>
@@ -255,6 +256,8 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=comperand/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=comperand/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=coord/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=coord/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=cubemap/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=cubemap/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Deformer/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=deformers/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=defragmentation/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=defragmentation/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Delaunay/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=Delaunay/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Defocus/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=Defocus/@EntryIndexedValue">True</s:Boolean>
@@ -290,6 +293,8 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=lightmaps/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=lightmaps/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Linearize/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=Linearize/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=lods/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=lods/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Marshallable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=marshallers/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=mclass/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=mclass/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=memcpy/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=memcpy/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=metalness/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=metalness/@EntryIndexedValue">True</s:Boolean>
@@ -318,6 +323,7 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=raycast/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=raycast/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=raycasting/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=raycasting/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=raycasts/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=raycasts/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=reachability/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=readback/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=readback/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Reimports/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=Reimports/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=reimported/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=reimported/@EntryIndexedValue">True</s:Boolean>
+11 -4
View File
@@ -1,15 +1,22 @@
@echo off @echo off
:: Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
rem Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
setlocal setlocal
pushd pushd
echo Generating Flax Engine project files... echo Generating Flax Engine project files...
rem Run Flax.Build to generate Visual Studio solution and project files (also pass the arguments) :: Change the path to the script root
call "Development\Scripts\Windows\CallBuildTool.bat" -genproject %* cd /D "%~dp0"
:: Run Flax.Build to generate Visual Studio solution and project files (also pass the arguments)
call "Development\Scripts\Windows\CallBuildTool.bat" -genproject %*
if errorlevel 1 goto BuildToolFailed if errorlevel 1 goto BuildToolFailed
:: Build bindings for all editor configurations
echo Building C# bindings...
Binaries\Tools\Flax.Build.exe -build -BuildBindingsOnly -arch=x64 -platform=Windows --buildTargets=FlaxEditor
popd popd
echo Done! echo Done!
exit /B 0 exit /B 0
+5
View File
@@ -10,3 +10,8 @@ cd "`dirname "$0"`"
# Run Flax.Build to generate project files (also pass the arguments) # Run Flax.Build to generate project files (also pass the arguments)
bash ./Development/Scripts/Mac/CallBuildTool.sh --genproject "$@" bash ./Development/Scripts/Mac/CallBuildTool.sh --genproject "$@"
# Build bindings for all editor configurations
echo Building C# bindings...
# TODO: Detect the correct architecture here
Binaries/Tools/Flax.Build -build -BuildBindingsOnly -arch=ARM64 -platform=Mac --buildTargets=FlaxEditor
+5
View File
@@ -10,3 +10,8 @@ cd "`dirname "$0"`"
# Run Flax.Build to generate project files (also pass the arguments) # Run Flax.Build to generate project files (also pass the arguments)
bash ./Development/Scripts/Linux/CallBuildTool.sh --genproject "$@" bash ./Development/Scripts/Linux/CallBuildTool.sh --genproject "$@"
# Build bindings for all editor configurations
echo Building C# bindings...
# TODO: Detect the correct architecture here
Binaries/Tools/Flax.Build -build -BuildBindingsOnly -arch=x64 -platform=Linux --buildTargets=FlaxEditor
+1 -1
View File
@@ -7,7 +7,7 @@ pushd
echo Performing the full package... echo Performing the full package...
rem Run the build tool. rem Run the build tool.
call "Development\Scripts\Windows\CallBuildTool.bat" -deploy -deployEditor -deployPlatforms -verbose -log -logFile="Cache\Intermediate\PackageLog.txt" %* call "Development\Scripts\Windows\CallBuildTool.bat" -deploy -deployEditor -deployPlatforms -dotnet=7 -verbose -log -logFile="Cache\Intermediate\PackageLog.txt" %*
if errorlevel 1 goto BuildToolFailed if errorlevel 1 goto BuildToolFailed
popd popd
+1 -1
View File
@@ -7,7 +7,7 @@ pushd
echo Building and packaging Flax Editor... echo Building and packaging Flax Editor...
rem Run the build tool. rem Run the build tool.
call "Development\Scripts\Windows\CallBuildTool.bat" -deploy -deployEditor -verbose -log -logFile="Cache\Intermediate\PackageLog.txt" %* call "Development\Scripts\Windows\CallBuildTool.bat" -deploy -deployEditor -dotnet=7 -verbose -log -logFile="Cache\Intermediate\PackageLog.txt" %*
if errorlevel 1 goto BuildToolFailed if errorlevel 1 goto BuildToolFailed
popd popd
+1 -1
View File
@@ -9,4 +9,4 @@ echo Building and packaging Flax Editor...
cd "`dirname "$0"`" cd "`dirname "$0"`"
# Run Flax.Build (also pass the arguments) # Run Flax.Build (also pass the arguments)
bash ./Development/Scripts/Mac/CallBuildTool.sh --deploy --deployEditor --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@" bash ./Development/Scripts/Mac/CallBuildTool.sh --deploy --deployEditor --dotnet=7 --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@"
+1 -1
View File
@@ -9,4 +9,4 @@ echo Building and packaging Flax Editor...
cd "`dirname "$0"`" cd "`dirname "$0"`"
# Run Flax.Build (also pass the arguments) # Run Flax.Build (also pass the arguments)
bash ./Development/Scripts/Linux/CallBuildTool.sh --deploy --deployEditor --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@" bash ./Development/Scripts/Linux/CallBuildTool.sh --deploy --deployEditor --dotnet=7 --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@"
+1 -1
View File
@@ -7,7 +7,7 @@ pushd
echo Building and packaging platforms data... echo Building and packaging platforms data...
rem Run the build tool. rem Run the build tool.
call "Development\Scripts\Windows\CallBuildTool.bat" -deploy -deployPlatforms -verbose -log -logFile="Cache\Intermediate\PackageLog.txt" %* call "Development\Scripts\Windows\CallBuildTool.bat" -deploy -deployPlatforms -dotnet=7 -verbose -log -logFile="Cache\Intermediate\PackageLog.txt" %*
if errorlevel 1 goto BuildToolFailed if errorlevel 1 goto BuildToolFailed
popd popd
+1 -1
View File
@@ -9,4 +9,4 @@ echo Building and packaging platforms data...
cd "`dirname "$0"`" cd "`dirname "$0"`"
# Run Flax.Build (also pass the arguments) # Run Flax.Build (also pass the arguments)
bash ./Development/Scripts/Mac/CallBuildTool.sh --deploy --deployPlatforms --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@" bash ./Development/Scripts/Mac/CallBuildTool.sh --deploy --deployPlatforms --dotnet=7 --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@"
+1 -1
View File
@@ -9,4 +9,4 @@ echo Building and packaging platforms data...
cd "`dirname "$0"`" cd "`dirname "$0"`"
# Run Flax.Build (also pass the arguments) # Run Flax.Build (also pass the arguments)
bash ./Development/Scripts/Linux/CallBuildTool.sh --deploy --deployPlatforms --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@" bash ./Development/Scripts/Linux/CallBuildTool.sh --deploy --deployPlatforms --dotnet=7 --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@"
+5 -4
View File
@@ -4,7 +4,7 @@
<a href="https://flaxengine.com/discord"><img src="https://discordapp.com/api/guilds/437989205315158016/widget.png"/></a> <a href="https://flaxengine.com/discord"><img src="https://discordapp.com/api/guilds/437989205315158016/widget.png"/></a>
Flax Engine is a high quality modern 3D game engine written in C++ and C#. Flax Engine is a high quality modern 3D game engine written in C++ and C#.
From stunning graphics to powerful scripts - Flax can give everything for your games. Designed for fast workflow with many ready to use features waiting for you right now. To learn more see the website ([www.flaxengine.com](https://flaxengine.com)). From stunning graphics to powerful scripts, it's designed for fast workflow with many ready-to-use features waiting for you right now. To learn more see the website ([www.flaxengine.com](https://flaxengine.com)).
This repository contains full source code of the Flax Engine (excluding NDA-protected platforms support). Anyone is welcome to contribute or use the modified source in Flax-based games. This repository contains full source code of the Flax Engine (excluding NDA-protected platforms support). Anyone is welcome to contribute or use the modified source in Flax-based games.
@@ -31,19 +31,20 @@ Follow the instructions below to compile and run the engine from source.
* Install Visual Studio 2022 or newer * Install Visual Studio 2022 or newer
* Install Windows 8.1 SDK or newer (via Visual Studio Installer) * Install Windows 8.1 SDK or newer (via Visual Studio Installer)
* Install Microsoft Visual C++ 2015 v140 toolset or newer (via Visual Studio Installer) * Install Microsoft Visual C++ 2015 v140 toolset or newer (via Visual Studio Installer)
* Install .Net 7 SDK (via Visual Studio Installer or [from web](https://dotnet.microsoft.com/en-us/download/dotnet/7.0)) * Install .NET 7 SDK for **Windows x64** (via Visual Studio Installer or [from web](https://dotnet.microsoft.com/en-us/download/dotnet/7.0))
* Install Git with LFS * Install Git with LFS
* Clone repo (with LFS) * Clone repo (with LFS)
* Run **GenerateProjectFiles.bat** * Run **GenerateProjectFiles.bat**
* Open `Flax.sln` and set solution configuration to **Editor.Development** and solution platform to **Win64** * Open `Flax.sln` and set solution configuration to **Editor.Development** and solution platform to **Win64**
* Set Flax (C++) or FlaxEngine (C#) as startup project * Set Flax (C++) or FlaxEngine (C#) as startup project
* Compile Flax project (hit F7 or CTRL+Shift+B) * Compile Flax project (hit F7 or CTRL+Shift+B)
* Optionally set Debug Type to **Managed Only (.NET Core)** to debug C#-only, or **Mixed (.NET Core)** to debug both C++ and C#
* Run Flax (hit F5 key) * Run Flax (hit F5 key)
## Linux ## Linux
* Install Visual Studio Code * Install Visual Studio Code
* Install .Net 7 SDK ([https://dotnet.microsoft.com/en-us/download/dotnet/7.0](https://dotnet.microsoft.com/en-us/download/dotnet/7.0)) * Install .NET 7 SDK ([https://dotnet.microsoft.com/en-us/download/dotnet/7.0](https://dotnet.microsoft.com/en-us/download/dotnet/7.0))
* Ubuntu: `sudo apt install dotnet-sdk-7.0` * Ubuntu: `sudo apt install dotnet-sdk-7.0`
* Install Vulkan SDK ([https://vulkan.lunarg.com/](https://vulkan.lunarg.com/)) * Install Vulkan SDK ([https://vulkan.lunarg.com/](https://vulkan.lunarg.com/))
* Ubuntu: `sudo apt install vulkan-sdk` * Ubuntu: `sudo apt install vulkan-sdk`
@@ -66,7 +67,7 @@ Follow the instructions below to compile and run the engine from source.
## Mac ## Mac
* Install XCode * Install XCode
* Install .Net 7 SDK ([https://dotnet.microsoft.com/en-us/download/dotnet/7.0](https://dotnet.microsoft.com/en-us/download/dotnet/7.0)) * Install .NET 7 SDK ([https://dotnet.microsoft.com/en-us/download/dotnet/7.0](https://dotnet.microsoft.com/en-us/download/dotnet/7.0))
* Install Vulkan SDK ([https://vulkan.lunarg.com/](https://vulkan.lunarg.com/)) * Install Vulkan SDK ([https://vulkan.lunarg.com/](https://vulkan.lunarg.com/))
* Clone repo (with LFS) * Clone repo (with LFS)
* Run `GenerateProjectFiles.command` * Run `GenerateProjectFiles.command`
@@ -0,0 +1,292 @@
using System;
using System.IO;
using FlaxEditor.Scripting;
using FlaxEngine;
using FlaxEngine.Utilities;
namespace FlaxEditor.Content;
/// <summary>
/// Manages and converts the selected content item to the appropriate types. Useful for drag operations.
/// </summary>
public class AssetPickerValidator : IContentItemOwner
{
private Asset _selected;
private ContentItem _selectedItem;
private ScriptType _type;
private string _fileExtension;
/// <summary>
/// Gets or sets the selected item.
/// </summary>
public ContentItem SelectedItem
{
get => _selectedItem;
set
{
if (_selectedItem == value)
return;
if (value == null)
{
if (_selected == null && _selectedItem is SceneItem)
{
// Deselect scene reference
_selectedItem.RemoveReference(this);
_selectedItem = null;
_selected = null;
OnSelectedItemChanged();
return;
}
// Deselect
_selectedItem?.RemoveReference(this);
_selectedItem = null;
_selected = null;
OnSelectedItemChanged();
}
else if (value is SceneItem item)
{
if (_selectedItem == item)
return;
if (!IsValid(item))
item = null;
// Change value to scene reference (cannot load asset because scene can be already loaded - duplicated ID issue)
_selectedItem?.RemoveReference(this);
_selectedItem = item;
_selected = null;
_selectedItem?.AddReference(this);
OnSelectedItemChanged();
}
else if (value is AssetItem assetItem)
{
SelectedAsset = FlaxEngine.Content.LoadAsync(assetItem.ID);
}
else
{
// Change value
_selectedItem?.RemoveReference(this);
_selectedItem = value;
_selected = null;
OnSelectedItemChanged();
}
}
}
/// <summary>
/// Gets or sets the selected asset identifier.
/// </summary>
public Guid SelectedID
{
get
{
if (_selected != null)
return _selected.ID;
if (_selectedItem is AssetItem assetItem)
return assetItem.ID;
return Guid.Empty;
}
set => SelectedItem = Editor.Instance.ContentDatabase.FindAsset(value);
}
/// <summary>
/// Gets or sets the selected content item path.
/// </summary>
public string SelectedPath
{
get
{
string path = _selectedItem?.Path ?? _selected?.Path;
if (path != null)
{
// Convert into path relative to the project (cross-platform)
var projectFolder = Globals.ProjectFolder;
if (path.StartsWith(projectFolder))
path = path.Substring(projectFolder.Length + 1);
}
return path;
}
set
{
if (string.IsNullOrEmpty(value))
{
SelectedItem = null;
}
else
{
var path = StringUtils.IsRelative(value) ? Path.Combine(Globals.ProjectFolder, value) : value;
SelectedItem = Editor.Instance.ContentDatabase.Find(path);
}
}
}
/// <summary>
/// Gets or sets the selected asset object.
/// </summary>
public Asset SelectedAsset
{
get => _selected;
set
{
// Check if value won't change
if (value == _selected)
return;
// Find item from content database and check it
var item = value ? Editor.Instance.ContentDatabase.FindAsset(value.ID) : null;
if (item != null && !IsValid(item))
item = null;
// Change value
_selectedItem?.RemoveReference(this);
_selectedItem = item;
_selected = value;
_selectedItem?.AddReference(this);
OnSelectedItemChanged();
}
}
/// <summary>
/// Gets or sets the assets types that this picker accepts (it supports types derived from the given type). Use <see cref="ScriptType.Null"/> for generic file picker.
/// </summary>
public ScriptType AssetType
{
get => _type;
set
{
if (_type != value)
{
_type = value;
// Auto deselect if the current value is invalid
if (_selectedItem != null && !IsValid(_selectedItem))
SelectedItem = null;
}
}
}
/// <summary>
/// Gets or sets the content items extensions filter. Null if unused.
/// </summary>
public string FileExtension
{
get => _fileExtension;
set
{
if (_fileExtension != value)
{
_fileExtension = value;
// Auto deselect if the current value is invalid
if (_selectedItem != null && !IsValid(_selectedItem))
SelectedItem = null;
}
}
}
/// <summary>
/// Occurs when selected item gets changed.
/// </summary>
public event Action SelectedItemChanged;
/// <summary>
/// The custom callback for assets validation. Cane be used to implement a rule for assets to pick.
/// </summary>
public Func<ContentItem, bool> CheckValid;
/// <summary>
/// Returns whether item is valid.
/// </summary>
/// <param name="item"></param>
/// <returns></returns>
public bool IsValid(ContentItem item)
{
if (_fileExtension != null && !item.Path.EndsWith(_fileExtension))
return false;
if (CheckValid != null && !CheckValid(item))
return false;
if (_type == ScriptType.Null)
return true;
if (item is AssetItem assetItem)
{
// Faster path for binary items (in-built)
if (assetItem is BinaryAssetItem binaryItem)
return _type.IsAssignableFrom(new ScriptType(binaryItem.Type));
// Type filter
var type = TypeUtils.GetType(assetItem.TypeName);
if (_type.IsAssignableFrom(type))
return true;
// Json assets can contain any type of the object defined by the C# type (data oriented design)
if (assetItem is JsonAssetItem && (_type.Type == typeof(JsonAsset) || _type.Type == typeof(Asset)))
return true;
// Special case for scene asset references
if (_type.Type == typeof(SceneReference) && assetItem is SceneItem)
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the <see cref="AssetPickerValidator"/> class.
/// </summary>
public AssetPickerValidator()
: this(new ScriptType(typeof(Asset)))
{
}
/// <summary>
/// Initializes a new instance of the <see cref="AssetPickerValidator"/> class.
/// </summary>
/// <param name="assetType">The assets types that this picker accepts.</param>
public AssetPickerValidator(ScriptType assetType)
{
_type = assetType;
}
/// <summary>
/// Called when selected item gets changed.
/// </summary>
protected virtual void OnSelectedItemChanged()
{
SelectedItemChanged?.Invoke();
}
/// <inheritdoc />
public void OnItemDeleted(ContentItem item)
{
// Deselect item
SelectedItem = null;
}
/// <inheritdoc />
public void OnItemRenamed(ContentItem item)
{
}
/// <inheritdoc />
public void OnItemReimported(ContentItem item)
{
}
/// <inheritdoc />
public void OnItemDispose(ContentItem item)
{
// Deselect item
SelectedItem = null;
}
/// <summary>
/// Call to remove reference from the selected item.
/// </summary>
public void OnDestroy()
{
_selectedItem?.RemoveReference(this);
_selectedItem = null;
_selected = null;
}
}
@@ -1,6 +1,7 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved. // Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using FlaxEditor.GUI; using FlaxEditor.GUI;
using FlaxEditor.GUI.ContextMenu;
using FlaxEditor.GUI.Drag; using FlaxEditor.GUI.Drag;
using FlaxEngine; using FlaxEngine;
using FlaxEngine.GUI; using FlaxEngine.GUI;
@@ -31,7 +32,7 @@ namespace FlaxEditor.Content.GUI
: base(x, y, height) : base(x, y, height)
{ {
TargetNode = targetNode; TargetNode = targetNode;
Text = targetNode.NavButtonLabel + "/"; Text = targetNode.NavButtonLabel;
} }
/// <inheritdoc /> /// <inheritdoc />
@@ -72,7 +73,6 @@ namespace FlaxEditor.Content.GUI
if (_dragOverItems == null) if (_dragOverItems == null)
_dragOverItems = new DragItems(ValidateDragItem); _dragOverItems = new DragItems(ValidateDragItem);
_dragOverItems.OnDragEnter(data); _dragOverItems.OnDragEnter(data);
var result = GetDragEffect(data); var result = GetDragEffect(data);
_validDragOver = result != DragDropEffect.None; _validDragOver = result != DragDropEffect.None;
@@ -122,4 +122,70 @@ namespace FlaxEditor.Content.GUI
return result; return result;
} }
} }
sealed class ContentNavigationSeparator : ComboBox
{
public ContentNavigationButton Target;
public ContentNavigationSeparator(ContentNavigationButton target, float x, float y, float height)
{
Target = target;
Bounds = new Rectangle(x, y, 16, height);
Offsets = new Margin(Bounds.X, Bounds.Width, Bounds.Y, Bounds.Height);
UpdateTransform();
MaximumItemsInViewCount = 20;
var style = Style.Current;
BackgroundColor = style.BackgroundNormal;
BackgroundColorHighlighted = BackgroundColor;
BackgroundColorSelected = BackgroundColor;
}
protected override ContextMenu OnCreatePopup()
{
// Update items
ClearItems();
foreach (var child in Target.TargetNode.Children)
{
if (child is ContentTreeNode node)
{
if (node.Folder.VisibleInHierarchy) // Respect the filter set by ContentFilterConfig.Filter(...)
AddItem(node.Folder.ShortName);
}
}
return base.OnCreatePopup();
}
public override void Draw()
{
var style = Style.Current;
var rect = new Rectangle(Float2.Zero, Size);
var color = IsDragOver ? style.BackgroundSelected * 0.6f : (_mouseDown ? style.BackgroundSelected : (IsMouseOver ? style.BackgroundHighlighted : Color.Transparent));
Render2D.FillRectangle(rect, color);
Render2D.DrawSprite(Editor.Instance.Icons.ArrowRight12, new Rectangle(rect.Location.X, rect.Y + rect.Size.Y * 0.25f, rect.Size.X, rect.Size.X), EnabledInHierarchy ? style.Foreground : style.ForegroundDisabled);
}
protected override void OnLayoutMenuButton(ContextMenuButton button, int index, bool construct = false)
{
button.Icon = Editor.Instance.Icons.FolderClosed32;
if (_tooltips != null && _tooltips.Length > index)
button.TooltipText = _tooltips[index];
}
protected override void OnItemClicked(int index)
{
base.OnItemClicked(index);
var item = _items[index];
foreach (var child in Target.TargetNode.Children)
{
if (child is ContentTreeNode node && node.Folder.ShortName == item)
{
Editor.Instance.Windows.ContentWin.Navigate(node);
return;
}
}
}
}
} }
@@ -45,8 +45,14 @@ namespace FlaxEditor.Content.GUI
private void ImportActors(DragActors actors, ContentFolder location) private void ImportActors(DragActors actors, ContentFolder location)
{ {
// Use only the first actor foreach (var actorNode in actors.Objects)
Editor.Instance.Prefabs.CreatePrefab(actors.Objects[0].Actor); {
var actor = actorNode.Actor;
if (actors.Objects.Contains(actorNode.ParentNode as ActorNode))
continue;
Editor.Instance.Prefabs.CreatePrefab(actor, false);
}
} }
/// <inheritdoc /> /// <inheritdoc />
@@ -62,7 +68,7 @@ namespace FlaxEditor.Content.GUI
_validDragOver = true; _validDragOver = true;
result = DragDropEffect.Copy; result = DragDropEffect.Copy;
} }
else if (_dragActors.HasValidDrag) else if (_dragActors != null && _dragActors.HasValidDrag)
{ {
_validDragOver = true; _validDragOver = true;
result = DragDropEffect.Move; result = DragDropEffect.Move;
@@ -88,7 +94,7 @@ namespace FlaxEditor.Content.GUI
result = DragDropEffect.Copy; result = DragDropEffect.Copy;
} }
// Check if drop actor(s) // Check if drop actor(s)
else if (_dragActors.HasValidDrag) else if (_dragActors != null && _dragActors.HasValidDrag)
{ {
// Import actors // Import actors
var currentFolder = Editor.Instance.Windows.ContentWin.CurrentViewFolder; var currentFolder = Editor.Instance.Windows.ContentWin.CurrentViewFolder;
+22 -14
View File
@@ -220,8 +220,9 @@ namespace FlaxEditor.Content.GUI
// Remove references and unlink items // Remove references and unlink items
for (int i = 0; i < _items.Count; i++) for (int i = 0; i < _items.Count; i++)
{ {
_items[i].Parent = null; var item = _items[i];
_items[i].RemoveReference(this); item.Parent = null;
item.RemoveReference(this);
} }
_items.Clear(); _items.Clear();
@@ -261,11 +262,15 @@ namespace FlaxEditor.Content.GUI
ClearItems(); ClearItems();
// Add references and link items // Add references and link items
_items.AddRange(items);
for (int i = 0; i < items.Count; i++) for (int i = 0; i < items.Count; i++)
{ {
items[i].Parent = this; var item = items[i];
items[i].AddReference(this); if (item.Visible && !_items.Contains(item))
{
item.Parent = this;
item.AddReference(this);
_items.Add(item);
}
} }
if (selection != null) if (selection != null)
{ {
@@ -276,6 +281,8 @@ namespace FlaxEditor.Content.GUI
// Sort items depending on sortMethod parameter // Sort items depending on sortMethod parameter
_children.Sort(((control, control1) => _children.Sort(((control, control1) =>
{ {
if (control == null || control1 == null)
return 0;
if (sortType == SortType.AlphabeticReverse) if (sortType == SortType.AlphabeticReverse)
{ {
if (control.CompareTo(control1) > 0) if (control.CompareTo(control1) > 0)
@@ -517,8 +524,8 @@ namespace FlaxEditor.Content.GUI
{ {
int min = _selection.Min(x => x.IndexInParent); int min = _selection.Min(x => x.IndexInParent);
int max = _selection.Max(x => x.IndexInParent); int max = _selection.Max(x => x.IndexInParent);
min = Mathf.Min(min, item.IndexInParent); min = Mathf.Max(Mathf.Min(min, item.IndexInParent), 0);
max = Mathf.Max(max, item.IndexInParent); max = Mathf.Min(Mathf.Max(max, item.IndexInParent), _children.Count - 1);
var selection = new List<ContentItem>(_selection); var selection = new List<ContentItem>(_selection);
for (int i = min; i <= max; i++) for (int i = min; i <= max; i++)
{ {
@@ -711,7 +718,7 @@ namespace FlaxEditor.Content.GUI
protected override void PerformLayoutBeforeChildren() protected override void PerformLayoutBeforeChildren()
{ {
float width = GetClientArea().Width; float width = GetClientArea().Width;
float x = 0, y = 0; float x = 0, y = 1;
float viewScale = _viewScale * 0.97f; float viewScale = _viewScale * 0.97f;
switch (ViewType) switch (ViewType)
@@ -722,21 +729,22 @@ namespace FlaxEditor.Content.GUI
int itemsToFit = Mathf.FloorToInt(width / defaultItemsWidth) - 1; int itemsToFit = Mathf.FloorToInt(width / defaultItemsWidth) - 1;
if (itemsToFit < 1) if (itemsToFit < 1)
itemsToFit = 1; itemsToFit = 1;
float itemsWidth = width / Mathf.Max(itemsToFit, 1); int xSpace = 4;
float itemsWidth = width / Mathf.Max(itemsToFit, 1) - xSpace;
float itemsHeight = itemsWidth / defaultItemsWidth * (ContentItem.DefaultHeight * viewScale); float itemsHeight = itemsWidth / defaultItemsWidth * (ContentItem.DefaultHeight * viewScale);
var flooredItemsWidth = Mathf.Floor(itemsWidth); var flooredItemsWidth = Mathf.Floor(itemsWidth);
var flooredItemsHeight = Mathf.Floor(itemsHeight); var flooredItemsHeight = Mathf.Floor(itemsHeight);
x = itemsToFit == 1 ? 0 : itemsWidth / itemsToFit; x = itemsToFit == 1 ? 1 : itemsWidth / itemsToFit + xSpace;
for (int i = 0; i < _children.Count; i++) for (int i = 0; i < _children.Count; i++)
{ {
var c = _children[i]; var c = _children[i];
c.Bounds = new Rectangle(Mathf.Floor(x), Mathf.Floor(y), flooredItemsWidth, flooredItemsHeight); c.Bounds = new Rectangle(Mathf.Floor(x), Mathf.Floor(y), flooredItemsWidth, flooredItemsHeight);
x += itemsWidth + itemsWidth / itemsToFit; x += (itemsWidth + xSpace) + (itemsWidth + xSpace) / itemsToFit;
if (x + itemsWidth > width) if (x + itemsWidth > width)
{ {
x = itemsToFit == 1 ? 0 : itemsWidth / itemsToFit; x = itemsToFit == 1 ? 1 : itemsWidth / itemsToFit + xSpace;
y += itemsHeight + 5; y += itemsHeight + 7;
} }
} }
if (x > 0) if (x > 0)
@@ -751,7 +759,7 @@ namespace FlaxEditor.Content.GUI
{ {
var c = _children[i]; var c = _children[i];
c.Bounds = new Rectangle(x, y, width, itemsHeight); c.Bounds = new Rectangle(x, y, width, itemsHeight);
y += itemsHeight + 5; y += itemsHeight + 1;
} }
y += 40.0f; y += 40.0f;
@@ -1,144 +1,52 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved. // Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using System.ComponentModel; using System.Collections.Generic;
using System.Reflection; using FlaxEditor.CustomEditors.Editors;
using System.Runtime.InteropServices; using FlaxEditor.Scripting;
using FlaxEngine; using FlaxEngine;
using FlaxEngine.Interop; using FlaxEngine.Tools;
namespace FlaxEngine.Tools
{
partial class AudioTool
{
partial struct Options
{
private bool ShowBtiDepth => Format != AudioFormat.Vorbis;
}
}
}
namespace FlaxEditor.CustomEditors.Dedicated
{
/// <summary>
/// Custom editor for <see cref="FlaxEngine.Tools.AudioTool.Options"/>.
/// </summary>
[CustomEditor(typeof(FlaxEngine.Tools.AudioTool.Options)), DefaultEditor]
public class AudioToolOptionsEditor : GenericEditor
{
/// <inheritdoc />
protected override List<ItemInfo> GetItemsForType(ScriptType type)
{
// Show both fields and properties
return GetItemsForType(type, true, true);
}
}
}
namespace FlaxEditor.Content.Import namespace FlaxEditor.Content.Import
{ {
/// <summary> /// <summary>
/// Proxy object to present audio import settings in <see cref="ImportFilesDialog"/>. /// Proxy object to present audio import settings in <see cref="ImportFilesDialog"/>.
/// </summary> /// </summary>
[HideInEditor]
public class AudioImportSettings public class AudioImportSettings
{ {
/// <summary> /// <summary>
/// A custom set of bit depth audio import sizes. /// The settings data.
/// </summary> /// </summary>
public enum CustomBitDepth [EditorDisplay(null, EditorDisplayAttribute.InlineStyle)]
{ public AudioTool.Options Settings = AudioTool.Options.Default;
/// <summary>
/// The 8.
/// </summary>
_8 = 8,
/// <summary>
/// The 16.
/// </summary>
_16 = 16,
/// <summary>
/// The 24.
/// </summary>
_24 = 24,
/// <summary>
/// The 32.
/// </summary>
_32 = 32,
}
/// <summary>
/// Converts the bit depth to enum.
/// </summary>
/// <param name="f">The bit depth.</param>
/// <returns>The converted enum.</returns>
public static CustomBitDepth ConvertBitDepth(int f)
{
FieldInfo[] fields = typeof(CustomBitDepth).GetFields();
for (int i = 0; i < fields.Length; i++)
{
var field = fields[i];
if (field.Name.Equals("value__"))
continue;
if (f == (int)field.GetRawConstantValue())
return (CustomBitDepth)f;
}
return CustomBitDepth._16;
}
/// <summary>
/// The audio data format to import the audio clip as.
/// </summary>
[EditorOrder(10), DefaultValue(AudioFormat.Vorbis), Tooltip("The audio data format to import the audio clip as.")]
public AudioFormat Format { get; set; } = AudioFormat.Vorbis;
/// <summary>
/// The audio data compression quality. Used only if target format is using compression. Value 0 means the smallest size, value 1 means the best quality.
/// </summary>
[EditorOrder(15), DefaultValue(0.4f), Limit(0, 1, 0.01f), Tooltip("The audio data compression quality. Used only if target format is using compression. Value 0 means the smallest size, value 1 means the best quality.")]
public float CompressionQuality { get; set; } = 0.4f;
/// <summary>
/// Disables dynamic audio streaming. The whole clip will be loaded into the memory. Useful for small clips (eg. gunfire sounds).
/// </summary>
[EditorOrder(20), DefaultValue(false), Tooltip("Disables dynamic audio streaming. The whole clip will be loaded into the memory. Useful for small clips (eg. gunfire sounds).")]
public bool DisableStreaming { get; set; } = false;
/// <summary>
/// Checks should the clip be played as spatial (3D) audio or as normal audio. 3D audio is stored in Mono format.
/// </summary>
[EditorOrder(30), DefaultValue(false), EditorDisplay(null, "Is 3D"), Tooltip("Checks should the clip be played as spatial (3D) audio or as normal audio. 3D audio is stored in Mono format.")]
public bool Is3D { get; set; } = false;
/// <summary>
/// The size of a single sample in bits. The clip will be converted to this bit depth on import.
/// </summary>
[EditorOrder(40), DefaultValue(CustomBitDepth._16), Tooltip("The size of a single sample in bits. The clip will be converted to this bit depth on import.")]
public CustomBitDepth BitDepth { get; set; } = CustomBitDepth._16;
[StructLayout(LayoutKind.Sequential)]
internal struct InternalOptions
{
[MarshalAs(UnmanagedType.I1)]
public AudioFormat Format;
public byte DisableStreaming;
public byte Is3D;
public int BitDepth;
public float Quality;
}
internal void ToInternal(out InternalOptions options)
{
options = new InternalOptions
{
Format = Format,
DisableStreaming = (byte)(DisableStreaming ? 1 : 0),
Is3D = (byte)(Is3D ? 1 : 0),
Quality = CompressionQuality,
BitDepth = (int)BitDepth,
};
}
internal void FromInternal(ref InternalOptions options)
{
Format = options.Format;
DisableStreaming = options.DisableStreaming != 0;
Is3D = options.Is3D != 0;
CompressionQuality = options.Quality;
BitDepth = ConvertBitDepth(options.BitDepth);
}
/// <summary>
/// Tries the restore the asset import options from the target resource file.
/// </summary>
/// <param name="options">The options.</param>
/// <param name="assetPath">The asset path.</param>
/// <returns>True settings has been restored, otherwise false.</returns>
public static bool TryRestore(ref AudioImportSettings options, string assetPath)
{
if (AudioImportEntry.Internal_GetAudioImportOptions(assetPath, out var internalOptions))
{
// Restore settings
options.FromInternal(ref internalOptions);
return true;
}
return false;
}
} }
/// <summary> /// <summary>
@@ -147,7 +55,7 @@ namespace FlaxEditor.Content.Import
/// <seealso cref="AssetImportEntry" /> /// <seealso cref="AssetImportEntry" />
public partial class AudioImportEntry : AssetImportEntry public partial class AudioImportEntry : AssetImportEntry
{ {
private AudioImportSettings _settings = new AudioImportSettings(); private AudioImportSettings _settings = new();
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="AudioImportEntry"/> class. /// Initializes a new instance of the <see cref="AudioImportEntry"/> class.
@@ -157,7 +65,7 @@ namespace FlaxEditor.Content.Import
: base(ref request) : base(ref request)
{ {
// Try to restore target asset Audio import options (useful for fast reimport) // Try to restore target asset Audio import options (useful for fast reimport)
AudioImportSettings.TryRestore(ref _settings, ResultUrl); Editor.TryRestoreImportOptions(ref _settings.Settings, ResultUrl);
} }
/// <inheritdoc /> /// <inheritdoc />
@@ -166,27 +74,23 @@ namespace FlaxEditor.Content.Import
/// <inheritdoc /> /// <inheritdoc />
public override bool TryOverrideSettings(object settings) public override bool TryOverrideSettings(object settings)
{ {
if (settings is AudioImportSettings o) if (settings is AudioImportSettings s)
{ {
_settings = o; _settings.Settings = s.Settings;
return true;
}
if (settings is AudioTool.Options o)
{
_settings.Settings = o;
return true; return true;
} }
return false; return false;
} }
/// <inheritdoc /> /// <inheritdoc />
public override bool Import() public override bool Import()
{ {
return Editor.Import(SourceUrl, ResultUrl, _settings); return Editor.Import(SourceUrl, ResultUrl, _settings.Settings);
} }
#region Internal Calls
[LibraryImport("FlaxEngine", EntryPoint = "AudioImportEntryInternal_GetAudioImportOptions", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(StringMarshaller))]
[return: MarshalAs(UnmanagedType.U1)]
internal static partial bool Internal_GetAudioImportOptions(string path, out AudioImportSettings.InternalOptions result);
#endregion
} }
} }
@@ -139,7 +139,7 @@ namespace FlaxEditor.Content.Import
var menu = new ContextMenu(); var menu = new ContextMenu();
menu.AddButton("Rename", OnRenameClicked); menu.AddButton("Rename", OnRenameClicked);
menu.AddButton("Don't import", OnDontImportClicked); menu.AddButton("Don't import", OnDontImportClicked);
menu.AddButton("Show in Explorer", OnShowInExplorerClicked); menu.AddButton(Utilities.Constants.ShowInExplorer, OnShowInExplorerClicked);
menu.Tag = node; menu.Tag = node;
menu.Show(node, location); menu.Show(node, location);
} }
@@ -12,13 +12,14 @@ namespace FlaxEngine.Tools
{ {
partial struct Options partial struct Options
{ {
private bool ShowGeometry => Type == ModelTool.ModelType.Model || Type == ModelTool.ModelType.SkinnedModel; private bool ShowGeometry => Type == ModelType.Model || Type == ModelType.SkinnedModel || Type == ModelType.Prefab;
private bool ShowModel => Type == ModelTool.ModelType.Model; private bool ShowModel => Type == ModelType.Model || Type == ModelType.Prefab;
private bool ShowSkinnedModel => Type == ModelTool.ModelType.SkinnedModel; private bool ShowSkinnedModel => Type == ModelType.SkinnedModel || Type == ModelType.Prefab;
private bool ShowAnimation => Type == ModelTool.ModelType.Animation; private bool ShowAnimation => Type == ModelType.Animation || Type == ModelType.Prefab;
private bool ShowSmoothingNormalsAngle => ShowGeometry && CalculateNormals; private bool ShowSmoothingNormalsAngle => ShowGeometry && CalculateNormals;
private bool ShowSmoothingTangentsAngle => ShowGeometry && CalculateTangents; private bool ShowSmoothingTangentsAngle => ShowGeometry && CalculateTangents;
private bool ShowFramesRange => ShowAnimation && Duration == ModelTool.AnimationDuration.Custom; private bool ShowFramesRange => ShowAnimation && Duration == AnimationDuration.Custom;
private bool ShowSplitting => Type != ModelType.Prefab;
} }
} }
} }
+79 -15
View File
@@ -323,8 +323,6 @@ namespace FlaxEditor.Content
/// <param name="value">The new path.</param> /// <param name="value">The new path.</param>
internal virtual void UpdatePath(string value) internal virtual void UpdatePath(string value)
{ {
Assert.AreNotEqual(Path, value);
// Set path // Set path
Path = StringUtils.NormalizePath(value); Path = StringUtils.NormalizePath(value);
FileName = System.IO.Path.GetFileName(value); FileName = System.IO.Path.GetFileName(value);
@@ -441,6 +439,9 @@ namespace FlaxEditor.Content
{ {
get get
{ {
// Skip when hidden
if (!Visible)
return Rectangle.Empty;
var view = Parent as ContentView; var view = Parent as ContentView;
var size = Size; var size = Size;
switch (view?.ViewType ?? ContentViewType.Tiles) switch (view?.ViewType ?? ContentViewType.Tiles)
@@ -484,6 +485,30 @@ namespace FlaxEditor.Content
Render2D.FillRectangle(rectangle, Color.Black); Render2D.FillRectangle(rectangle, Color.Black);
} }
/// <summary>
/// Draws the item thumbnail.
/// </summary>
/// <param name="rectangle">The thumbnail rectangle.</param>
/// /// <param name="shadow">Whether or not to draw the shadow. Overrides DrawShadow.</param>
public void DrawThumbnail(ref Rectangle rectangle, bool shadow)
{
// Draw shadow
if (shadow)
{
const float thumbnailInShadowSize = 50.0f;
var shadowRect = rectangle.MakeExpanded((DefaultThumbnailSize - thumbnailInShadowSize) * rectangle.Width / DefaultThumbnailSize * 1.3f);
if (!_shadowIcon.IsValid)
_shadowIcon = Editor.Instance.Icons.AssetShadow128;
Render2D.DrawSprite(_shadowIcon, shadowRect);
}
// Draw thumbnail
if (_thumbnail.IsValid)
Render2D.DrawSprite(_thumbnail, rectangle);
else
Render2D.FillRectangle(rectangle, Color.Black);
}
/// <summary> /// <summary>
/// Gets the amount of references to that item. /// Gets the amount of references to that item.
/// </summary> /// </summary>
@@ -642,7 +667,6 @@ namespace FlaxEditor.Content
/// <inheritdoc /> /// <inheritdoc />
public override void Draw() public override void Draw()
{ {
// Cache data
var size = Size; var size = Size;
var style = Style.Current; var style = Style.Current;
var view = Parent as ContentView; var view = Parent as ContentView;
@@ -655,9 +679,51 @@ namespace FlaxEditor.Content
{ {
case ContentViewType.Tiles: case ContentViewType.Tiles:
{ {
var thumbnailSize = size.X - 2 * DefaultMarginSize; var thumbnailSize = size.X;
thumbnailRect = new Rectangle(DefaultMarginSize, DefaultMarginSize, thumbnailSize, thumbnailSize); thumbnailRect = new Rectangle(0, 0, thumbnailSize, thumbnailSize);
nameAlignment = TextAlignment.Center; nameAlignment = TextAlignment.Center;
if (this is ContentFolder)
{
// Small shadow
var shadowRect = new Rectangle(2, 2, clientRect.Width + 1, clientRect.Height + 1);
var color = Color.Black.AlphaMultiplied(0.2f);
Render2D.FillRectangle(shadowRect, color);
Render2D.FillRectangle(clientRect, style.Background.RGBMultiplied(1.25f));
if (isSelected)
Render2D.FillRectangle(clientRect, Parent.ContainsFocus ? style.BackgroundSelected : style.LightBackground);
else if (IsMouseOver)
Render2D.FillRectangle(clientRect, style.BackgroundHighlighted);
DrawThumbnail(ref thumbnailRect, false);
}
else
{
// Small shadow
var shadowRect = new Rectangle(2, 2, clientRect.Width + 1, clientRect.Height + 1);
var color = Color.Black.AlphaMultiplied(0.2f);
Render2D.FillRectangle(shadowRect, color);
Render2D.FillRectangle(clientRect, style.Background.RGBMultiplied(1.25f));
Render2D.FillRectangle(TextRectangle, style.LightBackground);
var accentHeight = 2 * view.ViewScale;
var barRect = new Rectangle(0, thumbnailRect.Height - accentHeight, clientRect.Width, accentHeight);
Render2D.FillRectangle(barRect, Color.DimGray);
DrawThumbnail(ref thumbnailRect, false);
if (isSelected)
{
Render2D.FillRectangle(textRect, Parent.ContainsFocus ? style.BackgroundSelected : style.LightBackground);
Render2D.DrawRectangle(clientRect, Parent.ContainsFocus ? style.BackgroundSelected : style.LightBackground);
}
else if (IsMouseOver)
{
Render2D.FillRectangle(textRect, style.BackgroundHighlighted);
Render2D.DrawRectangle(clientRect, style.BackgroundHighlighted);
}
}
break; break;
} }
case ContentViewType.List: case ContentViewType.List:
@@ -665,23 +731,21 @@ namespace FlaxEditor.Content
var thumbnailSize = size.Y - 2 * DefaultMarginSize; var thumbnailSize = size.Y - 2 * DefaultMarginSize;
thumbnailRect = new Rectangle(DefaultMarginSize, DefaultMarginSize, thumbnailSize, thumbnailSize); thumbnailRect = new Rectangle(DefaultMarginSize, DefaultMarginSize, thumbnailSize, thumbnailSize);
nameAlignment = TextAlignment.Near; nameAlignment = TextAlignment.Near;
if (isSelected)
Render2D.FillRectangle(clientRect, Parent.ContainsFocus ? style.BackgroundSelected : style.LightBackground);
else if (IsMouseOver)
Render2D.FillRectangle(clientRect, style.BackgroundHighlighted);
DrawThumbnail(ref thumbnailRect);
break; break;
} }
default: throw new ArgumentOutOfRangeException(); default: throw new ArgumentOutOfRangeException();
} }
// Draw background
if (isSelected)
Render2D.FillRectangle(clientRect, Parent.ContainsFocus ? style.BackgroundSelected : style.LightBackground);
else if (IsMouseOver)
Render2D.FillRectangle(clientRect, style.BackgroundHighlighted);
// Draw preview
DrawThumbnail(ref thumbnailRect);
// Draw short name // Draw short name
Render2D.PushClip(ref textRect); Render2D.PushClip(ref textRect);
Render2D.DrawText(style.FontMedium, ShowFileExtension || view.ShowFileExtensions ? FileName : ShortName, textRect, style.Foreground, nameAlignment, TextAlignment.Center, TextWrapping.WrapWords, 0.75f, 0.95f); Render2D.DrawText(style.FontMedium, ShowFileExtension || view.ShowFileExtensions ? FileName : ShortName, textRect, style.Foreground, nameAlignment, TextAlignment.Center, TextWrapping.WrapWords, 1f, 0.95f);
Render2D.PopClip(); Render2D.PopClip();
} }
+1 -1
View File
@@ -30,7 +30,7 @@ namespace FlaxEditor.Content
ShowFileExtension = true; ShowFileExtension = true;
} }
private static string FilterScriptName(string input) internal static string FilterScriptName(string input)
{ {
var length = input.Length; var length = input.Length;
var sb = new StringBuilder(length); var sb = new StringBuilder(length);
+13 -6
View File
@@ -5,6 +5,7 @@
#include "Engine/Graphics/GPUContext.h" #include "Engine/Graphics/GPUContext.h"
#include "Engine/Threading/Threading.h" #include "Engine/Threading/Threading.h"
#include "Engine/Graphics/RenderTools.h" #include "Engine/Graphics/RenderTools.h"
#include "Engine/Content/Content.h"
#include "Engine/Content/Factories/BinaryAssetFactory.h" #include "Engine/Content/Factories/BinaryAssetFactory.h"
#include "Engine/ContentImporters/AssetsImportingManager.h" #include "Engine/ContentImporters/AssetsImportingManager.h"
#include "Engine/Content/Upgraders/TextureAssetUpgrader.h" #include "Engine/Content/Upgraders/TextureAssetUpgrader.h"
@@ -92,15 +93,12 @@ SpriteHandle PreviewsCache::FindSlot(const Guid& id)
{ {
if (WaitForLoaded()) if (WaitForLoaded())
return SpriteHandle::Invalid; return SpriteHandle::Invalid;
// Find entry
int32 index; int32 index;
if (_assets.Find(id, index)) if (_assets.Find(id, index))
{ {
const String spriteName = StringUtils::ToString(index); const String spriteName = StringUtils::ToString(index);
return FindSprite(spriteName); return FindSprite(spriteName);
} }
return SpriteHandle::Invalid; return SpriteHandle::Invalid;
} }
@@ -114,6 +112,17 @@ Asset::LoadResult PreviewsCache::load()
return LoadResult::Failed; return LoadResult::Failed;
_assets.Set(previewsMetaChunk->Get<Guid>(), ASSETS_ICONS_PER_ATLAS); _assets.Set(previewsMetaChunk->Get<Guid>(), ASSETS_ICONS_PER_ATLAS);
// Verify if cached assets still exist (don't store thumbnails for removed files)
AssetInfo assetInfo;
for (Guid& id : _assets)
{
if (id.IsValid() && Content::GetAsset(id) == nullptr && !Content::GetAssetInfo(id, assetInfo))
{
// Free slot (no matter the texture contents)
id = Guid::Empty;
}
}
// Setup atlas sprites array // Setup atlas sprites array
Sprite sprite; Sprite sprite;
sprite.Area.Size = static_cast<float>(ASSET_ICON_SIZE) / ASSETS_ICONS_ATLAS_SIZE; sprite.Area.Size = static_cast<float>(ASSET_ICON_SIZE) / ASSETS_ICONS_ATLAS_SIZE;
@@ -162,7 +171,7 @@ SpriteHandle PreviewsCache::OccupySlot(GPUTexture* source, const Guid& id)
if (WaitForLoaded()) if (WaitForLoaded())
return SpriteHandle::Invalid; return SpriteHandle::Invalid;
// Find free slot and for that asset // Find this asset slot or use the first empty
int32 index = _assets.Find(id); int32 index = _assets.Find(id);
if (index == INVALID_INDEX) if (index == INVALID_INDEX)
index = _assets.Find(Guid::Empty); index = _assets.Find(Guid::Empty);
@@ -201,14 +210,12 @@ bool PreviewsCache::ReleaseSlot(const Guid& id)
{ {
bool result = false; bool result = false;
ScopeLock lock(Locker); ScopeLock lock(Locker);
int32 index = _assets.Find(id); int32 index = _assets.Find(id);
if (index != INVALID_INDEX) if (index != INVALID_INDEX)
{ {
_assets[index] = Guid::Empty; _assets[index] = Guid::Empty;
result = true; result = true;
} }
return result; return result;
} }
@@ -0,0 +1,66 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using System;
using System.IO;
using FlaxEditor.Content.Thumbnails;
using FlaxEditor.Windows;
using FlaxEditor.Windows.Assets;
using FlaxEngine;
using FlaxEngine.GUI;
namespace FlaxEditor.Content
{
/// <summary>
/// A <see cref="BehaviorTree"/> asset proxy object.
/// </summary>
/// <seealso cref="FlaxEditor.Content.BinaryAssetProxy" />
[ContentContextMenu("New/AI/Behavior Tree")]
public class BehaviorTreeProxy : BinaryAssetProxy
{
/// <inheritdoc />
public override string Name => "Behavior Tree";
/// <inheritdoc />
public override bool CanReimport(ContentItem item)
{
return true;
}
/// <inheritdoc />
public override EditorWindow Open(Editor editor, ContentItem item)
{
return new BehaviorTreeWindow(editor, item as BinaryAssetItem);
}
/// <inheritdoc />
public override Color AccentColor => Color.FromRGB(0x3256A8);
/// <inheritdoc />
public override Type AssetType => typeof(BehaviorTree);
/// <inheritdoc />
public override bool CanCreate(ContentFolder targetLocation)
{
return targetLocation.CanHaveAssets;
}
/// <inheritdoc />
public override void Create(string outputPath, object arg)
{
if (Editor.CreateAsset(Editor.NewAssetType.BehaviorTree, outputPath))
throw new Exception("Failed to create new asset.");
}
/// <inheritdoc />
public override void OnThumbnailDrawBegin(ThumbnailRequest request, ContainerControl guiRoot, GPUContext context)
{
guiRoot.AddChild(new Label
{
Text = Path.GetFileNameWithoutExtension(request.Asset.Path),
Offsets = Margin.Zero,
AnchorPreset = AnchorPresets.StretchAll,
Wrapping = TextWrapping.WrapWords
});
}
}
}
@@ -54,12 +54,7 @@ namespace FlaxEditor.Content
/// <inheritdoc /> /// <inheritdoc />
public override bool CanDrawThumbnail(ThumbnailRequest request) public override bool CanDrawThumbnail(ThumbnailRequest request)
{ {
if (!_preview.HasLoadedAssets) return _preview.HasLoadedAssets && ThumbnailsModule.HasMinimumQuality((CubeTexture)request.Asset);
return false;
// Check if all mip maps are streamed
var asset = (CubeTexture)request.Asset;
return asset.ResidentMipLevels >= Mathf.Max(1, (int)(asset.MipLevels * ThumbnailsModule.MinimumRequiredResourcesQuality));
} }
/// <inheritdoc /> /// <inheritdoc />
@@ -62,7 +62,7 @@ namespace FlaxEditor.Content
/// <inheritdoc /> /// <inheritdoc />
public override bool CanDrawThumbnail(ThumbnailRequest request) public override bool CanDrawThumbnail(ThumbnailRequest request)
{ {
return _preview.HasLoadedAssets; return _preview.HasLoadedAssets && ThumbnailsModule.HasMinimumQuality((MaterialInstance)request.Asset);
} }
/// <inheritdoc /> /// <inheritdoc />
+1 -1
View File
@@ -106,7 +106,7 @@ namespace FlaxEditor.Content
/// <inheritdoc /> /// <inheritdoc />
public override bool CanDrawThumbnail(ThumbnailRequest request) public override bool CanDrawThumbnail(ThumbnailRequest request)
{ {
return _preview.HasLoadedAssets; return _preview.HasLoadedAssets && ThumbnailsModule.HasMinimumQuality((Material)request.Asset);
} }
/// <inheritdoc /> /// <inheritdoc />
+6 -7
View File
@@ -72,7 +72,10 @@ namespace FlaxEditor.Content
{ {
if (_preview == null) if (_preview == null)
{ {
_preview = new ModelPreview(false); _preview = new ModelPreview(false)
{
ScaleToFit = false,
};
InitAssetPreview(_preview); InitAssetPreview(_preview);
} }
@@ -82,12 +85,7 @@ namespace FlaxEditor.Content
/// <inheritdoc /> /// <inheritdoc />
public override bool CanDrawThumbnail(ThumbnailRequest request) public override bool CanDrawThumbnail(ThumbnailRequest request)
{ {
if (!_preview.HasLoadedAssets) return _preview.HasLoadedAssets && ThumbnailsModule.HasMinimumQuality((Model)request.Asset);
return false;
// Check if asset is streamed enough
var asset = (Model)request.Asset;
return asset.LoadedLODs >= Mathf.Max(1, (int)(asset.LODs.Length * ThumbnailsModule.MinimumRequiredResourcesQuality));
} }
/// <inheritdoc /> /// <inheritdoc />
@@ -96,6 +94,7 @@ namespace FlaxEditor.Content
_preview.Model = (Model)request.Asset; _preview.Model = (Model)request.Asset;
_preview.Parent = guiRoot; _preview.Parent = guiRoot;
_preview.SyncBackbufferSize(); _preview.SyncBackbufferSize();
_preview.ViewportCamera.SetArcBallView(_preview.Model.GetBox());
_preview.Task.OnDraw(); _preview.Task.OnDraw();
} }
+17
View File
@@ -1,6 +1,7 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved. // Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using System; using System;
using FlaxEditor.GUI.ContextMenu;
using FlaxEditor.Windows; using FlaxEditor.Windows;
using FlaxEngine; using FlaxEngine;
@@ -30,6 +31,12 @@ namespace FlaxEditor.Content
return item is SceneItem; return item is SceneItem;
} }
/// <inheritdoc />
public override bool AcceptsAsset(string typeName, string path)
{
return (typeName == Scene.AssetTypename || typeName == Scene.EditorPickerTypename) && path.EndsWith(FileExtension, StringComparison.OrdinalIgnoreCase);
}
/// <inheritdoc /> /// <inheritdoc />
public override bool CanCreate(ContentFolder targetLocation) public override bool CanCreate(ContentFolder targetLocation)
{ {
@@ -62,5 +69,15 @@ namespace FlaxEditor.Content
{ {
return new SceneItem(path, id); return new SceneItem(path, id);
} }
/// <inheritdoc />
public override void OnContentWindowContextMenu(ContextMenu menu, ContentItem item)
{
var id = ((SceneItem)item).ID;
if (Level.FindScene(id) == null)
{
menu.AddButton("Open (additive)", () => { Editor.Instance.Scene.OpenScene(id, true); });
}
}
} }
} }
+1 -1
View File
@@ -29,7 +29,7 @@ namespace FlaxEditor.Content
if (asset) if (asset)
{ {
var source = Editor.GetShaderSourceCode(asset); var source = Editor.GetShaderSourceCode(asset);
Utilities.Utils.ShowSourceCodeWindow(source, "Shader Source", item.RootWindow.Window); Utilities.Utils.ShowSourceCodeWindow(source, "Shader Source", item.RootWindow?.Window);
} }
return null; return null;
} }
@@ -54,15 +54,7 @@ namespace FlaxEditor.Content
/// <inheritdoc /> /// <inheritdoc />
public override bool CanDrawThumbnail(ThumbnailRequest request) public override bool CanDrawThumbnail(ThumbnailRequest request)
{ {
if (!_preview.HasLoadedAssets) return _preview.HasLoadedAssets && ThumbnailsModule.HasMinimumQuality((SkinnedModel)request.Asset);
return false;
// Check if asset is streamed enough
var asset = (SkinnedModel)request.Asset;
var lods = asset.LODs.Length;
if (asset.IsLoaded && lods == 0)
return true; // Skeleton-only model
return asset.LoadedLODs >= Mathf.Max(1, (int)(lods * ThumbnailsModule.MinimumRequiredResourcesQuality));
} }
/// <inheritdoc /> /// <inheritdoc />
+1 -5
View File
@@ -57,11 +57,7 @@ namespace FlaxEditor.Content
/// <inheritdoc /> /// <inheritdoc />
public override bool CanDrawThumbnail(ThumbnailRequest request) public override bool CanDrawThumbnail(ThumbnailRequest request)
{ {
// Check if asset is streamed enough return ThumbnailsModule.HasMinimumQuality((Texture)request.Asset);
var asset = (Texture)request.Asset;
var mipLevels = asset.MipLevels;
var minMipLevels = Mathf.Min(mipLevels, 7);
return asset.ResidentMipLevels >= Mathf.Max(minMipLevels, (int)(mipLevels * ThumbnailsModule.MinimumRequiredResourcesQuality));
} }
/// <inheritdoc /> /// <inheritdoc />
@@ -35,6 +35,11 @@ namespace FlaxEditor.Content.Thumbnails
/// The finalized state. /// The finalized state.
/// </summary> /// </summary>
Disposed, Disposed,
/// <summary>
/// The request has failed (eg. asset cannot be loaded).
/// </summary>
Failed,
}; };
/// <summary> /// <summary>
@@ -78,6 +83,14 @@ namespace FlaxEditor.Content.Thumbnails
Proxy = proxy; Proxy = proxy;
} }
internal void Update()
{
if (State == States.Prepared && (!Asset || Asset.LastLoadFailed))
{
State = States.Failed;
}
}
/// <summary> /// <summary>
/// Prepares this request. /// Prepares this request.
/// </summary> /// </summary>
@@ -85,11 +98,8 @@ namespace FlaxEditor.Content.Thumbnails
{ {
if (State != States.Created) if (State != States.Created)
throw new InvalidOperationException(); throw new InvalidOperationException();
// Prepare
Asset = FlaxEngine.Content.LoadAsync(Item.Path); Asset = FlaxEngine.Content.LoadAsync(Item.Path);
Proxy.OnThumbnailDrawPrepare(this); Proxy.OnThumbnailDrawPrepare(this);
State = States.Prepared; State = States.Prepared;
} }
@@ -101,9 +111,7 @@ namespace FlaxEditor.Content.Thumbnails
{ {
if (State != States.Prepared) if (State != States.Prepared)
throw new InvalidOperationException(); throw new InvalidOperationException();
Item.Thumbnail = icon; Item.Thumbnail = icon;
State = States.Rendered; State = States.Rendered;
} }
@@ -21,15 +21,11 @@ namespace FlaxEditor.Content.Thumbnails
/// </summary> /// </summary>
public const float MinimumRequiredResourcesQuality = 0.8f; public const float MinimumRequiredResourcesQuality = 0.8f;
// TODO: free atlas slots for deleted assets
private readonly List<PreviewsCache> _cache = new List<PreviewsCache>(4); private readonly List<PreviewsCache> _cache = new List<PreviewsCache>(4);
private readonly string _cacheFolder; private readonly string _cacheFolder;
private DateTime _lastFlushTime;
private readonly List<ThumbnailRequest> _requests = new List<ThumbnailRequest>(128); private readonly List<ThumbnailRequest> _requests = new List<ThumbnailRequest>(128);
private readonly PreviewRoot _guiRoot = new PreviewRoot(); private readonly PreviewRoot _guiRoot = new PreviewRoot();
private DateTime _lastFlushTime;
private RenderTask _task; private RenderTask _task;
private GPUTexture _output; private GPUTexture _output;
@@ -88,7 +84,6 @@ namespace FlaxEditor.Content.Thumbnails
} }
} }
// Add request
AddRequest(assetItem, proxy); AddRequest(assetItem, proxy);
} }
} }
@@ -118,25 +113,87 @@ namespace FlaxEditor.Content.Thumbnails
for (int i = 0; i < _cache.Count; i++) for (int i = 0; i < _cache.Count; i++)
{ {
if (_cache[i].ReleaseSlot(assetItem.ID)) if (_cache[i].ReleaseSlot(assetItem.ID))
{
break; break;
}
} }
} }
} }
internal static bool HasMinimumQuality(TextureBase asset)
{
if (asset.HasStreamingError)
return true; // Don't block thumbnails queue when texture fails to stream in (eg. unsupported format)
var mipLevels = asset.MipLevels;
var minMipLevels = Mathf.Min(mipLevels, 7);
return asset.IsLoaded && asset.ResidentMipLevels >= Mathf.Max(minMipLevels, (int)(mipLevels * MinimumRequiredResourcesQuality));
}
internal static bool HasMinimumQuality(Model asset)
{
if (!asset.IsLoaded)
return false;
var lods = asset.LODs.Length;
var slots = asset.MaterialSlots;
foreach (var slot in slots)
{
if (slot.Material && !HasMinimumQuality(slot.Material))
return false;
}
return asset.LoadedLODs >= Mathf.Max(1, (int)(lods * MinimumRequiredResourcesQuality));
}
internal static bool HasMinimumQuality(SkinnedModel asset)
{
var lods = asset.LODs.Length;
if (asset.IsLoaded && lods == 0)
return true; // Skeleton-only model
var slots = asset.MaterialSlots;
foreach (var slot in slots)
{
if (slot.Material && !HasMinimumQuality(slot.Material))
return false;
}
return asset.LoadedLODs >= Mathf.Max(1, (int)(lods * MinimumRequiredResourcesQuality));
}
internal static bool HasMinimumQuality(MaterialBase asset)
{
if (asset is MaterialInstance asInstance)
return HasMinimumQuality(asInstance);
return HasMinimumQualityInternal(asset);
}
internal static bool HasMinimumQuality(Material asset)
{
return HasMinimumQualityInternal(asset);
}
internal static bool HasMinimumQuality(MaterialInstance asset)
{
if (!HasMinimumQualityInternal(asset))
return false;
var baseMaterial = asset.BaseMaterial;
return baseMaterial == null || HasMinimumQualityInternal(baseMaterial);
}
private static bool HasMinimumQualityInternal(MaterialBase asset)
{
if (!asset.IsLoaded)
return false;
var parameters = asset.Parameters;
foreach (var parameter in parameters)
{
if (parameter.Value is TextureBase asTexture && !HasMinimumQuality(asTexture))
return false;
}
return true;
}
#region IContentItemOwner #region IContentItemOwner
/// <inheritdoc /> /// <inheritdoc />
void IContentItemOwner.OnItemDeleted(ContentItem item) void IContentItemOwner.OnItemDeleted(ContentItem item)
{ {
if (item is AssetItem assetItem) DeletePreview(item);
{
lock (_requests)
{
RemoveRequest(assetItem);
}
}
} }
/// <inheritdoc /> /// <inheritdoc />
@@ -338,18 +395,16 @@ namespace FlaxEditor.Content.Thumbnails
for (int i = 0; i < maxChecks; i++) for (int i = 0; i < maxChecks; i++)
{ {
var request = _requests[i]; var request = _requests[i];
try try
{ {
if (request.IsReady) if (request.IsReady)
{
return request; return request;
}
} }
catch (Exception ex) catch (Exception ex)
{ {
Editor.LogWarning(ex);
Editor.LogWarning($"Failed to prepare thumbnail rendering for {request.Item.ShortName}."); Editor.LogWarning($"Failed to prepare thumbnail rendering for {request.Item.ShortName}.");
Editor.LogWarning(ex);
_requests.RemoveAt(i--);
} }
} }
@@ -368,7 +423,6 @@ namespace FlaxEditor.Content.Thumbnails
// Create atlas // Create atlas
if (PreviewsCache.Create(path)) if (PreviewsCache.Create(path))
{ {
// Error
Editor.LogError("Failed to create thumbnails atlas."); Editor.LogError("Failed to create thumbnails atlas.");
return null; return null;
} }
@@ -377,7 +431,6 @@ namespace FlaxEditor.Content.Thumbnails
var atlas = FlaxEngine.Content.LoadAsync<PreviewsCache>(path); var atlas = FlaxEngine.Content.LoadAsync<PreviewsCache>(path);
if (atlas == null) if (atlas == null)
{ {
// Error
Editor.LogError("Failed to load thumbnails atlas."); Editor.LogError("Failed to load thumbnails atlas.");
return null; return null;
} }
@@ -430,10 +483,7 @@ namespace FlaxEditor.Content.Thumbnails
{ {
// 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)
{
// Back
return; return;
}
lock (_requests) lock (_requests)
{ {
@@ -449,9 +499,9 @@ namespace FlaxEditor.Content.Thumbnails
for (int i = 0; i < checks; i++) for (int i = 0; i < checks; i++)
{ {
var request = _requests[i]; var request = _requests[i];
try try
{ {
request.Update();
if (request.IsReady) if (request.IsReady)
{ {
isAnyReady = true; isAnyReady = true;
@@ -460,11 +510,16 @@ namespace FlaxEditor.Content.Thumbnails
{ {
request.Prepare(); request.Prepare();
} }
else if (request.State == ThumbnailRequest.States.Failed)
{
_requests.RemoveAt(i--);
}
} }
catch (Exception ex) catch (Exception ex)
{ {
Editor.LogWarning(ex);
Editor.LogWarning($"Failed to prepare thumbnail rendering for {request.Item.ShortName}."); Editor.LogWarning($"Failed to prepare thumbnail rendering for {request.Item.ShortName}.");
Editor.LogWarning(ex);
_requests.RemoveAt(i--);
} }
} }
+13 -2
View File
@@ -24,6 +24,16 @@ namespace FlaxEditor.Content
/// </summary> /// </summary>
protected ContentFolder _folder; 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> /// <summary>
/// Gets the content folder item. /// Gets the content folder item.
/// </summary> /// </summary>
@@ -86,6 +96,7 @@ namespace FlaxEditor.Content
Folder.ParentFolder = parent.Folder; Folder.ParentFolder = parent.Folder;
Parent = parent; Parent = parent;
} }
IconColor = Style.Current.Foreground;
} }
/// <summary> /// <summary>
@@ -300,7 +311,7 @@ namespace FlaxEditor.Content
StartRenaming(); StartRenaming();
return true; return true;
case KeyboardKeys.Delete: case KeyboardKeys.Delete:
if (Folder.Exists) if (Folder.Exists && CanDelete)
Editor.Instance.Windows.ContentWin.Delete(Folder); Editor.Instance.Windows.ContentWin.Delete(Folder);
return true; return true;
} }
@@ -309,7 +320,7 @@ namespace FlaxEditor.Content
switch (key) switch (key)
{ {
case KeyboardKeys.D: case KeyboardKeys.D:
if (Folder.Exists) if (Folder.Exists && CanDuplicate)
Editor.Instance.Windows.ContentWin.Duplicate(Folder); Editor.Instance.Windows.ContentWin.Duplicate(Folder);
return true; return true;
} }
@@ -12,6 +12,12 @@ namespace FlaxEditor.Content
{ {
private FileSystemWatcher _watcher; private FileSystemWatcher _watcher;
/// <inheritdoc />
public override bool CanDelete => false;
/// <inheritdoc />
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="MainContentTreeNode"/> class.
/// </summary> /// </summary>
@@ -29,7 +35,7 @@ namespace FlaxEditor.Content
//_watcher.Changed += OnEvent; //_watcher.Changed += OnEvent;
_watcher.Created += OnEvent; _watcher.Created += OnEvent;
_watcher.Deleted += OnEvent; _watcher.Deleted += OnEvent;
//_watcher.Renamed += OnEvent; _watcher.Renamed += OnEvent;
} }
private void OnEvent(object sender, FileSystemEventArgs e) private void OnEvent(object sender, FileSystemEventArgs e)
@@ -17,6 +17,6 @@ namespace FlaxEditor.Content
} }
/// <inheritdoc /> /// <inheritdoc />
public override string NavButtonLabel => string.Empty; public override string NavButtonLabel => " /";
} }
} }
+7
View File
@@ -12,6 +12,13 @@
class GameCooker; class GameCooker;
class PlatformTools; class PlatformTools;
#if OFFICIAL_BUILD
// Use the fixed .NET SDK version in packaged builds for compatibility (FlaxGame is precompiled with it)
#define GAME_BUILD_DOTNET_VER TEXT("-dotnet=7")
#else
#define GAME_BUILD_DOTNET_VER TEXT("")
#endif
/// <summary> /// <summary>
/// Game building options. Used as flags. /// Game building options. Used as flags.
/// </summary> /// </summary>
@@ -169,6 +169,30 @@ bool AndroidPlatformTools::OnPostProcess(CookingData& data)
permissions += String::Format(TEXT("\n <uses-permission android:name=\"{0}\" />"), e.Item); permissions += String::Format(TEXT("\n <uses-permission android:name=\"{0}\" />"), e.Item);
} }
// Setup default Android screen orientation
auto defaultOrienation = platformSettings->DefaultOrientation;
String orientation = String("fullSensor");
switch (defaultOrienation)
{
case AndroidPlatformSettings::ScreenOrientation::Portrait:
orientation = String("portrait");
break;
case AndroidPlatformSettings::ScreenOrientation::PortraitReverse:
orientation = String("reversePortrait");
break;
case AndroidPlatformSettings::ScreenOrientation::LandscapeRight:
orientation = String("landscape");
break;
case AndroidPlatformSettings::ScreenOrientation::LandscapeLeft:
orientation = String("reverseLandscape");
break;
case AndroidPlatformSettings::ScreenOrientation::AutoRotation:
orientation = String("fullSensor");
break;
default:
break;
}
// Setup Android application attributes // Setup Android application attributes
String attributes; String attributes;
if (data.Configuration != BuildConfiguration::Release) if (data.Configuration != BuildConfiguration::Release)
@@ -223,6 +247,7 @@ bool AndroidPlatformTools::OnPostProcess(CookingData& data)
EditorUtilities::ReplaceInFile(manifestPath, TEXT("${PackageName}"), packageName); EditorUtilities::ReplaceInFile(manifestPath, TEXT("${PackageName}"), packageName);
EditorUtilities::ReplaceInFile(manifestPath, TEXT("${ProjectVersion}"), projectVersion); EditorUtilities::ReplaceInFile(manifestPath, TEXT("${ProjectVersion}"), projectVersion);
EditorUtilities::ReplaceInFile(manifestPath, TEXT("${AndroidPermissions}"), permissions); EditorUtilities::ReplaceInFile(manifestPath, TEXT("${AndroidPermissions}"), permissions);
EditorUtilities::ReplaceInFile(manifestPath, TEXT("${DefaultOrientation}"), orientation);
EditorUtilities::ReplaceInFile(manifestPath, TEXT("${AndroidAttributes}"), attributes); EditorUtilities::ReplaceInFile(manifestPath, TEXT("${AndroidAttributes}"), attributes);
const String stringsPath = data.OriginalOutputPath / TEXT("app/src/main/res/values/strings.xml"); const String stringsPath = data.OriginalOutputPath / TEXT("app/src/main/res/values/strings.xml");
EditorUtilities::ReplaceInFile(stringsPath, TEXT("${ProjectName}"), gameSettings->ProductName); EditorUtilities::ReplaceInFile(stringsPath, TEXT("${ProjectName}"), gameSettings->ProductName);
@@ -280,17 +305,25 @@ bool AndroidPlatformTools::OnPostProcess(CookingData& data)
const Char* gradlew = TEXT("gradlew"); const Char* gradlew = TEXT("gradlew");
#endif #endif
#if PLATFORM_LINUX #if PLATFORM_LINUX
Platform::RunProcess(String::Format(TEXT("chmod +x \"{0}/gradlew\""), data.OriginalOutputPath), data.OriginalOutputPath, Dictionary<String, String>(), true); {
CreateProcessSettings procSettings;
procSettings.FileName = String::Format(TEXT("chmod +x \"{0}/gradlew\""), data.OriginalOutputPath);
procSettings.WorkingDirectory = data.OriginalOutputPath;
procSettings.HiddenWindow = true;
Platform::CreateProcess(procSettings);
}
#endif #endif
const bool distributionPackage = buildSettings->ForDistribution; const bool distributionPackage = buildSettings->ForDistribution;
CreateProcessSettings procSettings;
procSettings.FileName = String::Format(TEXT("\"{0}\" {1}"), data.OriginalOutputPath / gradlew, distributionPackage ? TEXT("assemble") : TEXT("assembleDebug"));
procSettings.WorkingDirectory = data.OriginalOutputPath;
const int32 result = Platform::CreateProcess(procSettings);
if (result != 0)
{ {
data.Error(String::Format(TEXT("Failed to build Gradle project into package (result code: {0}). See log for more info."), result)); CreateProcessSettings procSettings;
return true; procSettings.FileName = String::Format(TEXT("\"{0}\" {1}"), data.OriginalOutputPath / gradlew, distributionPackage ? TEXT("assemble") : TEXT("assembleDebug"));
procSettings.WorkingDirectory = data.OriginalOutputPath;
const int32 result = Platform::CreateProcess(procSettings);
if (result != 0)
{
data.Error(String::Format(TEXT("Failed to build Gradle project into package (result code: {0}). See log for more info."), result));
return true;
}
} }
// Copy result package // Copy result package
@@ -104,4 +104,19 @@ bool LinuxPlatformTools::OnDeployBinaries(CookingData& data)
return false; return false;
} }
void LinuxPlatformTools::OnRun(CookingData& data, String& executableFile, String& commandLineFormat, String& workingDir)
{
// Pick the first executable file
Array<String> files;
FileSystem::DirectoryGetFiles(files, data.NativeCodeOutputPath, TEXT("*"), DirectorySearchOption::TopDirectoryOnly);
for (auto& file : files)
{
if (FileSystem::GetExtension(file).IsEmpty())
{
executableFile = file;
break;
}
}
}
#endif #endif
@@ -20,6 +20,7 @@ public:
ArchitectureType GetArchitecture() const override; ArchitectureType GetArchitecture() const override;
bool UseSystemDotnet() const override; bool UseSystemDotnet() const override;
bool OnDeployBinaries(CookingData& data) override; bool OnDeployBinaries(CookingData& data) override;
void OnRun(CookingData& data, String& executableFile, String& commandLineFormat, String& workingDir) override;
}; };
#endif #endif
@@ -5,6 +5,7 @@
#include "MacPlatformTools.h" #include "MacPlatformTools.h"
#include "Engine/Platform/File.h" #include "Engine/Platform/File.h"
#include "Engine/Platform/FileSystem.h" #include "Engine/Platform/FileSystem.h"
#include "Engine/Platform/CreateProcessSettings.h"
#include "Engine/Platform/Mac/MacPlatformSettings.h" #include "Engine/Platform/Mac/MacPlatformSettings.h"
#include "Engine/Core/Config/GameSettings.h" #include "Engine/Core/Config/GameSettings.h"
#include "Engine/Core/Config/BuildSettings.h" #include "Engine/Core/Config/BuildSettings.h"
@@ -16,7 +17,7 @@
#include "Editor/ProjectInfo.h" #include "Editor/ProjectInfo.h"
#include "Editor/Cooker/GameCooker.h" #include "Editor/Cooker/GameCooker.h"
#include "Editor/Utilities/EditorUtilities.h" #include "Editor/Utilities/EditorUtilities.h"
#include <ThirdParty/pugixml/pugixml.hpp> #include <ThirdParty/pugixml/pugixml_extra.hpp>
using namespace pugi; using namespace pugi;
IMPLEMENT_SETTINGS_GETTER(MacPlatformSettings, MacPlatform); IMPLEMENT_SETTINGS_GETTER(MacPlatformSettings, MacPlatform);
@@ -124,17 +125,35 @@ bool MacPlatformTools::OnPostProcess(CookingData& data)
LOG(Error, "Failed to export application icon."); LOG(Error, "Failed to export application icon.");
return true; return true;
} }
bool failed = Platform::RunProcess(TEXT("sips -z 16 16 icon_1024x1024.png --out icon_16x16.png"), tmpFolderPath); CreateProcessSettings procSettings;
failed |= Platform::RunProcess(TEXT("sips -z 32 32 icon_1024x1024.png --out icon_16x16@2x.png"), tmpFolderPath); procSettings.HiddenWindow = true;
failed |= Platform::RunProcess(TEXT("sips -z 32 32 icon_1024x1024.png --out icon_32x32.png"), tmpFolderPath); procSettings.FileName = TEXT("/usr/bin/sips");
failed |= Platform::RunProcess(TEXT("sips -z 64 64 icon_1024x1024.png --out icon_32x32@2x.png"), tmpFolderPath); procSettings.WorkingDirectory = tmpFolderPath;
failed |= Platform::RunProcess(TEXT("sips -z 128 128 icon_1024x1024.png --out icon_128x128.png"), tmpFolderPath); procSettings.Arguments = TEXT("-z 16 16 icon_1024x1024.png --out icon_16x16.png");
failed |= Platform::RunProcess(TEXT("sips -z 256 256 icon_1024x1024.png --out icon_128x128@2x.png"), tmpFolderPath); bool failed = false;
failed |= Platform::RunProcess(TEXT("sips -z 256 256 icon_1024x1024.png --out icon_256x256.png"), tmpFolderPath); failed |= Platform::CreateProcess(procSettings);
failed |= Platform::RunProcess(TEXT("sips -z 512 512 icon_1024x1024.png --out icon_256x256@2x.png"), tmpFolderPath); procSettings.Arguments = TEXT("-z 32 32 icon_1024x1024.png --out icon_16x16@2x.png");
failed |= Platform::RunProcess(TEXT("sips -z 512 512 icon_1024x1024.png --out icon_512x512.png"), tmpFolderPath); failed |= Platform::CreateProcess(procSettings);
failed |= Platform::RunProcess(TEXT("sips -z 1024 1024 icon_1024x1024.png --out icon_512x512@2x.png"), tmpFolderPath); procSettings.Arguments = TEXT("-z 32 32 icon_1024x1024.png --out icon_32x32.png");
failed |= Platform::RunProcess(TEXT("iconutil -c icns icon.iconset"), iconFolderPath); failed |= Platform::CreateProcess(procSettings);
procSettings.Arguments = TEXT("-z 64 64 icon_1024x1024.png --out icon_32x32@2x.png");
failed |= Platform::CreateProcess(procSettings);
procSettings.Arguments = TEXT("-z 128 128 icon_1024x1024.png --out icon_128x128.png");
failed |= Platform::CreateProcess(procSettings);
procSettings.Arguments = TEXT("-z 256 256 icon_1024x1024.png --out icon_128x128@2x.png");
failed |= Platform::CreateProcess(procSettings);
procSettings.Arguments = TEXT("-z 256 256 icon_1024x1024.png --out icon_256x256.png");
failed |= Platform::CreateProcess(procSettings);
procSettings.Arguments = TEXT("-z 512 512 icon_1024x1024.png --out icon_256x256@2x.png");
failed |= Platform::CreateProcess(procSettings);
procSettings.Arguments = TEXT("-z 512 512 icon_1024x1024.png --out icon_512x512.png");
failed |= Platform::CreateProcess(procSettings);
procSettings.Arguments = TEXT("-z 1024 1024 icon_1024x1024.png --out icon_512x512@2x.png");
failed |= Platform::CreateProcess(procSettings);
procSettings.FileName = TEXT("/usr/bin/iconutil");
procSettings.Arguments = TEXT("-c icns icon.iconset");
procSettings.WorkingDirectory = iconFolderPath;
failed |= Platform::CreateProcess(procSettings);
if (failed) if (failed)
{ {
LOG(Error, "Failed to export application icon."); LOG(Error, "Failed to export application icon.");
@@ -151,17 +170,17 @@ bool MacPlatformTools::OnPostProcess(CookingData& data)
const String plistPath = data.DataOutputPath / TEXT("Info.plist"); const String plistPath = data.DataOutputPath / TEXT("Info.plist");
{ {
xml_document doc; xml_document doc;
xml_node plist = doc.child_or_append(PUGIXML_TEXT("plist")); xml_node_extra plist = xml_node_extra(doc).child_or_append(PUGIXML_TEXT("plist"));
plist.append_attribute(PUGIXML_TEXT("version")).set_value(PUGIXML_TEXT("1.0")); plist.append_attribute(PUGIXML_TEXT("version")).set_value(PUGIXML_TEXT("1.0"));
xml_node dict = plist.child_or_append(PUGIXML_TEXT("dict")); xml_node_extra dict = plist.child_or_append(PUGIXML_TEXT("dict"));
#define ADD_ENTRY(key, value) \ #define ADD_ENTRY(key, value) \
dict.append_child(PUGIXML_TEXT("key")).set_child_value(PUGIXML_TEXT(key)); \ dict.append_child_with_value(PUGIXML_TEXT("key"), PUGIXML_TEXT(key)); \
dict.append_child(PUGIXML_TEXT("string")).set_child_value(PUGIXML_TEXT(value)) dict.append_child_with_value(PUGIXML_TEXT("string"), PUGIXML_TEXT(value))
#define ADD_ENTRY_STR(key, value) \ #define ADD_ENTRY_STR(key, value) \
dict.append_child(PUGIXML_TEXT("key")).set_child_value(PUGIXML_TEXT(key)); \ dict.append_child_with_value(PUGIXML_TEXT("key"), PUGIXML_TEXT(key)); \
{ std::u16string valueStr(value.GetText()); \ { std::u16string valueStr(value.GetText()); \
dict.append_child(PUGIXML_TEXT("string")).set_child_value(pugi::string_t(valueStr.begin(), valueStr.end()).c_str()); } dict.append_child_with_value(PUGIXML_TEXT("string"), pugi::string_t(valueStr.begin(), valueStr.end()).c_str()); }
ADD_ENTRY("CFBundleDevelopmentRegion", "English"); ADD_ENTRY("CFBundleDevelopmentRegion", "English");
ADD_ENTRY("CFBundlePackageType", "APPL"); ADD_ENTRY("CFBundlePackageType", "APPL");
@@ -175,22 +194,22 @@ bool MacPlatformTools::OnPostProcess(CookingData& data)
ADD_ENTRY_STR("CFBundleVersion", projectVersion); ADD_ENTRY_STR("CFBundleVersion", projectVersion);
ADD_ENTRY_STR("NSHumanReadableCopyright", gameSettings->CopyrightNotice); ADD_ENTRY_STR("NSHumanReadableCopyright", gameSettings->CopyrightNotice);
dict.append_child(PUGIXML_TEXT("key")).set_child_value(PUGIXML_TEXT("CFBundleSupportedPlatforms")); dict.append_child_with_value(PUGIXML_TEXT("key"), PUGIXML_TEXT("CFBundleSupportedPlatforms"));
xml_node CFBundleSupportedPlatforms = dict.append_child(PUGIXML_TEXT("array")); xml_node_extra CFBundleSupportedPlatforms = dict.append_child(PUGIXML_TEXT("array"));
CFBundleSupportedPlatforms.append_child(PUGIXML_TEXT("string")).set_child_value(PUGIXML_TEXT("MacOSX")); CFBundleSupportedPlatforms.append_child_with_value(PUGIXML_TEXT("string"), PUGIXML_TEXT("MacOSX"));
dict.append_child(PUGIXML_TEXT("key")).set_child_value(PUGIXML_TEXT("LSMinimumSystemVersionByArchitecture")); dict.append_child_with_value(PUGIXML_TEXT("key"), PUGIXML_TEXT("LSMinimumSystemVersionByArchitecture"));
xml_node LSMinimumSystemVersionByArchitecture = dict.append_child(PUGIXML_TEXT("dict")); xml_node_extra LSMinimumSystemVersionByArchitecture = dict.append_child(PUGIXML_TEXT("dict"));
switch (_arch) switch (_arch)
{ {
case ArchitectureType::x64: case ArchitectureType::x64:
LSMinimumSystemVersionByArchitecture.append_child(PUGIXML_TEXT("key")).set_child_value(PUGIXML_TEXT("x86_64")); LSMinimumSystemVersionByArchitecture.append_child_with_value(PUGIXML_TEXT("key"), PUGIXML_TEXT("x86_64"));
break; break;
case ArchitectureType::ARM64: case ArchitectureType::ARM64:
LSMinimumSystemVersionByArchitecture.append_child(PUGIXML_TEXT("key")).set_child_value(PUGIXML_TEXT("arm64")); LSMinimumSystemVersionByArchitecture.append_child_with_value(PUGIXML_TEXT("key"), PUGIXML_TEXT("arm64"));
break; break;
} }
LSMinimumSystemVersionByArchitecture.append_child(PUGIXML_TEXT("string")).set_child_value(PUGIXML_TEXT("10.15")); LSMinimumSystemVersionByArchitecture.append_child_with_value(PUGIXML_TEXT("string"), PUGIXML_TEXT("10.15"));
#undef ADD_ENTRY #undef ADD_ENTRY
#undef ADD_ENTRY_STR #undef ADD_ENTRY_STR
@@ -210,18 +229,39 @@ bool MacPlatformTools::OnPostProcess(CookingData& data)
return false; return false;
GameCooker::PackageFiles(); GameCooker::PackageFiles();
LOG(Info, "Building app package..."); LOG(Info, "Building app package...");
const String dmgPath = data.OriginalOutputPath / appName + TEXT(".dmg");
const String dmgCommand = String::Format(TEXT("hdiutil create {0}.dmg -volname {0} -fs HFS+ -srcfolder {0}.app"), appName);
const int32 result = Platform::RunProcess(dmgCommand, data.OriginalOutputPath);
if (result != 0)
{ {
data.Error(String::Format(TEXT("Failed to package app (result code: {0}). See log for more info."), result)); const String dmgPath = data.OriginalOutputPath / appName + TEXT(".dmg");
return true; CreateProcessSettings procSettings;
procSettings.HiddenWindow = true;
procSettings.WorkingDirectory = data.OriginalOutputPath;
procSettings.FileName = TEXT("/usr/bin/hdiutil");
procSettings.Arguments = String::Format(TEXT("create {0}.dmg -volname {0} -fs HFS+ -srcfolder {0}.app"), appName);
const int32 result = Platform::CreateProcess(procSettings);
if (result != 0)
{
data.Error(String::Format(TEXT("Failed to package app (result code: {0}). See log for more info."), result));
return true;
}
// TODO: sign dmg
LOG(Info, "Output application package: {0} (size: {1} MB)", dmgPath, FileSystem::GetFileSize(dmgPath) / 1024 / 1024);
} }
// TODO: sign dmg
LOG(Info, "Output application package: {0} (size: {1} MB)", dmgPath, FileSystem::GetFileSize(dmgPath) / 1024 / 1024);
return false; return false;
} }
void MacPlatformTools::OnRun(CookingData& data, String& executableFile, String& commandLineFormat, String& workingDir)
{
// Pick the first executable file
Array<String> files;
FileSystem::DirectoryGetFiles(files, data.NativeCodeOutputPath, TEXT("*"), DirectorySearchOption::TopDirectoryOnly);
for (auto& file : files)
{
if (FileSystem::GetExtension(file).IsEmpty())
{
executableFile = file;
break;
}
}
}
#endif #endif
@@ -27,6 +27,7 @@ public:
bool IsNativeCodeFile(CookingData& data, const String& file) override; bool IsNativeCodeFile(CookingData& data, const String& file) override;
void OnBuildStarted(CookingData& data) override; void OnBuildStarted(CookingData& data) override;
bool OnPostProcess(CookingData& data) override; bool OnPostProcess(CookingData& data) override;
void OnRun(CookingData& data, String& executableFile, String& commandLineFormat, String& workingDir) override;
}; };
#endif #endif
@@ -260,15 +260,20 @@ bool iOSPlatformTools::OnPostProcess(CookingData& data)
{ {
LOG(Info, "Building app package..."); LOG(Info, "Building app package...");
const Char* configuration = data.Configuration == BuildConfiguration::Release ? TEXT("Release") : TEXT("Debug"); const Char* configuration = data.Configuration == BuildConfiguration::Release ? TEXT("Release") : TEXT("Debug");
String command = String::Format(TEXT("xcodebuild -project FlaxGame.xcodeproj -configuration {} -scheme FlaxGame -archivePath FlaxGame.xcarchive archive"), configuration); CreateProcessSettings procSettings;
int32 result = Platform::RunProcess(command, data.OriginalOutputPath); procSettings.HiddenWindow = true;
procSettings.WorkingDirectory = data.OriginalOutputPath;
procSettings.FileName = TEXT("/usr/bin/xcodebuild");
procSettings.Arguments = String::Format(TEXT("-project FlaxGame.xcodeproj -configuration {} -scheme FlaxGame -archivePath FlaxGame.xcarchive archive"), configuration);
int32 result = Platform::CreateProcess(procSettings);
if (result != 0) if (result != 0)
{ {
data.Error(String::Format(TEXT("Failed to package app (result code: {0}). See log for more info."), result)); data.Error(String::Format(TEXT("Failed to package app (result code: {0}). See log for more info."), result));
return true; return true;
} }
command = TEXT("xcodebuild -exportArchive -archivePath FlaxGame.xcarchive -allowProvisioningUpdates -exportPath . -exportOptionsPlist ExportOptions.plist"); procSettings.FileName = TEXT("/usr/bin/xcodebuild");
result = Platform::RunProcess(command, data.OriginalOutputPath); procSettings.Arguments = TEXT("-exportArchive -archivePath FlaxGame.xcarchive -allowProvisioningUpdates -exportPath . -exportOptionsPlist ExportOptions.plist");
result = Platform::CreateProcess(procSettings);
if (result != 0) if (result != 0)
{ {
data.Error(String::Format(TEXT("Failed to package app (result code: {0}). See log for more info."), result)); data.Error(String::Format(TEXT("Failed to package app (result code: {0}). See log for more info."), result));
@@ -188,8 +188,8 @@ bool CompileScriptsStep::Perform(CookingData& data)
LOG(Info, "Starting scripts compilation for game..."); LOG(Info, "Starting scripts compilation for game...");
const String logFile = data.CacheDirectory / TEXT("CompileLog.txt"); const String logFile = data.CacheDirectory / TEXT("CompileLog.txt");
auto args = String::Format( auto args = String::Format(
TEXT("-log -logfile=\"{4}\" -build -mutex -buildtargets={0} -platform={1} -arch={2} -configuration={3} -aotMode={5}"), TEXT("-log -logfile=\"{4}\" -build -mutex -buildtargets={0} -platform={1} -arch={2} -configuration={3} -aotMode={5} {6}"),
target, platform, architecture, configuration, logFile, ToString(data.Tools->UseAOT())); target, platform, architecture, configuration, logFile, ToString(data.Tools->UseAOT()), GAME_BUILD_DOTNET_VER);
#if PLATFORM_WINDOWS #if PLATFORM_WINDOWS
if (data.Platform == BuildPlatform::LinuxX64) if (data.Platform == BuildPlatform::LinuxX64)
#elif PLATFORM_LINUX #elif PLATFORM_LINUX
@@ -1270,7 +1270,7 @@ bool CookAssetsStep::Perform(CookingData& data)
{ {
Array<CookingData::AssetTypeStatistics> assetTypes; Array<CookingData::AssetTypeStatistics> assetTypes;
data.Stats.AssetStats.GetValues(assetTypes); data.Stats.AssetStats.GetValues(assetTypes);
Sorting::QuickSort(assetTypes.Get(), assetTypes.Count()); Sorting::QuickSort(assetTypes);
LOG(Info, ""); LOG(Info, "");
LOG(Info, "Top assets types stats:"); LOG(Info, "Top assets types stats:");
+31 -24
View File
@@ -48,21 +48,21 @@ bool DeployDataStep::Perform(CookingData& data)
} }
if (buildSettings.SkipDotnetPackaging && data.Tools->UseSystemDotnet()) if (buildSettings.SkipDotnetPackaging && data.Tools->UseSystemDotnet())
{ {
// Use system-installed .Net Runtime // Use system-installed .NET Runtime
FileSystem::DeleteDirectory(dstDotnet); FileSystem::DeleteDirectory(dstDotnet);
} }
else else
{ {
// Deploy .Net Runtime files // Deploy .NET Runtime files
FileSystem::CreateDirectory(dstDotnet); FileSystem::CreateDirectory(dstDotnet);
String srcDotnet = depsRoot / TEXT("Dotnet"); String srcDotnet = depsRoot / TEXT("Dotnet");
if (FileSystem::DirectoryExists(srcDotnet)) if (FileSystem::DirectoryExists(srcDotnet))
{ {
// Use prebuilt .Net installation for that platform // Use prebuilt .NET installation for that platform
LOG(Info, "Using .Net Runtime {} at {}", data.Tools->GetName(), srcDotnet); LOG(Info, "Using .NET Runtime {} at {}", data.Tools->GetName(), srcDotnet);
if (EditorUtilities::CopyDirectoryIfNewer(dstDotnet, srcDotnet, true)) if (EditorUtilities::CopyDirectoryIfNewer(dstDotnet, srcDotnet, true))
{ {
data.Error(TEXT("Failed to copy .Net runtime data files.")); data.Error(TEXT("Failed to copy .NET runtime data files."));
return true; return true;
} }
} }
@@ -85,9 +85,9 @@ bool DeployDataStep::Perform(CookingData& data)
} }
if (canUseSystemDotnet && (aotMode == DotNetAOTModes::None || aotMode == DotNetAOTModes::ILC)) if (canUseSystemDotnet && (aotMode == DotNetAOTModes::None || aotMode == DotNetAOTModes::ILC))
{ {
// Ask Flax.Build to provide .Net SDK location for the current platform // Ask Flax.Build to provide .NET SDK location for the current platform
String sdks; String sdks;
bool failed = ScriptsBuilder::RunBuildTool(TEXT("-log -logMessagesOnly -logFileWithConsole -logfile=SDKs.txt -printSDKs"), data.CacheDirectory); bool failed = ScriptsBuilder::RunBuildTool(String::Format(TEXT("-log -logMessagesOnly -logFileWithConsole -logfile=SDKs.txt -printSDKs {}"), GAME_BUILD_DOTNET_VER), data.CacheDirectory);
failed |= File::ReadAllText(data.CacheDirectory / TEXT("SDKs.txt"), sdks); failed |= File::ReadAllText(data.CacheDirectory / TEXT("SDKs.txt"), sdks);
int32 idx = sdks.Find(TEXT("DotNetSdk, "), StringSearchCase::CaseSensitive); int32 idx = sdks.Find(TEXT("DotNetSdk, "), StringSearchCase::CaseSensitive);
if (idx != -1) if (idx != -1)
@@ -101,7 +101,7 @@ bool DeployDataStep::Perform(CookingData& data)
} }
if (failed || !FileSystem::DirectoryExists(srcDotnet)) if (failed || !FileSystem::DirectoryExists(srcDotnet))
{ {
data.Error(TEXT("Failed to get .Net SDK location for a current platform.")); data.Error(TEXT("Failed to get .NET SDK location for the current host platform."));
return true; return true;
} }
@@ -110,19 +110,25 @@ bool DeployDataStep::Perform(CookingData& data)
FileSystem::GetChildDirectories(versions, srcDotnet / TEXT("host/fxr")); FileSystem::GetChildDirectories(versions, srcDotnet / TEXT("host/fxr"));
if (versions.Count() == 0) if (versions.Count() == 0)
{ {
data.Error(TEXT("Failed to get .Net SDK location for a current platform.")); data.Error(TEXT("Failed to find any .NET hostfxr versions for the current host platform."));
return true; return true;
} }
for (String& version : versions) for (String& version : versions)
{ {
version = String(StringUtils::GetFileName(version)); version = String(StringUtils::GetFileName(version));
if (!version.StartsWith(TEXT("7."))) if (!version.StartsWith(TEXT("7.")) && !version.StartsWith(TEXT("8."))) // .NET 7 or .NET 8
version.Clear(); version.Clear();
} }
Sorting::QuickSort(versions.Get(), versions.Count()); Sorting::QuickSort(versions);
const String version = versions.Last(); const String version = versions.Last();
if (version.IsEmpty())
{
data.Error(TEXT("Failed to find supported .NET hostfxr version for the current host platform."));
return true;
}
FileSystem::NormalizePath(srcDotnet); FileSystem::NormalizePath(srcDotnet);
LOG(Info, "Using .Net Runtime {} at {}", version, srcDotnet); LOG(Info, "Using .NET Runtime {} at {}", version, srcDotnet);
// Check if previously deployed files are valid (eg. system-installed .NET was updated from version 7.0.3 to 7.0.5) // Check if previously deployed files are valid (eg. system-installed .NET was updated from version 7.0.3 to 7.0.5)
{ {
@@ -131,7 +137,8 @@ bool DeployDataStep::Perform(CookingData& data)
if (FileSystem::DirectoryExists(dstDotnet)) if (FileSystem::DirectoryExists(dstDotnet))
{ {
String cachedData; String cachedData;
File::ReadAllText(dotnetCacheFilePath, cachedData); if (FileSystem::FileExists(dotnetCacheFilePath))
File::ReadAllText(dotnetCacheFilePath, cachedData);
if (cachedData != dotnetCachedValue) if (cachedData != dotnetCachedValue)
{ {
FileSystem::DeleteDirectory(dstDotnet); FileSystem::DeleteDirectory(dstDotnet);
@@ -157,17 +164,17 @@ bool DeployDataStep::Perform(CookingData& data)
} }
if (failed) if (failed)
{ {
data.Error(TEXT("Failed to copy .Net runtime data files.")); data.Error(TEXT("Failed to copy .NET runtime data files."));
return true; return true;
} }
} }
else else
{ {
// Ask Flax.Build to provide .Net Host Runtime location for the target platform // Ask Flax.Build to provide .NET Host Runtime location for the target platform
String sdks; String sdks;
const Char *platformName, *archName; const Char *platformName, *archName;
data.GetBuildPlatformName(platformName, archName); data.GetBuildPlatformName(platformName, archName);
String args = String::Format(TEXT("-log -logMessagesOnly -logFileWithConsole -logfile=SDKs.txt -printDotNetRuntime -platform={} -arch={}"), platformName, archName); String args = String::Format(TEXT("-log -logMessagesOnly -logFileWithConsole -logfile=SDKs.txt -printDotNetRuntime -platform={} -arch={} {}"), platformName, archName, GAME_BUILD_DOTNET_VER);
bool failed = ScriptsBuilder::RunBuildTool(args, data.CacheDirectory); bool failed = ScriptsBuilder::RunBuildTool(args, data.CacheDirectory);
failed |= File::ReadAllText(data.CacheDirectory / TEXT("SDKs.txt"), sdks); failed |= File::ReadAllText(data.CacheDirectory / TEXT("SDKs.txt"), sdks);
Array<String> parts; Array<String> parts;
@@ -179,11 +186,11 @@ bool DeployDataStep::Perform(CookingData& data)
} }
if (failed || !FileSystem::DirectoryExists(srcDotnet)) if (failed || !FileSystem::DirectoryExists(srcDotnet))
{ {
data.Error(TEXT("Failed to get .Net SDK location for a current platform.")); data.Error(TEXT("Failed to get .NET SDK location for the current host platform."));
return true; return true;
} }
FileSystem::NormalizePath(srcDotnet); FileSystem::NormalizePath(srcDotnet);
LOG(Info, "Using .Net Runtime {} at {}", TEXT("Host"), srcDotnet); LOG(Info, "Using .NET Runtime {} at {}", TEXT("Host"), srcDotnet);
// Deploy runtime files // Deploy runtime files
const Char* corlibPrivateName = TEXT("System.Private.CoreLib.dll"); const Char* corlibPrivateName = TEXT("System.Private.CoreLib.dll");
@@ -248,7 +255,7 @@ bool DeployDataStep::Perform(CookingData& data)
DEPLOY_NATIVE_FILE("libmonosgen-2.0.dylib"); DEPLOY_NATIVE_FILE("libmonosgen-2.0.dylib");
DEPLOY_NATIVE_FILE("libSystem.IO.Compression.Native.dylib"); DEPLOY_NATIVE_FILE("libSystem.IO.Compression.Native.dylib");
DEPLOY_NATIVE_FILE("libSystem.Native.dylib"); DEPLOY_NATIVE_FILE("libSystem.Native.dylib");
DEPLOY_NATIVE_FILE("libSystem.Net.Security.Native.dylib"); DEPLOY_NATIVE_FILE("libSystem.NET.Security.Native.dylib");
DEPLOY_NATIVE_FILE("libSystem.Security.Cryptography.Native.Apple.dylib"); DEPLOY_NATIVE_FILE("libSystem.Security.Cryptography.Native.Apple.dylib");
break; break;
#undef DEPLOY_NATIVE_FILE #undef DEPLOY_NATIVE_FILE
@@ -256,7 +263,7 @@ bool DeployDataStep::Perform(CookingData& data)
} }
if (failed) if (failed)
{ {
data.Error(TEXT("Failed to copy .Net runtime data files.")); data.Error(TEXT("Failed to copy .NET runtime data files."));
return true; return true;
} }
} }
@@ -268,8 +275,8 @@ bool DeployDataStep::Perform(CookingData& data)
LOG(Info, "Optimizing .NET class library size to include only used assemblies"); LOG(Info, "Optimizing .NET class library size to include only used assemblies");
const String logFile = data.CacheDirectory / TEXT("StripDotnetLibs.txt"); const String logFile = data.CacheDirectory / TEXT("StripDotnetLibs.txt");
String args = String::Format( String args = String::Format(
TEXT("-log -logfile=\"{}\" -runDotNetClassLibStripping -mutex -binaries=\"{}\""), TEXT("-log -logfile=\"{}\" -runDotNetClassLibStripping -mutex -binaries=\"{}\" {}"),
logFile, data.DataOutputPath); logFile, data.DataOutputPath, GAME_BUILD_DOTNET_VER);
for (const String& define : data.CustomDefines) for (const String& define : data.CustomDefines)
{ {
args += TEXT(" -D"); args += TEXT(" -D");
@@ -277,7 +284,7 @@ bool DeployDataStep::Perform(CookingData& data)
} }
if (ScriptsBuilder::RunBuildTool(args)) if (ScriptsBuilder::RunBuildTool(args))
{ {
data.Error(TEXT("Failed to optimize .Net class library.")); data.Error(TEXT("Failed to optimize .NET class library."));
return true; return true;
} }
} }
@@ -360,7 +367,7 @@ bool DeployDataStep::Perform(CookingData& data)
data.AddRootEngineAsset(PRE_INTEGRATED_GF_ASSET_NAME); data.AddRootEngineAsset(PRE_INTEGRATED_GF_ASSET_NAME);
data.AddRootEngineAsset(SMAA_AREA_TEX); data.AddRootEngineAsset(SMAA_AREA_TEX);
data.AddRootEngineAsset(SMAA_SEARCH_TEX); data.AddRootEngineAsset(SMAA_SEARCH_TEX);
if (data.Configuration != BuildConfiguration::Release) if (!buildSettings.SkipDefaultFonts)
data.AddRootEngineAsset(TEXT("Editor/Fonts/Roboto-Regular")); data.AddRootEngineAsset(TEXT("Editor/Fonts/Roboto-Regular"));
// Register custom assets (eg. plugins) // Register custom assets (eg. plugins)
@@ -67,8 +67,8 @@ bool PrecompileAssembliesStep::Perform(CookingData& data)
data.GetBuildPlatformName(platform, architecture); data.GetBuildPlatformName(platform, architecture);
const String logFile = data.CacheDirectory / TEXT("AOTLog.txt"); const String logFile = data.CacheDirectory / TEXT("AOTLog.txt");
String args = String::Format( String args = String::Format(
TEXT("-log -logfile=\"{}\" -runDotNetAOT -mutex -platform={} -arch={} -configuration={} -aotMode={} -binaries=\"{}\" -intermediate=\"{}\""), TEXT("-log -logfile=\"{}\" -runDotNetAOT -mutex -platform={} -arch={} -configuration={} -aotMode={} -binaries=\"{}\" -intermediate=\"{}\" {}"),
logFile, platform, architecture, configuration, ToString(aotMode), data.DataOutputPath, data.ManagedCodeOutputPath); logFile, platform, architecture, configuration, ToString(aotMode), data.DataOutputPath, data.ManagedCodeOutputPath, GAME_BUILD_DOTNET_VER);
if (!buildSettings.SkipUnusedDotnetLibsPackaging) if (!buildSettings.SkipUnusedDotnetLibsPackaging)
args += TEXT(" -skipUnusedDotnetLibs=false"); // Run AOT on whole class library (not just used libs) args += TEXT(" -skipUnusedDotnetLibs=false"); // Run AOT on whole class library (not just used libs)
for (const String& define : data.CustomDefines) for (const String& define : data.CustomDefines)
+42 -41
View File
@@ -7,9 +7,8 @@ using FlaxEditor.CustomEditors.GUI;
using FlaxEditor.Scripting; using FlaxEditor.Scripting;
using FlaxEngine; using FlaxEngine;
using FlaxEngine.GUI; using FlaxEngine.GUI;
using FlaxEngine.Json;
using FlaxEngine.Utilities; using FlaxEngine.Utilities;
using Newtonsoft.Json;
using JsonSerializer = FlaxEngine.Json.JsonSerializer;
namespace FlaxEditor.CustomEditors namespace FlaxEditor.CustomEditors
{ {
@@ -157,6 +156,12 @@ namespace FlaxEditor.CustomEditors
var values = _values; var values = _values;
var presenter = _presenter; var presenter = _presenter;
var layout = _layout; var layout = _layout;
if (layout.Editors.Count > 1)
{
// There are more editors using the same layout so rebuild parent editor to prevent removing others editors
_parent?.RebuildLayout();
return;
}
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;
@@ -380,22 +385,22 @@ namespace FlaxEditor.CustomEditors
LinkedLabel = label; LinkedLabel = label;
} }
private void RevertDiffToDefault(CustomEditor editor) /// <summary>
{ /// If true, the value reverting to default/reference will be handled via iteration over children editors, instead of for a whole object at once.
if (editor.ChildrenEditors.Count == 0) /// </summary>
{ public virtual bool RevertValueWithChildren => ChildrenEditors.Count != 0;
// Skip if no change detected
if (!editor.Values.IsDefaultValueModified)
return;
editor.SetValueToDefault(); private void RevertDiffToDefault()
{
if (RevertValueWithChildren)
{
foreach (var child in ChildrenEditors)
child.RevertDiffToDefault();
} }
else else
{ {
for (int i = 0; i < editor.ChildrenEditors.Count; i++) if (Values.IsDefaultValueModified)
{ SetValueToDefault();
RevertDiffToDefault(editor.ChildrenEditors[i]);
}
} }
} }
@@ -408,11 +413,6 @@ namespace FlaxEditor.CustomEditors
{ {
if (!Values.IsDefaultValueModified) if (!Values.IsDefaultValueModified)
return false; return false;
// Skip array items (show diff only on a bottom level properties and fields)
if (ParentEditor is Editors.ArrayEditor)
return false;
return true; return true;
} }
} }
@@ -424,7 +424,7 @@ namespace FlaxEditor.CustomEditors
{ {
if (!Values.HasDefaultValue) if (!Values.HasDefaultValue)
return; return;
RevertDiffToDefault(this); RevertDiffToDefault();
} }
/// <summary> /// <summary>
@@ -462,22 +462,17 @@ namespace FlaxEditor.CustomEditors
} }
} }
private void RevertDiffToReference(CustomEditor editor) private void RevertDiffToReference()
{ {
if (editor.ChildrenEditors.Count == 0) if (RevertValueWithChildren)
{ {
// Skip if no change detected foreach (var child in ChildrenEditors)
if (!editor.Values.IsReferenceValueModified) child.RevertDiffToReference();
return;
editor.SetValueToReference();
} }
else else
{ {
for (int i = 0; i < editor.ChildrenEditors.Count; i++) if (Values.IsReferenceValueModified)
{ SetValueToReference();
RevertDiffToReference(editor.ChildrenEditors[i]);
}
} }
} }
@@ -490,11 +485,6 @@ namespace FlaxEditor.CustomEditors
{ {
if (!Values.IsReferenceValueModified) if (!Values.IsReferenceValueModified)
return false; return false;
// Skip array items (show diff only on a bottom level properties and fields)
if (ParentEditor is Editors.ArrayEditor)
return false;
return true; return true;
} }
} }
@@ -506,7 +496,7 @@ namespace FlaxEditor.CustomEditors
{ {
if (!Values.HasReferenceValue) if (!Values.HasReferenceValue)
return; return;
RevertDiffToReference(this); RevertDiffToReference();
} }
/// <summary> /// <summary>
@@ -651,7 +641,7 @@ namespace FlaxEditor.CustomEditors
// Default // Default
try try
{ {
obj = JsonConvert.DeserializeObject(text, TypeUtils.GetType(Values.Type), JsonSerializer.Settings); obj = Newtonsoft.Json.JsonConvert.DeserializeObject(text, TypeUtils.GetType(Values.Type), JsonSerializer.Settings);
} }
catch catch
{ {
@@ -756,7 +746,7 @@ namespace FlaxEditor.CustomEditors
/// </summary> /// </summary>
public void SetValueToDefault() public void SetValueToDefault()
{ {
SetValue(Values.DefaultValue); SetValueCloned(Values.DefaultValue);
} }
/// <summary> /// <summary>
@@ -793,7 +783,19 @@ namespace FlaxEditor.CustomEditors
return; return;
} }
SetValue(Values.ReferenceValue); SetValueCloned(Values.ReferenceValue);
}
private void SetValueCloned(object value)
{
// For objects (eg. arrays) we need to clone them to prevent editing default/reference value within editor
if (value != null && !value.GetType().IsValueType)
{
var json = JsonSerializer.Serialize(value);
value = JsonSerializer.Deserialize(json, value.GetType());
}
SetValue(value);
} }
/// <summary> /// <summary>
@@ -805,7 +807,6 @@ namespace FlaxEditor.CustomEditors
{ {
if (_isSetBlocked) if (_isSetBlocked)
return; return;
if (OnDirty(this, value, token)) if (OnDirty(this, value, token))
{ {
_hasValueDirty = true; _hasValueDirty = true;
@@ -37,6 +37,23 @@ namespace FlaxEditor.CustomEditors
UseDefault = 1 << 2, UseDefault = 1 << 2,
} }
/// <summary>
/// The interface for Editor context that owns the presenter. Can be <see cref="FlaxEditor.Windows.PropertiesWindow"/> or <see cref="FlaxEditor.Windows.Assets.PrefabWindow"/> or other window/panel - custom editor scan use it for more specific features.
/// </summary>
public interface IPresenterOwner
{
/// <summary>
/// Gets the viewport linked with properties presenter (optional, null if unused).
/// </summary>
public Viewport.EditorViewport PresenterViewport { get; }
/// <summary>
/// Selects the scene objects.
/// </summary>
/// <param name="nodes">The nodes to select</param>
public void Select(List<SceneGraph.SceneGraphNode> nodes);
}
/// <summary> /// <summary>
/// Main class for Custom Editors used to present selected objects properties and allow to modify them. /// Main class for Custom Editors used to present selected objects properties and allow to modify them.
/// </summary> /// </summary>
@@ -68,8 +85,15 @@ namespace FlaxEditor.CustomEditors
/// <inheritdoc /> /// <inheritdoc />
public override void Update(float deltaTime) public override void Update(float deltaTime)
{ {
// Update editors try
_presenter.Update(); {
// Update editors
_presenter.Update();
}
catch (Exception ex)
{
FlaxEditor.Editor.LogWarning(ex);
}
base.Update(deltaTime); base.Update(deltaTime);
} }
@@ -254,7 +278,7 @@ namespace FlaxEditor.CustomEditors
/// <summary> /// <summary>
/// The Editor context that owns this presenter. Can be <see cref="FlaxEditor.Windows.PropertiesWindow"/> or <see cref="FlaxEditor.Windows.Assets.PrefabWindow"/> or other window/panel - custom editor scan use it for more specific features. /// The Editor context that owns this presenter. Can be <see cref="FlaxEditor.Windows.PropertiesWindow"/> or <see cref="FlaxEditor.Windows.Assets.PrefabWindow"/> or other window/panel - custom editor scan use it for more specific features.
/// </summary> /// </summary>
public object Owner; public IPresenterOwner Owner;
/// <summary> /// <summary>
/// Gets or sets the text to show when no object is selected. /// Gets or sets the text to show when no object is selected.
@@ -270,7 +294,24 @@ namespace FlaxEditor.CustomEditors
} }
} }
/// <summary>
/// Gets or sets the value indicating whether properties are read-only.
/// </summary>
public bool ReadOnly
{
get => _readOnly;
set
{
if (_readOnly != value)
{
_readOnly = value;
UpdateReadOnly();
}
}
}
private bool _buildOnUpdate; private bool _buildOnUpdate;
private bool _readOnly;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="CustomEditorPresenter"/> class. /// Initializes a new instance of the <see cref="CustomEditorPresenter"/> class.
@@ -278,7 +319,7 @@ namespace FlaxEditor.CustomEditors
/// <param name="undo">The undo. It's optional.</param> /// <param name="undo">The undo. It's optional.</param>
/// <param name="noSelectionText">The custom text to display when no object is selected. Default is No selection.</param> /// <param name="noSelectionText">The custom text to display when no object is selected. Default is No selection.</param>
/// <param name="owner">The owner of the presenter.</param> /// <param name="owner">The owner of the presenter.</param>
public CustomEditorPresenter(Undo undo, string noSelectionText = null, object owner = null) public CustomEditorPresenter(Undo undo, string noSelectionText = null, IPresenterOwner owner = null)
{ {
Undo = undo; Undo = undo;
Owner = owner; Owner = owner;
@@ -364,6 +405,8 @@ namespace FlaxEditor.CustomEditors
// Restore scroll value // Restore scroll value
if (parentScrollV > -1) if (parentScrollV > -1)
panel.VScrollBar.Value = parentScrollV; panel.VScrollBar.Value = parentScrollV;
if (_readOnly)
UpdateReadOnly();
} }
/// <summary> /// <summary>
@@ -374,6 +417,16 @@ namespace FlaxEditor.CustomEditors
_buildOnUpdate = true; _buildOnUpdate = true;
} }
private void UpdateReadOnly()
{
// Only scrollbars are enabled
foreach (var child in Panel.Children)
{
if (!(child is ScrollBar))
child.Enabled = !_readOnly;
}
}
private void ExpandGroups(LayoutElementsContainer c, bool open) private void ExpandGroups(LayoutElementsContainer c, bool open)
{ {
if (c is Elements.GroupElement group) if (c is Elements.GroupElement group)
@@ -0,0 +1,97 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using FlaxEditor.Gizmo;
using FlaxEditor.Scripting;
using FlaxEngine;
using FlaxEngine.GUI;
using FlaxEngine.Json;
using FlaxEngine.Tools;
namespace FlaxEditor.CustomEditors.Dedicated
{
/// <summary>
/// Custom editor for <see cref="Cloth"/>.
/// </summary>
/// <seealso cref="ActorEditor" />
[CustomEditor(typeof(Cloth)), DefaultEditor]
class ClothEditor : ActorEditor
{
private ClothPaintingGizmoMode _gizmoMode;
private Viewport.Modes.EditorGizmoMode _prevMode;
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
{
base.Initialize(layout);
if (Values.Count != 1)
return;
// Add gizmo painting mode to the viewport
var owner = Presenter.Owner;
if (owner == null)
return;
var gizmoOwner = owner as IGizmoOwner ?? owner.PresenterViewport as IGizmoOwner;
if (gizmoOwner == null)
return;
var gizmos = gizmoOwner.Gizmos;
_gizmoMode = new ClothPaintingGizmoMode();
var projectCache = Editor.Instance.ProjectCache;
if (projectCache.TryGetCustomData("ClothGizmoPaintValue", out var cachedPaintValue))
_gizmoMode.PaintValue = JsonSerializer.Deserialize<float>(cachedPaintValue);
if (projectCache.TryGetCustomData("ClothGizmoContinuousPaint", out var cachedContinuousPaint))
_gizmoMode.ContinuousPaint = JsonSerializer.Deserialize<bool>(cachedContinuousPaint);
if (projectCache.TryGetCustomData("ClothGizmoBrushFalloff", out var cachedBrushFalloff))
_gizmoMode.BrushFalloff = JsonSerializer.Deserialize<float>(cachedBrushFalloff);
if (projectCache.TryGetCustomData("ClothGizmoBrushSize", out var cachedBrushSize))
_gizmoMode.BrushSize = JsonSerializer.Deserialize<float>(cachedBrushSize);
if (projectCache.TryGetCustomData("ClothGizmoBrushStrength", out var cachedBrushStrength))
_gizmoMode.BrushStrength = JsonSerializer.Deserialize<float>(cachedBrushStrength);
gizmos.AddMode(_gizmoMode);
_prevMode = gizmos.ActiveMode;
gizmos.ActiveMode = _gizmoMode;
_gizmoMode.Gizmo.SetPaintCloth((Cloth)Values[0]);
// Insert gizmo mode options to properties editing
var paintGroup = layout.Group("Cloth Painting");
var paintValue = new ReadOnlyValueContainer(new ScriptType(typeof(ClothPaintingGizmoMode)), _gizmoMode);
paintGroup.Object(paintValue);
{
var grid = paintGroup.CustomContainer<UniformGridPanel>();
var gridControl = grid.CustomControl;
gridControl.ClipChildren = false;
gridControl.Height = Button.DefaultHeight;
gridControl.SlotsHorizontally = 2;
gridControl.SlotsVertically = 1;
grid.Button("Fill", "Fills the cloth particles with given paint value.").Button.Clicked += _gizmoMode.Gizmo.Fill;
grid.Button("Reset", "Clears the cloth particles paint.").Button.Clicked += _gizmoMode.Gizmo.Reset;
}
}
/// <inheritdoc />
protected override void Deinitialize()
{
// Cleanup gizmos
if (_gizmoMode != null)
{
var gizmos = _gizmoMode.Owner.Gizmos;
if (gizmos.ActiveMode == _gizmoMode)
gizmos.ActiveMode = _prevMode;
gizmos.RemoveMode(_gizmoMode);
var projectCache = Editor.Instance.ProjectCache;
projectCache.SetCustomData("ClothGizmoPaintValue", JsonSerializer.Serialize(_gizmoMode.PaintValue, typeof(float)));
projectCache.SetCustomData("ClothGizmoContinuousPaint", JsonSerializer.Serialize(_gizmoMode.ContinuousPaint, typeof(bool)));
projectCache.SetCustomData("ClothGizmoBrushFalloff", JsonSerializer.Serialize(_gizmoMode.BrushFalloff, typeof(float)));
projectCache.SetCustomData("ClothGizmoBrushSize", JsonSerializer.Serialize(_gizmoMode.BrushSize, typeof(float)));
projectCache.SetCustomData("ClothGizmoBrushStrength", JsonSerializer.Serialize(_gizmoMode.BrushStrength, typeof(float)));
_gizmoMode.Dispose();
_gizmoMode = null;
}
_prevMode = null;
base.Deinitialize();
}
}
}
@@ -0,0 +1,349 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using System;
using System.IO;
using System.Linq;
using FlaxEditor.CustomEditors.Editors;
using FlaxEditor.CustomEditors.Elements;
using FlaxEditor.GUI;
using FlaxEditor.Scripting;
using FlaxEngine;
using FlaxEngine.GUI;
namespace FlaxEditor.CustomEditors.Dedicated
{
/// <summary>
/// Custom editor for <see cref="ModelInstanceActor.MeshReference"/>.
/// </summary>
/// <seealso cref="ActorEditor" />
[CustomEditor(typeof(ModelInstanceActor.MeshReference)), DefaultEditor]
public class MeshReferenceEditor : CustomEditor
{
private class MeshRefPickerControl : Control
{
private ModelInstanceActor.MeshReference _value = new ModelInstanceActor.MeshReference { LODIndex = -1, MeshIndex = -1 };
private string _valueName;
private Float2 _mousePos;
public string[][] MeshNames;
public event Action ValueChanged;
public ModelInstanceActor.MeshReference Value
{
get => _value;
set
{
if (_value.LODIndex == value.LODIndex && _value.MeshIndex == value.MeshIndex)
return;
_value = value;
if (value.LODIndex == -1 || value.MeshIndex == -1)
_valueName = null;
else if (MeshNames.Length == 1)
_valueName = MeshNames[value.LODIndex][value.MeshIndex];
else
_valueName = $"LOD{value.LODIndex} - {MeshNames[value.LODIndex][value.MeshIndex]}";
ValueChanged?.Invoke();
}
}
public MeshRefPickerControl()
: base(0, 0, 50, 16)
{
}
private void ShowDropDownMenu()
{
// Show context menu with tree structure of LODs and meshes
Focus();
var cm = new ItemsListContextMenu(200);
var meshNames = MeshNames;
var actor = _value.Actor;
for (int lodIndex = 0; lodIndex < meshNames.Length; lodIndex++)
{
var item = new ItemsListContextMenu.Item
{
Name = "LOD" + lodIndex,
Tag = new ModelInstanceActor.MeshReference { Actor = actor, LODIndex = lodIndex, MeshIndex = 0 },
TintColor = new Color(0.8f, 0.8f, 1.0f, 0.8f),
};
cm.AddItem(item);
for (int meshIndex = 0; meshIndex < meshNames[lodIndex].Length; meshIndex++)
{
item = new ItemsListContextMenu.Item
{
Name = " " + meshNames[lodIndex][meshIndex],
Tag = new ModelInstanceActor.MeshReference { Actor = actor, LODIndex = lodIndex, MeshIndex = meshIndex },
};
if (_value.LODIndex == lodIndex && _value.MeshIndex == meshIndex)
item.BackgroundColor = FlaxEngine.GUI.Style.Current.BackgroundSelected;
cm.AddItem(item);
}
}
cm.ItemClicked += item => Value = (ModelInstanceActor.MeshReference)item.Tag;
cm.Show(Parent, BottomLeft);
}
/// <inheritdoc />
public override void Draw()
{
base.Draw();
// Cache data
var style = FlaxEngine.GUI.Style.Current;
bool isSelected = _valueName != null;
bool isEnabled = EnabledInHierarchy;
var frameRect = new Rectangle(0, 0, Width, 16);
if (isSelected)
frameRect.Width -= 16;
frameRect.Width -= 16;
var nameRect = new Rectangle(2, 1, frameRect.Width - 4, 14);
var button1Rect = new Rectangle(nameRect.Right + 2, 1, 14, 14);
var button2Rect = new Rectangle(button1Rect.Right + 2, 1, 14, 14);
// Draw frame
Render2D.DrawRectangle(frameRect, isEnabled && (IsMouseOver || IsNavFocused) ? style.BorderHighlighted : style.BorderNormal);
// Check if has item selected
if (isSelected)
{
// Draw name
Render2D.PushClip(nameRect);
Render2D.DrawText(style.FontMedium, _valueName, nameRect, isEnabled ? style.Foreground : style.ForegroundDisabled, TextAlignment.Near, TextAlignment.Center);
Render2D.PopClip();
// Draw deselect button
Render2D.DrawSprite(style.Cross, button1Rect, isEnabled && button1Rect.Contains(_mousePos) ? style.Foreground : style.ForegroundGrey);
}
else
{
// Draw info
Render2D.DrawText(style.FontMedium, "-", nameRect, isEnabled ? Color.OrangeRed : Color.DarkOrange, TextAlignment.Near, TextAlignment.Center);
}
// Draw picker button
var pickerRect = isSelected ? button2Rect : button1Rect;
Render2D.DrawSprite(style.ArrowDown, pickerRect, isEnabled && pickerRect.Contains(_mousePos) ? style.Foreground : style.ForegroundGrey);
}
/// <inheritdoc />
public override void OnMouseEnter(Float2 location)
{
_mousePos = location;
base.OnMouseEnter(location);
}
/// <inheritdoc />
public override void OnMouseLeave()
{
_mousePos = Float2.Minimum;
base.OnMouseLeave();
}
/// <inheritdoc />
public override void OnMouseMove(Float2 location)
{
_mousePos = location;
base.OnMouseMove(location);
}
/// <inheritdoc />
public override bool OnMouseUp(Float2 location, MouseButton button)
{
// Cache data
bool isSelected = _valueName != null;
var frameRect = new Rectangle(0, 0, Width, 16);
if (isSelected)
frameRect.Width -= 16;
frameRect.Width -= 16;
var nameRect = new Rectangle(2, 1, frameRect.Width - 4, 14);
var button1Rect = new Rectangle(nameRect.Right + 2, 1, 14, 14);
var button2Rect = new Rectangle(button1Rect.Right + 2, 1, 14, 14);
// Deselect
if (isSelected && button1Rect.Contains(ref location))
Value = new ModelInstanceActor.MeshReference { Actor = null, LODIndex = -1, MeshIndex = -1 };
// Picker dropdown menu
if ((isSelected ? button2Rect : button1Rect).Contains(ref location))
ShowDropDownMenu();
return base.OnMouseUp(location, button);
}
/// <inheritdoc />
public override bool OnMouseDoubleClick(Float2 location, MouseButton button)
{
Focus();
// Open model editor window
if (_value.Actor is StaticModel staticModel)
Editor.Instance.ContentEditing.Open(staticModel.Model);
else if (_value.Actor is AnimatedModel animatedModel)
Editor.Instance.ContentEditing.Open(animatedModel.SkinnedModel);
return base.OnMouseDoubleClick(location, button);
}
/// <inheritdoc />
public override void OnSubmit()
{
base.OnSubmit();
ShowDropDownMenu();
}
/// <inheritdoc />
public override void OnDestroy()
{
MeshNames = null;
_valueName = null;
base.OnDestroy();
}
}
private ModelInstanceActor _actor;
private CustomElement<FlaxObjectRefPickerControl> _actorPicker;
private CustomElement<MeshRefPickerControl> _meshPicker;
/// <inheritdoc />
public override DisplayStyle Style => DisplayStyle.Inline;
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
{
// Get the context actor to pick the mesh from it
if (GetActor(out var actor))
{
// TODO: support editing multiple values
layout.Label("Different values");
return;
}
_actor = actor;
if (ParentEditor.Values.Any(x => x is Cloth))
{
// Cloth always picks the parent model mesh
if (actor == null)
{
layout.Label("Cloth needs to be added as a child to model actor.");
}
}
else
{
// Actor reference picker
_actorPicker = layout.Custom<FlaxObjectRefPickerControl>();
_actorPicker.CustomControl.Type = new ScriptType(typeof(ModelInstanceActor));
_actorPicker.CustomControl.ValueChanged += () => SetValue(new ModelInstanceActor.MeshReference { Actor = (ModelInstanceActor)_actorPicker.CustomControl.Value });
}
if (actor != null)
{
// Get mesh names hierarchy
string[][] meshNames;
if (actor is StaticModel staticModel)
{
var model = staticModel.Model;
if (model == null || model.WaitForLoaded())
{
layout.Label("No model.");
return;
}
var materials = model.MaterialSlots;
var lods = model.LODs;
meshNames = new string[lods.Length][];
for (int lodIndex = 0; lodIndex < lods.Length; lodIndex++)
{
var lodMeshes = lods[lodIndex].Meshes;
meshNames[lodIndex] = new string[lodMeshes.Length];
for (int meshIndex = 0; meshIndex < lodMeshes.Length; meshIndex++)
{
var mesh = lodMeshes[meshIndex];
var materialName = materials[mesh.MaterialSlotIndex].Name;
if (string.IsNullOrEmpty(materialName) && materials[mesh.MaterialSlotIndex].Material)
materialName = Path.GetFileNameWithoutExtension(materials[mesh.MaterialSlotIndex].Material.Path);
if (string.IsNullOrEmpty(materialName))
meshNames[lodIndex][meshIndex] = $"Mesh {meshIndex}";
else
meshNames[lodIndex][meshIndex] = $"Mesh {meshIndex} ({materialName})";
}
}
}
else if (actor is AnimatedModel animatedModel)
{
var skinnedModel = animatedModel.SkinnedModel;
if (skinnedModel == null || skinnedModel.WaitForLoaded())
{
layout.Label("No model.");
return;
}
var materials = skinnedModel.MaterialSlots;
var lods = skinnedModel.LODs;
meshNames = new string[lods.Length][];
for (int lodIndex = 0; lodIndex < lods.Length; lodIndex++)
{
var lodMeshes = lods[lodIndex].Meshes;
meshNames[lodIndex] = new string[lodMeshes.Length];
for (int meshIndex = 0; meshIndex < lodMeshes.Length; meshIndex++)
{
var mesh = lodMeshes[meshIndex];
var materialName = materials[mesh.MaterialSlotIndex].Name;
if (string.IsNullOrEmpty(materialName) && materials[mesh.MaterialSlotIndex].Material)
materialName = Path.GetFileNameWithoutExtension(materials[mesh.MaterialSlotIndex].Material.Path);
if (string.IsNullOrEmpty(materialName))
meshNames[lodIndex][meshIndex] = $"Mesh {meshIndex}";
else
meshNames[lodIndex][meshIndex] = $"Mesh {meshIndex} ({materialName})";
}
}
}
else
return; // Not supported model type
// Mesh reference picker
_meshPicker = layout.Custom<MeshRefPickerControl>();
_meshPicker.CustomControl.MeshNames = meshNames;
_meshPicker.CustomControl.Value = (ModelInstanceActor.MeshReference)Values[0];
_meshPicker.CustomControl.ValueChanged += () => SetValue(_meshPicker.CustomControl.Value);
}
}
/// <inheritdoc />
public override void Refresh()
{
base.Refresh();
if (_actorPicker != null)
{
GetActor(out var actor);
_actorPicker.CustomControl.Value = actor;
if (actor != _actor)
{
RebuildLayout();
return;
}
}
if (_meshPicker != null)
{
_meshPicker.CustomControl.Value = (ModelInstanceActor.MeshReference)Values[0];
}
}
private bool GetActor(out ModelInstanceActor actor)
{
actor = null;
foreach (ModelInstanceActor.MeshReference value in Values)
{
if (actor == null)
actor = value.Actor;
else if (actor != value.Actor)
return true;
}
return false;
}
}
}
@@ -0,0 +1,156 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using FlaxEditor.Actions;
using FlaxEditor.CustomEditors.Editors;
using FlaxEditor.GUI;
using FlaxEditor.GUI.ContextMenu;
using FlaxEditor.Scripting;
using FlaxEngine;
using FlaxEngine.GUI;
using System.Collections.Generic;
namespace FlaxEditor.CustomEditors.Dedicated;
/// <summary>
/// The missing script editor.
/// </summary>
[CustomEditor(typeof(MissingScript)), DefaultEditor]
public class MissingScriptEditor : GenericEditor
{
private DropPanel _dropPanel;
private Button _replaceScriptButton;
private CheckBox _shouldReplaceAllCheckbox;
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
{
if (layout.ContainerControl is not DropPanel dropPanel)
{
base.Initialize(layout);
return;
}
_dropPanel = dropPanel;
_dropPanel.HeaderTextColor = Color.OrangeRed;
var replaceScriptPanel = new Panel
{
Parent = _dropPanel,
Height = 64,
};
_replaceScriptButton = new Button
{
Text = "Replace Script",
TooltipText = "Replaces the missing script with a given script type",
AnchorPreset = AnchorPresets.TopCenter,
Bounds = new Rectangle(-120, 0, 240, 24),
Parent = replaceScriptPanel,
};
_replaceScriptButton.Clicked += OnReplaceScriptButtonClicked;
var replaceAllLabel = new Label
{
Text = "Replace all matching missing scripts",
TooltipText = "Whether or not to apply this script change to all scripts missing the same type.",
AnchorPreset = AnchorPresets.BottomCenter,
Y = -38,
Parent = replaceScriptPanel,
};
_shouldReplaceAllCheckbox = new CheckBox
{
TooltipText = replaceAllLabel.TooltipText,
AnchorPreset = AnchorPresets.BottomCenter,
Y = -38,
Parent = replaceScriptPanel,
};
_shouldReplaceAllCheckbox.X -= _replaceScriptButton.Width * 0.5f + 0.5f;
replaceAllLabel.X -= 52;
base.Initialize(layout);
}
private void FindActorsWithMatchingMissingScript(List<MissingScript> missingScripts)
{
foreach (Actor actor in Level.GetActors(typeof(Actor)))
{
for (int scriptIndex = 0; scriptIndex < actor.ScriptsCount; scriptIndex++)
{
Script actorScript = actor.Scripts[scriptIndex];
if (actorScript is not MissingScript missingActorScript)
continue;
MissingScript currentMissing = Values[0] as MissingScript;
if (missingActorScript.MissingTypeName != currentMissing.MissingTypeName)
continue;
missingScripts.Add(missingActorScript);
}
}
}
private void RunReplacementMultiCast(List<IUndoAction> actions)
{
if (actions.Count == 0)
{
Editor.LogWarning("Failed to replace scripts!");
return;
}
var multiAction = new MultiUndoAction(actions);
multiAction.Do();
var presenter = ParentEditor.Presenter;
if (presenter != null)
{
presenter.Undo.AddAction(multiAction);
presenter.Control.Focus();
}
}
private void ReplaceScript(ScriptType script, bool replaceAllInScene)
{
var actions = new List<IUndoAction>(4);
var missingScripts = new List<MissingScript>();
if (!replaceAllInScene)
missingScripts.Add((MissingScript)Values[0]);
else
FindActorsWithMatchingMissingScript(missingScripts);
foreach (var missingScript in missingScripts)
actions.Add(AddRemoveScript.Add(missingScript.Actor, script));
RunReplacementMultiCast(actions);
for (int actionIdx = 0; actionIdx < actions.Count; actionIdx++)
{
AddRemoveScript addRemoveScriptAction = (AddRemoveScript)actions[actionIdx];
int orderInParent = addRemoveScriptAction.GetOrderInParent();
Script newScript = missingScripts[actionIdx].Actor.Scripts[orderInParent];
missingScripts[actionIdx].ReferenceScript = newScript;
}
actions.Clear();
foreach (var missingScript in missingScripts)
actions.Add(AddRemoveScript.Remove(missingScript));
RunReplacementMultiCast(actions);
}
private void OnReplaceScriptButtonClicked()
{
var scripts = Editor.Instance.CodeEditing.Scripts.Get();
if (scripts.Count == 0)
{
// No scripts
var cm1 = new ContextMenu();
cm1.AddButton("No scripts in project");
cm1.Show(_dropPanel, _replaceScriptButton.BottomLeft);
return;
}
// Show context menu with list of scripts to add
var cm = new ItemsListContextMenu(180);
for (int i = 0; i < scripts.Count; i++)
cm.AddItem(new TypeSearchPopup.TypeItemView(scripts[i]));
cm.ItemClicked += item => ReplaceScript((ScriptType)item.Tag, _shouldReplaceAllCheckbox.Checked);
cm.SortItems();
cm.Show(_dropPanel, _replaceScriptButton.BottomLeft - new Float2((cm.Width - _replaceScriptButton.Width) / 2, 0));
}
}
@@ -0,0 +1,84 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using System;
using System.IO;
using FlaxEditor.Content;
using FlaxEditor.CustomEditors.Editors;
using FlaxEngine;
using FlaxEngine.GUI;
using FlaxEngine.Tools;
namespace FlaxEditor.CustomEditors.Dedicated;
/// <summary>
/// The missing script editor.
/// </summary>
[CustomEditor(typeof(ModelPrefab)), DefaultEditor]
public class ModelPrefabEditor : GenericEditor
{
private Guid _prefabId;
private Button _reimportButton;
private string _importPath;
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
{
base.Initialize(layout);
var modelPrefab = Values[0] as ModelPrefab;
if (modelPrefab == null)
return;
_prefabId = modelPrefab.PrefabID;
while (true)
{
if (_prefabId == Guid.Empty)
{
break;
}
var prefab = FlaxEngine.Content.Load<Prefab>(_prefabId);
if (prefab)
{
var prefabObjectId = modelPrefab.PrefabObjectID;
var prefabObject = prefab.GetDefaultInstance(ref prefabObjectId);
if (prefabObject.PrefabID == _prefabId)
break;
_prefabId = prefabObject.PrefabID;
}
}
var button = layout.Button("Reimport", "Reimports the source asset as prefab.");
_reimportButton = button.Button;
_reimportButton.Clicked += OnReimport;
}
private void OnReimport()
{
var prefab = FlaxEngine.Content.Load<Prefab>(_prefabId);
var modelPrefab = (ModelPrefab)Values[0];
var importPath = modelPrefab.ImportPath;
var editor = Editor.Instance;
if (editor.ContentImporting.GetReimportPath("Model Prefab", ref importPath))
return;
var folder = editor.ContentDatabase.Find(Path.GetDirectoryName(prefab.Path)) as ContentFolder;
if (folder == null)
return;
var importOptions = modelPrefab.ImportOptions;
importOptions.Type = ModelTool.ModelType.Prefab;
_importPath = importPath;
_reimportButton.Enabled = false;
editor.ContentImporting.ImportFileEnd += OnImportFileEnd;
editor.ContentImporting.Import(importPath, folder, true, importOptions);
}
private void OnImportFileEnd(IFileEntryAction entry, bool failed)
{
if (entry.SourceUrl == _importPath)
{
// Restore button
_importPath = null;
_reimportButton.Enabled = true;
Editor.Instance.ContentImporting.ImportFileEnd -= OnImportFileEnd;
}
}
}
@@ -25,9 +25,20 @@ namespace FlaxEditor.CustomEditors.Dedicated
get get
{ {
// All selected particle effects use the same system // All selected particle effects use the same system
var effect = (ParticleEffect)Values[0]; var effect = Values[0] as ParticleEffect;
var system = effect.ParticleSystem; var system = effect ? effect.ParticleSystem : null;
return system != null && Values.TrueForAll(x => (x as ParticleEffect)?.ParticleSystem == system); if (system && Values.TrueForAll(x => x is ParticleEffect fx && fx && fx.ParticleSystem == system))
{
// All parameters can be accessed
var parameters = effect.Parameters;
foreach (var parameter in parameters)
{
if (!parameter)
return false;
}
return true;
}
return false;
} }
} }
@@ -50,7 +50,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
grid.Button("Remove bone").Button.ButtonClicked += OnRemoveBone; grid.Button("Remove bone").Button.ButtonClicked += OnRemoveBone;
} }
if (Presenter.Owner is Windows.PropertiesWindow || Presenter.Owner is Windows.Assets.PrefabWindow) if (Presenter.Owner != null)
{ {
// Selection // Selection
var grid = editorGroup.CustomContainer<UniformGridPanel>(); var grid = editorGroup.CustomContainer<UniformGridPanel>();
@@ -309,10 +309,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
if (node != null) if (node != null)
selection.Add(node); selection.Add(node);
} }
if (Presenter.Owner is Windows.PropertiesWindow propertiesWindow) Presenter.Owner.Select(selection);
propertiesWindow.Editor.SceneEditing.Select(selection);
else if (Presenter.Owner is Windows.Assets.PrefabWindow prefabWindow)
prefabWindow.Select(selection);
} }
} }
} }
@@ -25,6 +25,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
private DragHandlers _dragHandlers; private DragHandlers _dragHandlers;
private DragScriptItems _dragScripts; private DragScriptItems _dragScripts;
private DragAssets _dragAssets; private DragAssets _dragAssets;
private Button _addScriptsButton;
/// <summary> /// <summary>
/// The parent scripts editor. /// The parent scripts editor.
@@ -40,16 +41,19 @@ namespace FlaxEditor.CustomEditors.Dedicated
AutoFocus = false; AutoFocus = false;
// Add script button // Add script button
float addScriptButtonWidth = 60.0f; var buttonText = "Add script";
var addScriptButton = new Button var textSize = Style.Current.FontMedium.MeasureText(buttonText);
float addScriptButtonWidth = (textSize.X < 60.0f) ? 60.0f : textSize.X + 4;
var buttonHeight = (textSize.Y < 18) ? 18 : textSize.Y + 4;
_addScriptsButton = new Button
{ {
TooltipText = "Add new scripts to the actor", TooltipText = "Add new scripts to the actor",
AnchorPreset = AnchorPresets.MiddleCenter, AnchorPreset = AnchorPresets.MiddleCenter,
Text = "Add script", Text = buttonText,
Parent = this, Parent = this,
Bounds = new Rectangle((Width - addScriptButtonWidth) / 2, 1, addScriptButtonWidth, 18), Bounds = new Rectangle((Width - addScriptButtonWidth) / 2, 1, addScriptButtonWidth, buttonHeight),
}; };
addScriptButton.ButtonClicked += OnAddScriptButtonClicked; _addScriptsButton.ButtonClicked += OnAddScriptButtonClicked;
} }
private void OnAddScriptButtonClicked(Button button) private void OnAddScriptButtonClicked(Button button)
@@ -82,7 +86,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
var size = Size; var size = Size;
// Info // Info
Render2D.DrawText(style.FontSmall, "Drag scripts here", new Rectangle(2, 22, size.X - 4, size.Y - 4 - 20), style.ForegroundDisabled, TextAlignment.Center, TextAlignment.Center); Render2D.DrawText(style.FontSmall, "Drag scripts here", new Rectangle(2, _addScriptsButton.Height + 4, size.X - 4, size.Y - 4 - 20), style.ForegroundDisabled, TextAlignment.Center, TextAlignment.Center);
// Check if drag is over // Check if drag is over
if (IsDragOver && _dragHandlers != null && _dragHandlers.HasValidDrag) if (IsDragOver && _dragHandlers != null && _dragHandlers.HasValidDrag)
@@ -242,6 +246,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
var multiAction = new MultiUndoAction(actions); var multiAction = new MultiUndoAction(actions);
multiAction.Do(); multiAction.Do();
var presenter = ScriptsEditor.Presenter; var presenter = ScriptsEditor.Presenter;
ScriptsEditor.ParentEditor?.RebuildLayout();
if (presenter != null) if (presenter != null)
{ {
presenter.Undo.AddAction(multiAction); presenter.Undo.AddAction(multiAction);
@@ -254,27 +259,15 @@ namespace FlaxEditor.CustomEditors.Dedicated
/// Small image control added per script group that allows to drag and drop a reference to it. Also used to reorder the scripts. /// Small image control added per script group that allows to drag and drop a reference to it. Also used to reorder the scripts.
/// </summary> /// </summary>
/// <seealso cref="FlaxEngine.GUI.Image" /> /// <seealso cref="FlaxEngine.GUI.Image" />
internal class ScriptDragIcon : Image internal class DragImage : Image
{ {
private ScriptsEditor _editor;
private bool _isMouseDown; private bool _isMouseDown;
private Float2 _mouseDownPos; private Float2 _mouseDownPos;
/// <summary> /// <summary>
/// Gets the target script. /// Action called when drag event should start.
/// </summary> /// </summary>
public Script Script => (Script)Tag; public Action<DragImage> Drag;
/// <summary>
/// Initializes a new instance of the <see cref="ScriptDragIcon"/> class.
/// </summary>
/// <param name="editor">The script editor.</param>
/// <param name="script">The target script.</param>
public ScriptDragIcon(ScriptsEditor editor, Script script)
{
Tag = script;
_editor = editor;
}
/// <inheritdoc /> /// <inheritdoc />
public override void OnMouseEnter(Float2 location) public override void OnMouseEnter(Float2 location)
@@ -287,11 +280,10 @@ namespace FlaxEditor.CustomEditors.Dedicated
/// <inheritdoc /> /// <inheritdoc />
public override void OnMouseLeave() public override void OnMouseLeave()
{ {
// Check if start drag drop
if (_isMouseDown) if (_isMouseDown)
{ {
DoDrag();
_isMouseDown = false; _isMouseDown = false;
Drag(this);
} }
base.OnMouseLeave(); base.OnMouseLeave();
@@ -300,11 +292,10 @@ namespace FlaxEditor.CustomEditors.Dedicated
/// <inheritdoc /> /// <inheritdoc />
public override void OnMouseMove(Float2 location) public override void OnMouseMove(Float2 location)
{ {
// Check if start drag drop
if (_isMouseDown && Float2.Distance(location, _mouseDownPos) > 10.0f) if (_isMouseDown && Float2.Distance(location, _mouseDownPos) > 10.0f)
{ {
DoDrag();
_isMouseDown = false; _isMouseDown = false;
Drag(this);
} }
base.OnMouseMove(location); base.OnMouseMove(location);
@@ -315,8 +306,8 @@ namespace FlaxEditor.CustomEditors.Dedicated
{ {
if (button == MouseButton.Left) if (button == MouseButton.Left)
{ {
// Clear flag
_isMouseDown = false; _isMouseDown = false;
return true;
} }
return base.OnMouseUp(location, button); return base.OnMouseUp(location, button);
@@ -327,21 +318,13 @@ namespace FlaxEditor.CustomEditors.Dedicated
{ {
if (button == MouseButton.Left) if (button == MouseButton.Left)
{ {
// Set flag
_isMouseDown = true; _isMouseDown = true;
_mouseDownPos = location; _mouseDownPos = location;
return true;
} }
return base.OnMouseDown(location, button); return base.OnMouseDown(location, button);
} }
private void DoDrag()
{
var script = Script;
_editor.OnScriptDragChange(true, script);
DoDragDrop(DragScripts.GetDragData(script));
_editor.OnScriptDragChange(false, script);
}
} }
internal class ScriptArrangeBar : Control internal class ScriptArrangeBar : Control
@@ -576,8 +559,8 @@ namespace FlaxEditor.CustomEditors.Dedicated
return; return;
for (int j = 0; j < e.Length; j++) for (int j = 0; j < e.Length; j++)
{ {
var t1 = scripts[j]?.TypeName; var t1 = scripts[j] != null ? scripts[j].TypeName : null;
var t2 = e[j]?.TypeName; var t2 = e[j] != null ? e[j].TypeName : null;
if (t1 != t2) if (t1 != t2)
return; return;
} }
@@ -639,7 +622,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
_scriptToggles[i] = scriptToggle; _scriptToggles[i] = scriptToggle;
// Add drag button to the group // Add drag button to the group
var scriptDrag = new ScriptDragIcon(this, script) var scriptDrag = new DragImage
{ {
TooltipText = "Script reference", TooltipText = "Script reference",
AutoFocus = true, AutoFocus = true,
@@ -650,6 +633,13 @@ namespace FlaxEditor.CustomEditors.Dedicated
Margin = new Margin(1), Margin = new Margin(1),
Brush = new SpriteBrush(Editor.Instance.Icons.DragBar12), Brush = new SpriteBrush(Editor.Instance.Icons.DragBar12),
Tag = script, Tag = script,
Drag = img =>
{
var s = (Script)img.Tag;
OnScriptDragChange(true, s);
img.DoDragDrop(DragScripts.GetDragData(s));
OnScriptDragChange(false, s);
}
}; };
// Add settings button to the group // Add settings button to the group
@@ -1,9 +1,12 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved. // Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using FlaxEditor.Actions; using System;
using FlaxEditor.SceneGraph.Actors; using System.Collections.Generic;
using FlaxEngine; using FlaxEngine;
using FlaxEngine.GUI; using FlaxEditor.Actions;
using FlaxEditor.SceneGraph;
using FlaxEditor.SceneGraph.Actors;
using FlaxEditor.GUI.Tabs;
namespace FlaxEditor.CustomEditors.Dedicated namespace FlaxEditor.CustomEditors.Dedicated
{ {
@@ -14,54 +17,853 @@ namespace FlaxEditor.CustomEditors.Dedicated
[CustomEditor(typeof(Spline)), DefaultEditor] [CustomEditor(typeof(Spline)), DefaultEditor]
public class SplineEditor : ActorEditor public class SplineEditor : ActorEditor
{ {
/// <summary>
/// Storage undo spline data
/// </summary>
private struct UndoData
{
public Spline Spline;
public BezierCurve<Transform>.Keyframe[] BeforeKeyframes;
}
/// <summary>
/// Basis for creating tangent manipulation types for bezier curves.
/// </summary>
private class EditTangentOptionBase
{
/// <summary>
/// Called when user set selected tangent mode.
/// </summary>
/// <param name="spline">Current spline selected on editor viewport.</param>
/// <param name="index">Index of current keyframe selected on spline.</param>
public virtual void OnSetMode(Spline spline, int index)
{
}
/// <summary>
/// Called when user select a keyframe (spline point) of current selected spline on editor viewport.
/// </summary>
/// <param name="spline">Current spline selected on editor viewport.</param>
/// <param name="index">Index of current keyframe selected on spline.</param>
public virtual void OnSelectKeyframe(Spline spline, int index)
{
}
/// <summary>
/// Called when user select a tangent of current keyframe selected from spline.
/// </summary>
/// <param name="spline">Current spline selected on editor viewport.</param>
/// <param name="index">Index of current keyframe selected on spline.</param>
public virtual void OnSelectTangent(Spline spline, int index)
{
}
/// <summary>
/// Called when the tangent in from current keyframe selected from spline is moved on editor viewport.
/// </summary>
/// <param name="spline">Current spline selected on editor viewport.</param>
/// <param name="index">Index of current keyframe selected on spline.</param>
public virtual void OnMoveTangentIn(Spline spline, int index)
{
}
/// <summary>
/// Called when the tangent out from current keyframe selected from spline is moved on editor viewport.
/// </summary>
/// <param name="spline">Current spline selected on editor viewport.</param>
/// <param name="index">Current spline selected on editor viewport.</param>
public virtual void OnMoveTangentOut(Spline spline, int index)
{
}
}
/// <summary>
/// Edit curve options manipulate the curve as free mode
/// </summary>
private sealed class FreeTangentMode : EditTangentOptionBase
{
/// <inheritdoc/>
public override void OnSetMode(Spline spline, int index)
{
if (IsLinearTangentMode(spline, index) || IsSmoothInTangentMode(spline, index) || IsSmoothOutTangentMode(spline, index))
{
SetPointSmooth(spline, index);
}
}
}
/// <summary>
/// Edit curve options to set tangents to linear
/// </summary>
private sealed class LinearTangentMode : EditTangentOptionBase
{
/// <inheritdoc/>
public override void OnSetMode(Spline spline, int index)
{
SetKeyframeLinear(spline, index);
// change the selection to tangent parent (a spline point / keyframe)
SetSelectSplinePointNode(spline, index);
}
}
/// <summary>
/// Edit curve options to align tangents of selected spline
/// </summary>
private sealed class AlignedTangentMode : EditTangentOptionBase
{
/// <inheritdoc/>
public override void OnSetMode(Spline spline, int index)
{
SmoothIfNotAligned(spline, index);
}
/// <inheritdoc/>
public override void OnSelectKeyframe(Spline spline, int index)
{
SmoothIfNotAligned(spline, index);
}
/// <inheritdoc/>
public override void OnMoveTangentIn(Spline spline, int index)
{
SetPointAligned(spline, index, true);
}
/// <inheritdoc/>
public override void OnMoveTangentOut(Spline spline, int index)
{
SetPointAligned(spline, index, false);
}
private void SmoothIfNotAligned(Spline spline, int index)
{
if (!IsAlignedTangentMode(spline, index))
{
SetPointSmooth(spline, index);
}
}
private void SetPointAligned(Spline spline, int index, bool alignWithIn)
{
var keyframe = spline.GetSplineKeyframe(index);
var referenceTangent = alignWithIn ? keyframe.TangentIn : keyframe.TangentOut;
var otherTangent = !alignWithIn ? keyframe.TangentIn : keyframe.TangentOut;
// inverse of reference tangent
otherTangent.Translation = -referenceTangent.Translation.Normalized * otherTangent.Translation.Length;
if (alignWithIn)
keyframe.TangentOut = otherTangent;
if (!alignWithIn)
keyframe.TangentIn = otherTangent;
spline.SetSplineKeyframe(index, keyframe);
}
}
/// <summary>
/// Edit curve options manipulate the curve setting selected point
/// tangent in as smoothed but tangent out as linear
/// </summary>
private sealed class SmoothInTangentMode : EditTangentOptionBase
{
/// <inheritdoc/>
public override void OnSetMode(Spline spline, int index)
{
SetTangentSmoothIn(spline, index);
SetSelectTangentIn(spline, index);
}
}
/// <summary>
/// Edit curve options manipulate the curve setting selected point
/// tangent in as linear but tangent out as smoothed
/// </summary>
private sealed class SmoothOutTangentMode : EditTangentOptionBase
{
/// <inheritdoc/>
public override void OnSetMode(Spline spline, int index)
{
SetTangentSmoothOut(spline, index);
SetSelectTangentOut(spline, index);
}
}
private sealed class IconTab : Tab
{
private sealed class IconTabHeader : Tabs.TabHeader
{
public IconTabHeader(Tabs tabs, Tab tab)
: base(tabs, tab)
{
}
public override bool OnMouseUp(Float2 location, MouseButton button)
{
if (EnabledInHierarchy && Tab.Enabled)
((IconTab)Tab)._action();
return true;
}
public override void Draw()
{
base.Draw();
var tab = (IconTab)Tab;
var enabled = EnabledInHierarchy && tab.EnabledInHierarchy;
var style = FlaxEngine.GUI.Style.Current;
var size = Size;
var textHeight = 16.0f;
var iconSize = size.Y - textHeight;
var iconRect = new Rectangle((Width - iconSize) / 2, 0, iconSize, iconSize);
if (tab._mirrorIcon)
{
iconRect.Location.X += iconRect.Size.X;
iconRect.Size.X *= -1;
}
var color = style.Foreground;
if (!enabled)
color *= 0.6f;
Render2D.DrawSprite(tab._customIcon, iconRect, color);
Render2D.DrawText(style.FontMedium, tab._customText, new Rectangle(0, iconSize, size.X, textHeight), color, TextAlignment.Center, TextAlignment.Center);
}
}
private readonly Action _action;
private readonly string _customText;
private readonly SpriteHandle _customIcon;
private readonly bool _mirrorIcon;
public IconTab(Action action, string text, SpriteHandle icon, bool mirrorIcon = false)
: base(string.Empty, SpriteHandle.Invalid)
{
_action = action;
_customText = text;
_customIcon = icon;
_mirrorIcon = mirrorIcon;
}
public override Tabs.TabHeader CreateHeader()
{
return new IconTabHeader((Tabs)Parent, this);
}
}
private EditTangentOptionBase _currentTangentMode;
private Tabs _selectedPointsTabs, _allPointsTabs;
private Tab _freeTangentTab;
private Tab _linearTangentTab;
private Tab _alignedTangentTab;
private Tab _smoothInTangentTab;
private Tab _smoothOutTangentTab;
private Tab _setLinearAllTangentsTab;
private Tab _setSmoothAllTangentsTab;
private bool _tanInChanged;
private bool _tanOutChanged;
private Vector3 _lastTanInPos;
private Vector3 _lastTanOutPos;
private Spline _selectedSpline;
private SplineNode.SplinePointNode _selectedPoint;
private SplineNode.SplinePointNode _lastPointSelected;
private SplineNode.SplinePointTangentNode _selectedTangentIn;
private SplineNode.SplinePointTangentNode _selectedTangentOut;
private UndoData[] _selectedSplinesUndoData;
private bool HasPointSelected => _selectedPoint != null;
private bool HasTangentsSelected => _selectedTangentIn != null || _selectedTangentOut != null;
/// <inheritdoc /> /// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout) public override void Initialize(LayoutElementsContainer layout)
{ {
base.Initialize(layout); base.Initialize(layout);
if (Values.HasDifferentTypes == false) _currentTangentMode = new FreeTangentMode();
if (Values.HasDifferentTypes || !(Values[0] is Spline spline))
return;
_selectedSpline = spline;
layout.Space(10);
var tabSize = 46;
var icons = Editor.Instance.Icons;
layout.Header("Selected spline point");
_selectedPointsTabs = new Tabs
{ {
layout.Space(10); Height = tabSize,
var grid = layout.CustomContainer<UniformGridPanel>(); TabsSize = new Float2(tabSize),
grid.CustomControl.SlotsHorizontally = 2; AutoTabsSize = true,
grid.CustomControl.SlotsVertically = 1; Parent = layout.ContainerControl,
grid.Button("Set Linear Tangents").Button.Clicked += OnSetTangentsLinear; };
grid.Button("Set Smooth Tangents").Button.Clicked += OnSetTangentsSmooth; _linearTangentTab = _selectedPointsTabs.AddTab(new IconTab(OnSetSelectedLinear, "Linear", icons.SplineLinear64));
_freeTangentTab = _selectedPointsTabs.AddTab(new IconTab(OnSetSelectedFree, "Free", icons.SplineFree64));
_alignedTangentTab = _selectedPointsTabs.AddTab(new IconTab(OnSetSelectedAligned, "Aligned", icons.SplineAligned64));
_smoothInTangentTab = _selectedPointsTabs.AddTab(new IconTab(OnSetSelectedSmoothIn, "Smooth In", icons.SplineSmoothIn64));
_smoothOutTangentTab = _selectedPointsTabs.AddTab(new IconTab(OnSetSelectedSmoothOut, "Smooth Out", icons.SplineSmoothIn64, true));
_selectedPointsTabs.SelectedTabIndex = -1;
layout.Header("All spline points");
_allPointsTabs = new Tabs
{
Height = tabSize,
TabsSize = new Float2(tabSize),
AutoTabsSize = true,
Parent = layout.ContainerControl,
};
_setLinearAllTangentsTab = _allPointsTabs.AddTab(new IconTab(OnSetTangentsLinear, "Set Linear Tangents", icons.SplineLinear64));
_setSmoothAllTangentsTab = _allPointsTabs.AddTab(new IconTab(OnSetTangentsSmooth, "Set Smooth Tangents", icons.SplineAligned64));
_allPointsTabs.SelectedTabIndex = -1;
if (_selectedSpline)
_selectedSpline.SplineUpdated += OnSplineEdited;
SetSelectedTangentTypeAsCurrent();
UpdateEditTabsSelection();
UpdateButtonsEnabled();
}
/// <inheritdoc/>
protected override void Deinitialize()
{
if (_selectedSpline)
_selectedSpline.SplineUpdated -= OnSplineEdited;
}
private void OnSplineEdited()
{
UpdateEditTabsSelection();
UpdateButtonsEnabled();
}
/// <inheritdoc/>
public override void Refresh()
{
base.Refresh();
UpdateSelectedPoint();
UpdateSelectedTangent();
if (!CanEditTangent())
return;
var index = _lastPointSelected.Index;
var currentTangentInPosition = _selectedSpline.GetSplineLocalTangent(index, true).Translation;
var currentTangentOutPosition = _selectedSpline.GetSplineLocalTangent(index, false).Translation;
if (_selectedTangentIn != null)
{
_tanInChanged = _lastTanInPos != currentTangentInPosition;
_lastTanInPos = currentTangentInPosition;
} }
if (_selectedTangentOut != null)
{
_tanOutChanged = _lastTanOutPos != currentTangentOutPosition;
_lastTanOutPos = currentTangentOutPosition;
}
if (_tanInChanged)
_currentTangentMode.OnMoveTangentIn(_selectedSpline, index);
if (_tanOutChanged)
_currentTangentMode.OnMoveTangentOut(_selectedSpline, index);
currentTangentInPosition = _selectedSpline.GetSplineLocalTangent(index, true).Translation;
currentTangentOutPosition = _selectedSpline.GetSplineLocalTangent(index, false).Translation;
// Update last tangents position after changes
if (_selectedSpline)
_lastTanInPos = currentTangentInPosition;
if (_selectedSpline)
_lastTanOutPos = currentTangentOutPosition;
_tanInChanged = false;
_tanOutChanged = false;
}
private void SetSelectedTangentTypeAsCurrent()
{
if (_lastPointSelected == null || _selectedPoint == null)
return;
if (IsLinearTangentMode(_selectedSpline, _lastPointSelected.Index))
SetModeLinear();
else if (IsAlignedTangentMode(_selectedSpline, _lastPointSelected.Index))
SetModeAligned();
else if (IsSmoothInTangentMode(_selectedSpline, _lastPointSelected.Index))
SetModeSmoothIn();
else if (IsSmoothOutTangentMode(_selectedSpline, _lastPointSelected.Index))
SetModeSmoothOut();
else if (IsFreeTangentMode(_selectedSpline, _lastPointSelected.Index))
SetModeFree();
}
private void UpdateEditTabsSelection()
{
_selectedPointsTabs.Enabled = CanEditTangent();
if (!_selectedPointsTabs.Enabled)
{
_selectedPointsTabs.SelectedTabIndex = -1;
return;
}
var isFree = _currentTangentMode is FreeTangentMode;
var isLinear = _currentTangentMode is LinearTangentMode;
var isAligned = _currentTangentMode is AlignedTangentMode;
var isSmoothIn = _currentTangentMode is SmoothInTangentMode;
var isSmoothOut = _currentTangentMode is SmoothOutTangentMode;
if (isFree)
_selectedPointsTabs.SelectedTab = _freeTangentTab;
else if (isLinear)
_selectedPointsTabs.SelectedTab = _linearTangentTab;
else if (isAligned)
_selectedPointsTabs.SelectedTab = _alignedTangentTab;
else if (isSmoothIn)
_selectedPointsTabs.SelectedTab = _smoothInTangentTab;
else if (isSmoothOut)
_selectedPointsTabs.SelectedTab = _smoothOutTangentTab;
else
_selectedPointsTabs.SelectedTabIndex = -1;
}
private void UpdateButtonsEnabled()
{
_linearTangentTab.Enabled = CanEditTangent();
_freeTangentTab.Enabled = CanEditTangent();
_alignedTangentTab.Enabled = CanEditTangent();
_smoothInTangentTab.Enabled = CanSetTangentSmoothIn();
_smoothOutTangentTab.Enabled = CanSetTangentSmoothOut();
_setLinearAllTangentsTab.Enabled = CanSetAllTangentsLinear();
_setSmoothAllTangentsTab.Enabled = CanSetAllTangentsSmooth();
}
private bool CanEditTangent()
{
return !HasDifferentTypes && !HasDifferentValues && (HasPointSelected || HasTangentsSelected);
}
private bool CanSetTangentSmoothIn()
{
if (!CanEditTangent())
return false;
return _lastPointSelected.Index != 0;
}
private bool CanSetTangentSmoothOut()
{
if (!CanEditTangent())
return false;
return _lastPointSelected.Index < _selectedSpline.SplinePointsCount - 1;
}
private bool CanSetAllTangentsSmooth()
{
return _selectedSpline != null;
}
private bool CanSetAllTangentsLinear()
{
return _selectedSpline != null;
}
private void SetModeLinear()
{
if (_currentTangentMode is LinearTangentMode)
return;
_currentTangentMode = new LinearTangentMode();
_currentTangentMode.OnSetMode(_selectedSpline, _lastPointSelected.Index);
}
private void SetModeFree()
{
if (_currentTangentMode is FreeTangentMode)
return;
_currentTangentMode = new FreeTangentMode();
_currentTangentMode.OnSetMode(_selectedSpline, _lastPointSelected.Index);
}
private void SetModeAligned()
{
if (_currentTangentMode is AlignedTangentMode)
return;
_currentTangentMode = new AlignedTangentMode();
_currentTangentMode.OnSetMode(_selectedSpline, _lastPointSelected.Index);
}
private void SetModeSmoothIn()
{
if (_currentTangentMode is SmoothInTangentMode)
return;
_currentTangentMode = new SmoothInTangentMode();
_currentTangentMode.OnSetMode(_selectedSpline, _lastPointSelected.Index);
}
private void SetModeSmoothOut()
{
if (_currentTangentMode is SmoothOutTangentMode)
return;
_currentTangentMode = new SmoothOutTangentMode();
_currentTangentMode.OnSetMode(_selectedSpline, _lastPointSelected.Index);
}
private void UpdateSelectedPoint()
{
// works only if select one spline
if (_selectedSpline)
{
var currentSelected = Editor.Instance.SceneEditing.Selection[0];
if (currentSelected == _selectedPoint)
return;
if (currentSelected is SplineNode.SplinePointNode selectedPoint)
{
_selectedPoint = selectedPoint;
_lastPointSelected = _selectedPoint;
_currentTangentMode.OnSelectKeyframe(_selectedSpline, _lastPointSelected.Index);
}
else
{
_selectedPoint = null;
}
}
else
{
_selectedPoint = null;
}
SetSelectedTangentTypeAsCurrent();
UpdateEditTabsSelection();
UpdateButtonsEnabled();
}
private void UpdateSelectedTangent()
{
// works only if select one spline
if (_lastPointSelected == null || Editor.Instance.SceneEditing.SelectionCount != 1)
{
_selectedTangentIn = null;
_selectedTangentOut = null;
return;
}
var currentSelected = Editor.Instance.SceneEditing.Selection[0];
if (currentSelected is not SplineNode.SplinePointTangentNode selectedPoint)
{
_selectedTangentIn = null;
_selectedTangentOut = null;
return;
}
if (currentSelected == _selectedTangentIn)
return;
if (currentSelected == _selectedTangentOut)
return;
var index = _lastPointSelected.Index;
if (currentSelected.Transform == _selectedSpline.GetSplineTangent(index, true))
{
_selectedTangentIn = selectedPoint;
_selectedTangentOut = null;
_currentTangentMode.OnSelectTangent(_selectedSpline, index);
return;
}
if (currentSelected.Transform == _selectedSpline.GetSplineTangent(index, false))
{
_selectedTangentOut = selectedPoint;
_selectedTangentIn = null;
_currentTangentMode.OnSelectTangent(_selectedSpline, index);
return;
}
_selectedTangentIn = null;
_selectedTangentOut = null;
}
private void StartEditSpline()
{
if (Presenter.Undo != null && Presenter.Undo.Enabled)
{
// Capture 'before' state for undo
var splines = new List<UndoData>();
for (int i = 0; i < Values.Count; i++)
{
if (Values[i] is Spline spline)
{
splines.Add(new UndoData
{
Spline = spline,
BeforeKeyframes = spline.SplineKeyframes.Clone() as BezierCurve<Transform>.Keyframe[]
});
}
}
_selectedSplinesUndoData = splines.ToArray();
}
}
private void EndEditSpline()
{
// Update buttons state
UpdateEditTabsSelection();
if (Presenter.Undo != null && Presenter.Undo.Enabled)
{
// Add undo
foreach (var splineUndoData in _selectedSplinesUndoData)
{
Presenter.Undo.AddAction(new EditSplineAction(_selectedSpline, splineUndoData.BeforeKeyframes));
SplineNode.OnSplineEdited(splineUndoData.Spline);
Editor.Instance.Scene.MarkSceneEdited(splineUndoData.Spline.Scene);
}
}
}
private void OnSetSelectedLinear()
{
StartEditSpline();
SetModeLinear();
EndEditSpline();
}
private void OnSetSelectedFree()
{
StartEditSpline();
SetModeFree();
EndEditSpline();
}
private void OnSetSelectedAligned()
{
StartEditSpline();
SetModeAligned();
EndEditSpline();
}
private void OnSetSelectedSmoothIn()
{
StartEditSpline();
SetModeSmoothIn();
EndEditSpline();
}
private void OnSetSelectedSmoothOut()
{
StartEditSpline();
SetModeSmoothOut();
EndEditSpline();
} }
private void OnSetTangentsLinear() private void OnSetTangentsLinear()
{ {
var enableUndo = Presenter.Undo != null && Presenter.Undo.Enabled; StartEditSpline();
for (int i = 0; i < Values.Count; i++) _selectedSpline.SetTangentsLinear();
{ _selectedSpline.UpdateSpline();
if (Values[i] is Spline spline) EndEditSpline();
{
var before = enableUndo ? (BezierCurve<Transform>.Keyframe[])spline.SplineKeyframes.Clone() : null;
spline.SetTangentsLinear();
if (enableUndo)
Presenter.Undo.AddAction(new EditSplineAction(spline, before));
SplineNode.OnSplineEdited(spline);
Editor.Instance.Scene.MarkSceneEdited(spline.Scene);
}
}
} }
private void OnSetTangentsSmooth() private void OnSetTangentsSmooth()
{ {
var enableUndo = Presenter.Undo != null && Presenter.Undo.Enabled; StartEditSpline();
for (int i = 0; i < Values.Count; i++) _selectedSpline.SetTangentsSmooth();
_selectedSpline.UpdateSpline();
EndEditSpline();
}
private static bool IsFreeTangentMode(Spline spline, int index)
{
if (IsLinearTangentMode(spline, index) ||
IsAlignedTangentMode(spline, index) ||
IsSmoothInTangentMode(spline, index) ||
IsSmoothOutTangentMode(spline, index))
{ {
if (Values[i] is Spline spline) return false;
}
return true;
}
private static bool IsLinearTangentMode(Spline spline, int index)
{
var keyframe = spline.GetSplineKeyframe(index);
return keyframe.TangentIn.Translation.Length == 0 && keyframe.TangentOut.Translation.Length == 0;
}
private static bool IsAlignedTangentMode(Spline spline, int index)
{
var keyframe = spline.GetSplineKeyframe(index);
var tangentIn = keyframe.TangentIn.Translation;
var tangentOut = keyframe.TangentOut.Translation;
if (tangentIn.Length == 0 || tangentOut.Length == 0)
return false;
var angleBetweenTwoTangents = Vector3.Dot(tangentIn.Normalized, tangentOut.Normalized);
if (angleBetweenTwoTangents < -0.99f)
return true;
return false;
}
private static bool IsSmoothInTangentMode(Spline spline, int index)
{
var keyframe = spline.GetSplineKeyframe(index);
return keyframe.TangentIn.Translation.Length > 0 && keyframe.TangentOut.Translation.Length == 0;
}
private static bool IsSmoothOutTangentMode(Spline spline, int index)
{
var keyframe = spline.GetSplineKeyframe(index);
return keyframe.TangentOut.Translation.Length > 0 && keyframe.TangentIn.Translation.Length == 0;
}
private static void SetKeyframeLinear(Spline spline, int index)
{
var keyframe = spline.GetSplineKeyframe(index);
keyframe.TangentIn.Translation = Vector3.Zero;
keyframe.TangentOut.Translation = Vector3.Zero;
var lastSplineIndex = spline.SplinePointsCount - 1;
if (index == lastSplineIndex && spline.IsLoop)
{
var lastPoint = spline.GetSplineKeyframe(lastSplineIndex);
lastPoint.TangentIn.Translation = Vector3.Zero;
lastPoint.TangentOut.Translation = Vector3.Zero;
spline.SetSplineKeyframe(lastSplineIndex, lastPoint);
}
spline.SetSplineKeyframe(index, keyframe);
spline.UpdateSpline();
}
private static void SetTangentSmoothIn(Spline spline, int index)
{
var keyframe = spline.GetSplineKeyframe(index);
// Auto smooth tangent if's linear
if (keyframe.TangentIn.Translation.Length == 0)
{
var smoothRange = SplineNode.NodeSizeByDistance(spline.GetSplineTangent(index, false).Translation, 10f);
var previousKeyframe = spline.GetSplineKeyframe(index - 1);
var tangentDirection = keyframe.Value.WorldToLocalVector(previousKeyframe.Value.Translation - keyframe.Value.Translation);
tangentDirection = tangentDirection.Normalized * smoothRange;
keyframe.TangentIn.Translation = tangentDirection;
}
keyframe.TangentOut.Translation = Vector3.Zero;
spline.SetSplineKeyframe(index, keyframe);
spline.UpdateSpline();
}
private static void SetTangentSmoothOut(Spline spline, int index)
{
var keyframe = spline.GetSplineKeyframe(index);
// Auto smooth tangent if's linear
if (keyframe.TangentOut.Translation.Length == 0)
{
var smoothRange = SplineNode.NodeSizeByDistance(spline.GetSplineTangent(index, false).Translation, 10f);
var nextKeyframe = spline.GetSplineKeyframe(index + 1);
var tangentDirection = keyframe.Value.WorldToLocalVector(nextKeyframe.Value.Translation - keyframe.Value.Translation);
tangentDirection = tangentDirection.Normalized * smoothRange;
keyframe.TangentOut.Translation = tangentDirection;
}
keyframe.TangentIn.Translation = Vector3.Zero;
spline.SetSplineKeyframe(index, keyframe);
spline.UpdateSpline();
}
private static void SetPointSmooth(Spline spline, int index)
{
var keyframe = spline.GetSplineKeyframe(index);
var tangentInSize = keyframe.TangentIn.Translation.Length;
var tangentOutSize = keyframe.TangentOut.Translation.Length;
var isLastKeyframe = index >= spline.SplinePointsCount - 1;
var isFirstKeyframe = index <= 0;
var smoothRange = SplineNode.NodeSizeByDistance(spline.GetSplinePoint(index), 10f);
// Force smooth it's linear point
if (tangentInSize == 0f)
tangentInSize = smoothRange;
if (tangentOutSize == 0f)
tangentOutSize = smoothRange;
// Try get next / last keyframe
var nextKeyframe = !isLastKeyframe ? spline.GetSplineKeyframe(index + 1) : keyframe;
var previousKeyframe = !isFirstKeyframe ? spline.GetSplineKeyframe(index - 1) : keyframe;
// calc form from Spline.cpp -> SetTangentsSmooth
// get tangent direction
var tangentDirection = (keyframe.Value.Translation - previousKeyframe.Value.Translation + nextKeyframe.Value.Translation - keyframe.Value.Translation).Normalized;
keyframe.TangentIn.Translation = -tangentDirection;
keyframe.TangentOut.Translation = tangentDirection;
keyframe.TangentIn.Translation *= tangentInSize;
keyframe.TangentOut.Translation *= tangentOutSize;
spline.SetSplineKeyframe(index, keyframe);
spline.UpdateSpline();
}
private static SplineNode.SplinePointNode GetSplinePointNode(Spline spline, int index)
{
return (SplineNode.SplinePointNode)SceneGraphFactory.FindNode(spline.ID).ChildNodes[index];
}
private static SplineNode.SplinePointTangentNode GetSplineTangentInNode(Spline spline, int index)
{
var point = GetSplinePointNode(spline, index);
var tangentIn = spline.GetSplineTangent(index, true);
var tangentNodes = point.ChildNodes;
// find tangent in node comparing all child nodes position
for (int i = 0; i < tangentNodes.Count; i++)
{
if (tangentNodes[i].Transform.Translation == tangentIn.Translation)
{ {
var before = enableUndo ? (BezierCurve<Transform>.Keyframe[])spline.SplineKeyframes.Clone() : null; return (SplineNode.SplinePointTangentNode)tangentNodes[i];
spline.SetTangentsSmooth();
if (enableUndo)
Presenter.Undo.AddAction(new EditSplineAction(spline, before));
SplineNode.OnSplineEdited(spline);
Editor.Instance.Scene.MarkSceneEdited(spline.Scene);
} }
} }
return null;
}
private static SplineNode.SplinePointTangentNode GetSplineTangentOutNode(Spline spline, int index)
{
var point = GetSplinePointNode(spline, index);
var tangentOut = spline.GetSplineTangent(index, false);
var tangentNodes = point.ChildNodes;
// find tangent out node comparing all child nodes position
for (int i = 0; i < tangentNodes.Count; i++)
{
if (tangentNodes[i].Transform.Translation == tangentOut.Translation)
{
return (SplineNode.SplinePointTangentNode)tangentNodes[i];
}
}
return null;
}
private static void SetSelectSplinePointNode(Spline spline, int index)
{
Editor.Instance.SceneEditing.Select(GetSplinePointNode(spline, index));
}
private static void SetSelectTangentIn(Spline spline, int index)
{
Editor.Instance.SceneEditing.Select(GetSplineTangentInNode(spline, index));
}
private static void SetSelectTangentOut(Spline spline, int index)
{
Editor.Instance.SceneEditing.Select(GetSplineTangentOutNode(spline, index));
} }
} }
} }
@@ -422,12 +422,14 @@ namespace FlaxEditor.CustomEditors.Dedicated
// Set control type button // Set control type button
var space = layout.Space(20); var space = layout.Space(20);
float setTypeButtonWidth = 60.0f; var buttonText = "Set Type";
var textSize = FlaxEngine.GUI.Style.Current.FontMedium.MeasureText(buttonText);
float setTypeButtonWidth = (textSize.X < 60.0f) ? 60.0f : textSize.X + 4;
var setTypeButton = new Button var setTypeButton = new Button
{ {
TooltipText = "Sets the control to the given type", TooltipText = "Sets the control to the given type",
AnchorPreset = AnchorPresets.MiddleCenter, AnchorPreset = AnchorPresets.MiddleCenter,
Text = "Set Type", Text = buttonText,
Parent = space.Spacer, Parent = space.Spacer,
Bounds = new Rectangle((space.Spacer.Width - setTypeButtonWidth) / 2, 1, setTypeButtonWidth, 18), Bounds = new Rectangle((space.Spacer.Width - setTypeButtonWidth) / 2, 1, setTypeButtonWidth, 18),
}; };
@@ -693,7 +695,41 @@ namespace FlaxEditor.CustomEditors.Dedicated
private void SetType(ref ScriptType controlType, UIControl uiControl) private void SetType(ref ScriptType controlType, UIControl uiControl)
{ {
string previousName = uiControl.Control?.GetType().Name ?? nameof(UIControl); string previousName = uiControl.Control?.GetType().Name ?? nameof(UIControl);
uiControl.Control = (Control)controlType.CreateInstance();
var oldControlType = (Control)uiControl.Control;
var newControlType = (Control)controlType.CreateInstance();
// copy old control data to new control
if (oldControlType != null)
{
newControlType.Visible = oldControlType.Visible;
newControlType.Enabled = oldControlType.Enabled;
newControlType.AutoFocus = oldControlType.AutoFocus;
newControlType.AnchorMin = oldControlType.AnchorMin;
newControlType.AnchorMax = oldControlType.AnchorMax;
newControlType.Offsets = oldControlType.Offsets;
newControlType.LocalLocation = oldControlType.LocalLocation;
newControlType.Scale = oldControlType.Scale;
newControlType.Bounds = oldControlType.Bounds;
newControlType.Width = oldControlType.Width;
newControlType.Height = oldControlType.Height;
newControlType.Center = oldControlType.Center;
newControlType.PivotRelative = oldControlType.PivotRelative;
newControlType.Pivot = oldControlType.Pivot;
newControlType.Shear = oldControlType.Shear;
newControlType.Rotation = oldControlType.Rotation;
}
if (oldControlType is ContainerControl oldContainer && newControlType is ContainerControl newContainer)
{
newContainer.CullChildren = oldContainer.CullChildren;
newContainer.ClipChildren = oldContainer.ClipChildren;
}
uiControl.Control = newControlType;
if (uiControl.Name.StartsWith(previousName)) if (uiControl.Name.StartsWith(previousName))
{ {
string newName = controlType.Name + uiControl.Name.Substring(previousName.Length); string newName = controlType.Name + uiControl.Name.Substring(previousName.Length);
@@ -34,7 +34,7 @@ namespace FlaxEditor.CustomEditors.Editors
value = 0; value = 0;
// If selected is single actor that has children, ask if apply layer to the sub objects as well // If selected is single actor that has children, ask if apply layer to the sub objects as well
if (Values.IsSingleObject && (int)Values[0] != value && ParentEditor.Values[0] is Actor actor && actor.HasChildren) if (Values.IsSingleObject && (int)Values[0] != value && ParentEditor.Values[0] is Actor actor && actor.HasChildren && !Editor.IsPlayMode)
{ {
var valueText = comboBox.SelectedItem; var valueText = comboBox.SelectedItem;
@@ -88,20 +88,20 @@ namespace FlaxEditor.CustomEditors.Editors
LinkValues = Editor.Instance.Windows.PropertiesWin.ScaleLinked; LinkValues = Editor.Instance.Windows.PropertiesWin.ScaleLinked;
// Add button with the link icon // Add button with the link icon
_linkButton = new Button _linkButton = new Button
{ {
BackgroundBrush = new SpriteBrush(Editor.Instance.Icons.Link32), BackgroundBrush = new SpriteBrush(Editor.Instance.Icons.Link32),
Parent = LinkedLabel, Parent = LinkedLabel,
Width = 18, Width = 18,
Height = 18, Height = 18,
AnchorPreset = AnchorPresets.TopLeft, AnchorPreset = AnchorPresets.MiddleLeft,
}; };
_linkButton.Clicked += ToggleLink; _linkButton.Clicked += ToggleLink;
ToggleEnabled(); ToggleEnabled();
SetLinkStyle(); SetLinkStyle();
var x = LinkedLabel.Text.Value.Length * 7 + 5; var textSize = FlaxEngine.GUI.Style.Current.FontMedium.MeasureText(LinkedLabel.Text.Value);
_linkButton.LocalX += x; _linkButton.LocalX += textSize.X + 10;
_linkButton.LocalY += 1;
LinkedLabel.SetupContextMenu += (label, menu, editor) => LinkedLabel.SetupContextMenu += (label, menu, editor) =>
{ {
menu.AddSeparator(); menu.AddSeparator();
@@ -33,7 +33,12 @@ namespace FlaxEditor.CustomEditors.Editors
[CustomEditor(typeof(Asset)), DefaultEditor] [CustomEditor(typeof(Asset)), DefaultEditor]
public class AssetRefEditor : CustomEditor public class AssetRefEditor : CustomEditor
{ {
private AssetPicker _picker; /// <summary>
/// The asset picker used to get a reference to an asset.
/// </summary>
public AssetPicker Picker;
private bool _isRefreshing;
private ScriptType _valueType; private ScriptType _valueType;
/// <inheritdoc /> /// <inheritdoc />
@@ -44,7 +49,7 @@ namespace FlaxEditor.CustomEditors.Editors
{ {
if (HasDifferentTypes) if (HasDifferentTypes)
return; return;
_picker = layout.Custom<AssetPicker>().CustomControl; Picker = layout.Custom<AssetPicker>().CustomControl;
_valueType = Values.Type.Type != typeof(object) || Values[0] == null ? Values.Type : TypeUtils.GetObjectType(Values[0]); _valueType = Values.Type.Type != typeof(object) || Values[0] == null ? Values.Type : TypeUtils.GetObjectType(Values[0]);
var assetType = _valueType; var assetType = _valueType;
@@ -66,7 +71,7 @@ namespace FlaxEditor.CustomEditors.Editors
{ {
// Generic file picker // Generic file picker
assetType = ScriptType.Null; assetType = ScriptType.Null;
_picker.FileExtension = assetReference.TypeName; Picker.Validator.FileExtension = assetReference.TypeName;
} }
else else
{ {
@@ -75,26 +80,30 @@ namespace FlaxEditor.CustomEditors.Editors
assetType = customType; assetType = customType;
else if (!Content.Settings.GameSettings.OptionalPlatformSettings.Contains(assetReference.TypeName)) else if (!Content.Settings.GameSettings.OptionalPlatformSettings.Contains(assetReference.TypeName))
Debug.LogWarning(string.Format("Unknown asset type '{0}' to use for asset picker filter.", assetReference.TypeName)); Debug.LogWarning(string.Format("Unknown asset type '{0}' to use for asset picker filter.", assetReference.TypeName));
else
assetType = ScriptType.Void;
} }
} }
_picker.AssetType = assetType; Picker.Validator.AssetType = assetType;
_picker.Height = height; Picker.Height = height;
_picker.SelectedItemChanged += OnSelectedItemChanged; Picker.SelectedItemChanged += OnSelectedItemChanged;
} }
private void OnSelectedItemChanged() private void OnSelectedItemChanged()
{ {
if (_isRefreshing)
return;
if (typeof(AssetItem).IsAssignableFrom(_valueType.Type)) if (typeof(AssetItem).IsAssignableFrom(_valueType.Type))
SetValue(_picker.SelectedItem); SetValue(Picker.Validator.SelectedItem);
else if (_valueType.Type == typeof(Guid)) else if (_valueType.Type == typeof(Guid))
SetValue(_picker.SelectedID); SetValue(Picker.Validator.SelectedID);
else if (_valueType.Type == typeof(SceneReference)) else if (_valueType.Type == typeof(SceneReference))
SetValue(new SceneReference(_picker.SelectedID)); SetValue(new SceneReference(Picker.Validator.SelectedID));
else if (_valueType.Type == typeof(string)) else if (_valueType.Type == typeof(string))
SetValue(_picker.SelectedPath); SetValue(Picker.Validator.SelectedPath);
else else
SetValue(_picker.SelectedAsset); SetValue(Picker.Validator.SelectedAsset);
} }
/// <inheritdoc /> /// <inheritdoc />
@@ -104,16 +113,18 @@ namespace FlaxEditor.CustomEditors.Editors
if (!HasDifferentValues) if (!HasDifferentValues)
{ {
_isRefreshing = true;
if (Values[0] is AssetItem assetItem) if (Values[0] is AssetItem assetItem)
_picker.SelectedItem = assetItem; Picker.Validator.SelectedItem = assetItem;
else if (Values[0] is Guid guid) else if (Values[0] is Guid guid)
_picker.SelectedID = guid; Picker.Validator.SelectedID = guid;
else if (Values[0] is SceneReference sceneAsset) else if (Values[0] is SceneReference sceneAsset)
_picker.SelectedItem = Editor.Instance.ContentDatabase.FindAsset(sceneAsset.ID); Picker.Validator.SelectedItem = Editor.Instance.ContentDatabase.FindAsset(sceneAsset.ID);
else if (Values[0] is string path) else if (Values[0] is string path)
_picker.SelectedPath = path; Picker.Validator.SelectedPath = path;
else else
_picker.SelectedAsset = Values[0] as Asset; Picker.Validator.SelectedAsset = Values[0] as Asset;
_isRefreshing = false;
} }
} }
} }
@@ -0,0 +1,198 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;
using System.Linq;
using FlaxEditor.GUI;
using FlaxEditor.GUI.Tree;
using FlaxEditor.Scripting;
using FlaxEngine;
using FlaxEngine.GUI;
using FlaxEngine.Utilities;
namespace FlaxEditor.CustomEditors.Editors
{
/// <summary>
/// Custom editor for <see cref="BehaviorKnowledgeSelector{T}"/> and <see cref="BehaviorKnowledgeSelectorAny"/>.
/// </summary>
public sealed class BehaviorKnowledgeSelectorEditor : CustomEditor
{
private ClickableLabel _label;
/// <inheritdoc />
public override DisplayStyle Style => DisplayStyle.Inline;
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
{
_label = layout.ClickableLabel(Path).CustomControl;
_label.RightClick += ShowPicker;
var button = new Button
{
Size = new Float2(16.0f),
Text = "...",
TooltipText = "Edit...",
Parent = _label,
};
button.SetAnchorPreset(AnchorPresets.MiddleRight, false, true);
button.Clicked += ShowPicker;
}
/// <inheritdoc />
public override void Refresh()
{
base.Refresh();
// Update label
_label.Text = _label.TooltipText = Path;
}
private string Path
{
get
{
var v = Values[0];
if (v is BehaviorKnowledgeSelectorAny any)
return any.Path;
if (v is string str)
return str;
var pathField = v.GetType().GetField("Path");
return pathField.GetValue(v) as string;
}
set
{
if (string.Equals(Path, value, StringComparison.Ordinal))
return;
var v = Values[0];
if (v is BehaviorKnowledgeSelectorAny)
v = new BehaviorKnowledgeSelectorAny(value);
else if (v is string)
v = value;
else
{
var pathField = v.GetType().GetField("Path");
pathField.SetValue(v, value);
}
SetValue(v);
}
}
private void ShowPicker()
{
// Get Behavior Knowledge to select from
var behaviorTreeWindow = Presenter.Owner as Windows.Assets.BehaviorTreeWindow;
var rootNode = behaviorTreeWindow?.RootNode;
if (rootNode == null)
return;
var typed = ScriptType.Null;
var valueType = Values[0].GetType();
if (valueType.Name == "BehaviorKnowledgeSelector`1")
{
// Get typed selector type to show only assignable items
typed = new ScriptType(valueType.GenericTypeArguments[0]);
}
// Get customization options
var attributes = Values.GetAttributes();
var attribute = (BehaviorKnowledgeSelectorAttribute)attributes?.FirstOrDefault(x => x is BehaviorKnowledgeSelectorAttribute);
bool isGoalSelector = false;
if (attribute != null)
{
isGoalSelector = attribute.IsGoalSelector;
}
// Create menu with tree-like structure and search box
var menu = Utilities.Utils.CreateSearchPopup(out var searchBox, out var tree, 0, true);
var selected = Path;
// Empty
var noneNode = new TreeNode
{
Text = "<none>",
TooltipText = "Deselect value",
Parent = tree,
};
if (string.IsNullOrEmpty(selected))
tree.Select(noneNode);
if (!isGoalSelector)
{
// Blackboard
SetupPickerTypeItems(tree, typed, selected, "Blackboard", "Blackboard/", rootNode.BlackboardType);
}
// Goals
var goalTypes = rootNode.GoalTypes;
if (goalTypes?.Length != 0)
{
var goalsNode = new TreeNode
{
Text = "Goal",
TooltipText = "List of goal types defined in Blackboard Tree",
Parent = tree,
};
foreach (var goalTypeName in goalTypes)
{
var goalType = TypeUtils.GetType(goalTypeName);
if (goalType == null)
continue;
var goalTypeNode = SetupPickerTypeItems(tree, typed, selected, goalType.Name, "Goal/" + goalTypeName + "/", goalTypeName, !isGoalSelector);
goalTypeNode.Parent = goalsNode;
}
goalsNode.ExpandAll(true);
}
tree.SelectedChanged += delegate(List<TreeNode> before, List<TreeNode> after)
{
if (after.Count == 1)
{
menu.Hide();
Path = after[0].Tag as string;
}
};
menu.Show(_label, new Float2(0, _label.Height));
}
private TreeNode SetupPickerTypeItems(Tree tree, ScriptType typed, string selected, string text, string typePath, string typeName, bool addItems = true)
{
var type = TypeUtils.GetType(typeName);
if (type == null)
return null;
var typeNode = new TreeNode
{
Text = text,
TooltipText = type.TypeName,
Tag = typePath, // Ability to select whole item type data (eg. whole blackboard value)
Parent = tree,
};
if (typed && !typed.IsAssignableFrom(type))
typeNode.Tag = null;
if (string.Equals(selected, (string)typeNode.Tag, StringComparison.Ordinal))
tree.Select(typeNode);
if (addItems)
{
var items = GenericEditor.GetItemsForType(type, type.IsClass, true, true);
foreach (var item in items)
{
if (typed && !typed.IsAssignableFrom(item.Info.ValueType))
continue;
if (item.Info.DeclaringType.Type == typeof(FlaxEngine.Object))
continue; // Skip engine internals
var itemPath = typePath + item.Info.Name;
var node = new TreeNode
{
Text = item.DisplayName,
TooltipText = item.TooltipText,
Tag = itemPath,
Parent = typeNode,
};
if (string.Equals(selected, itemPath, StringComparison.Ordinal))
tree.Select(node);
// TODO: add support for nested items (eg. field from blackboard structure field)
}
typeNode.Expand(true);
}
return typeNode;
}
}
}
@@ -34,7 +34,9 @@ namespace FlaxEditor.CustomEditors.Editors
} }
else else
{ {
element.CheckBox.Checked = (bool)Values[0]; var value = (bool?)Values[0];
if (value != null)
element.CheckBox.Checked = value.Value;
} }
} }
} }
@@ -3,9 +3,12 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Linq; using System.Linq;
using FlaxEditor.Content;
using FlaxEditor.CustomEditors.Elements; using FlaxEditor.CustomEditors.Elements;
using FlaxEditor.CustomEditors.GUI; using FlaxEditor.CustomEditors.GUI;
using FlaxEditor.GUI.ContextMenu; using FlaxEditor.GUI.ContextMenu;
using FlaxEditor.GUI.Drag;
using FlaxEditor.SceneGraph;
using FlaxEditor.Scripting; using FlaxEditor.Scripting;
using FlaxEngine; using FlaxEngine;
using FlaxEngine.GUI; using FlaxEngine.GUI;
@@ -84,6 +87,7 @@ namespace FlaxEditor.CustomEditors.Editors
protected bool NotNullItems; protected bool NotNullItems;
private IntegerValueElement _size; private IntegerValueElement _size;
private PropertyNameLabel _sizeLabel;
private Color _background; private Color _background;
private int _elementsCount; private int _elementsCount;
private bool _readOnly; private bool _readOnly;
@@ -106,11 +110,14 @@ namespace FlaxEditor.CustomEditors.Editors
} }
} }
/// <inheritdoc />
public override bool RevertValueWithChildren => false; // Always revert value for a whole collection
/// <inheritdoc /> /// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout) public override void Initialize(LayoutElementsContainer layout)
{ {
// No support for different collections for now // No support for different collections for now
if (HasDifferentValues || HasDifferentTypes) if (HasDifferentTypes)
return; return;
var size = Count; var size = Count;
@@ -135,14 +142,45 @@ namespace FlaxEditor.CustomEditors.Editors
spacing = collection.Spacing; spacing = collection.Spacing;
} }
var dragArea = layout.CustomContainer<DragAreaControl>();
dragArea.CustomControl.Editor = this;
dragArea.CustomControl.ElementType = ElementType;
// Check for the AssetReferenceAttribute. In JSON assets, it can be used to filter
// which scripts can be dragged over and dropped on this collection editor.
var assetReference = (AssetReferenceAttribute)attributes?.FirstOrDefault(x => x is AssetReferenceAttribute);
if (assetReference != null)
{
if (string.IsNullOrEmpty(assetReference.TypeName))
{
}
else if (assetReference.TypeName.Length > 1 && assetReference.TypeName[0] == '.')
{
dragArea.CustomControl.ElementType = ScriptType.Null;
dragArea.CustomControl.FileExtension = assetReference.TypeName;
}
else
{
var customType = TypeUtils.GetType(assetReference.TypeName);
if (customType != ScriptType.Null)
dragArea.CustomControl.ElementType = customType;
else if (!Content.Settings.GameSettings.OptionalPlatformSettings.Contains(assetReference.TypeName))
Debug.LogWarning(string.Format("Unknown asset type '{0}' to use for drag and drop filter.", assetReference.TypeName));
else
dragArea.CustomControl.ElementType = ScriptType.Void;
}
}
// Size // Size
if (_readOnly || (NotNullItems && size == 0)) if (_readOnly || (NotNullItems && size == 0))
{ {
layout.Label("Size", size.ToString()); dragArea.Label("Size", size.ToString());
} }
else else
{ {
_size = layout.IntegerValue("Size"); var sizeProperty = dragArea.AddPropertyItem("Size");
_sizeLabel = sizeProperty.Labels.Last();
_size = sizeProperty.IntegerValue();
_size.IntValue.MinValue = 0; _size.IntValue.MinValue = 0;
_size.IntValue.MaxValue = ushort.MaxValue; _size.IntValue.MaxValue = ushort.MaxValue;
_size.IntValue.Value = size; _size.IntValue.Value = size;
@@ -152,7 +190,7 @@ namespace FlaxEditor.CustomEditors.Editors
// Elements // Elements
if (size > 0) if (size > 0)
{ {
var panel = layout.VerticalPanel(); var panel = dragArea.VerticalPanel();
panel.Panel.BackgroundColor = _background; panel.Panel.BackgroundColor = _background;
var elementType = ElementType; var elementType = ElementType;
@@ -212,40 +250,45 @@ namespace FlaxEditor.CustomEditors.Editors
// Add/Remove buttons // Add/Remove buttons
if (!_readOnly) if (!_readOnly)
{ {
var area = layout.Space(20); var panel = dragArea.HorizontalPanel();
var addButton = new Button(area.ContainerControl.Width - (16 + 16 + 2 + 2), 2, 16, 16) panel.Panel.Size = new Float2(0, 20);
{ panel.Panel.Margin = new Margin(2);
Text = "+",
TooltipText = "Add new item",
AnchorPreset = AnchorPresets.TopRight,
Parent = area.ContainerControl,
Enabled = !NotNullItems || size > 0,
};
addButton.Clicked += () =>
{
if (IsSetBlocked)
return;
Resize(Count + 1); var removeButton = panel.Button("-", "Remove last item");
}; removeButton.Button.Size = new Float2(16, 16);
var removeButton = new Button(addButton.Right + 2, addButton.Y, 16, 16) removeButton.Button.Enabled = size > 0;
{ removeButton.Button.AnchorPreset = AnchorPresets.TopRight;
Text = "-", removeButton.Button.Clicked += () =>
TooltipText = "Remove last item",
AnchorPreset = AnchorPresets.TopRight,
Parent = area.ContainerControl,
Enabled = size > 0,
};
removeButton.Clicked += () =>
{ {
if (IsSetBlocked) if (IsSetBlocked)
return; return;
Resize(Count - 1); Resize(Count - 1);
}; };
var addButton = panel.Button("+", "Add new item");
addButton.Button.Size = new Float2(16, 16);
addButton.Button.Enabled = !NotNullItems || size > 0;
addButton.Button.AnchorPreset = AnchorPresets.TopRight;
addButton.Button.Clicked += () =>
{
if (IsSetBlocked)
return;
Resize(Count + 1);
};
} }
} }
/// <inheritdoc />
protected override void Deinitialize()
{
_size = null;
_sizeLabel = null;
base.Deinitialize();
}
/// <summary> /// <summary>
/// Rebuilds the parent layout if its collection. /// Rebuilds the parent layout if its collection.
/// </summary> /// </summary>
@@ -268,7 +311,6 @@ namespace FlaxEditor.CustomEditors.Editors
{ {
if (IsSetBlocked) if (IsSetBlocked)
return; return;
Resize(_size.IntValue.Value); Resize(_size.IntValue.Value);
} }
@@ -283,11 +325,9 @@ namespace FlaxEditor.CustomEditors.Editors
return; return;
var cloned = CloneValues(); var cloned = CloneValues();
var tmp = cloned[dstIndex]; var tmp = cloned[dstIndex];
cloned[dstIndex] = cloned[srcIndex]; cloned[dstIndex] = cloned[srcIndex];
cloned[srcIndex] = tmp; cloned[srcIndex] = tmp;
SetValue(cloned); SetValue(cloned);
} }
@@ -343,6 +383,17 @@ namespace FlaxEditor.CustomEditors.Editors
if (HasDifferentValues || HasDifferentTypes) if (HasDifferentValues || HasDifferentTypes)
return; return;
// Update reference/default value indicator
if (_sizeLabel != null)
{
var color = Color.Transparent;
if (Values.HasReferenceValue && Values.ReferenceValue is IList referenceValue && referenceValue.Count != Count)
color = FlaxEngine.GUI.Style.Current.BackgroundSelected;
else if (Values.HasDefaultValue && Values.DefaultValue is IList defaultValue && defaultValue.Count != Count)
color = Color.Yellow * 0.8f;
_sizeLabel.HighlightStripColor = color;
}
// Check if collection has been resized (by UI or from external source) // Check if collection has been resized (by UI or from external source)
if (Count != _elementsCount) if (Count != _elementsCount)
{ {
@@ -369,5 +420,232 @@ namespace FlaxEditor.CustomEditors.Editors
} }
return base.OnDirty(editor, value, token); return base.OnDirty(editor, value, token);
} }
private class DragAreaControl : VerticalPanel
{
private DragItems _dragItems;
private DragActors _dragActors;
private DragHandlers _dragHandlers;
private AssetPickerValidator _pickerValidator;
public ScriptType ElementType
{
get => _pickerValidator?.AssetType ?? ScriptType.Null;
set => _pickerValidator = new AssetPickerValidator(value);
}
public CollectionEditor Editor { get; set; }
public string FileExtension
{
set => _pickerValidator.FileExtension = value;
}
/// <inheritdoc />
public override void Draw()
{
if (_dragHandlers is { HasValidDrag: true })
{
var area = new Rectangle(Float2.Zero, Size);
Render2D.FillRectangle(area, Color.Orange * 0.5f);
Render2D.DrawRectangle(area, Color.Black);
}
base.Draw();
}
public override void OnDestroy()
{
_pickerValidator.OnDestroy();
}
private bool ValidateActors(ActorNode node)
{
return node.Actor.GetScript(ElementType.Type) || ElementType.Type.IsAssignableTo(typeof(Actor));
}
/// <inheritdoc />
public override DragDropEffect OnDragEnter(ref Float2 location, DragData data)
{
var result = base.OnDragEnter(ref location, data);
if (result != DragDropEffect.None)
return result;
if (_dragHandlers == null)
{
_dragItems = new DragItems(_pickerValidator.IsValid);
_dragActors = new DragActors(ValidateActors);
_dragHandlers = new DragHandlers
{
_dragActors,
_dragItems
};
}
return _dragHandlers.OnDragEnter(data);
}
/// <inheritdoc />
public override DragDropEffect OnDragMove(ref Float2 location, DragData data)
{
var result = base.OnDragMove(ref location, data);
if (result != DragDropEffect.None)
return result;
return _dragHandlers.Effect;
}
/// <inheritdoc />
public override void OnDragLeave()
{
_dragHandlers.OnDragLeave();
base.OnDragLeave();
}
/// <inheritdoc />
public override DragDropEffect OnDragDrop(ref Float2 location, DragData data)
{
var result = base.OnDragDrop(ref location, data);
if (result != DragDropEffect.None)
{
_dragHandlers.OnDragDrop(null);
return result;
}
if (_dragHandlers.HasValidDrag)
{
if (_dragItems.HasValidDrag)
{
var list = Editor.CloneValues();
if (list == null)
{
if (Editor.Values.Type.IsArray)
{
list = TypeUtils.CreateArrayInstance(Editor.Values.Type.GetElementType(), 0);
}
else
{
list = Editor.Values.Type.CreateInstance() as IList;
}
}
if (list.IsFixedSize)
{
var oldSize = list.Count;
var newSize = list.Count + _dragItems.Objects.Count;
var type = Editor.Values.Type.GetElementType();
var array = TypeUtils.CreateArrayInstance(type, newSize);
list.CopyTo(array, 0);
for (var i = oldSize; i < newSize; i++)
{
var validator = new AssetPickerValidator
{
FileExtension = _pickerValidator.FileExtension,
AssetType = _pickerValidator.AssetType,
SelectedItem = _dragItems.Objects[i - oldSize],
};
if (typeof(AssetItem).IsAssignableFrom(ElementType.Type))
array.SetValue(validator.SelectedItem, i);
else if (ElementType.Type == typeof(Guid))
array.SetValue(validator.SelectedID, i);
else if (ElementType.Type == typeof(SceneReference))
array.SetValue(new SceneReference(validator.SelectedID), i);
else if (ElementType.Type == typeof(string))
array.SetValue(validator.SelectedPath, i);
else
array.SetValue(validator.SelectedAsset, i);
validator.OnDestroy();
}
Editor.SetValue(array);
}
else
{
foreach (var item in _dragItems.Objects)
{
var validator = new AssetPickerValidator
{
FileExtension = _pickerValidator.FileExtension,
AssetType = _pickerValidator.AssetType,
SelectedItem = item,
};
if (typeof(AssetItem).IsAssignableFrom(ElementType.Type))
list.Add(validator.SelectedItem);
else if (ElementType.Type == typeof(Guid))
list.Add(validator.SelectedID);
else if (ElementType.Type == typeof(SceneReference))
list.Add(new SceneReference(validator.SelectedID));
else if (ElementType.Type == typeof(string))
list.Add(validator.SelectedPath);
else
list.Add(validator.SelectedAsset);
validator.OnDestroy();
}
Editor.SetValue(list);
}
}
else if (_dragActors.HasValidDrag)
{
var list = Editor.CloneValues();
if (list == null)
{
if (Editor.Values.Type.IsArray)
{
list = TypeUtils.CreateArrayInstance(Editor.Values.Type.GetElementType(), 0);
}
else
{
list = Editor.Values.Type.CreateInstance() as IList;
}
}
if (list.IsFixedSize)
{
var oldSize = list.Count;
var newSize = list.Count + _dragActors.Objects.Count;
var type = Editor.Values.Type.GetElementType();
var array = TypeUtils.CreateArrayInstance(type, newSize);
list.CopyTo(array, 0);
for (var i = oldSize; i < newSize; i++)
{
var actor = _dragActors.Objects[i - oldSize].Actor;
if (ElementType.Type.IsAssignableTo(typeof(Actor)))
{
array.SetValue(actor, i);
}
else
{
array.SetValue(actor.GetScript(ElementType.Type), i);
}
}
Editor.SetValue(array);
}
else
{
foreach (var actorNode in _dragActors.Objects)
{
if (ElementType.Type.IsAssignableTo(typeof(Actor)))
{
list.Add(actorNode.Actor);
}
else
{
list.Add(actorNode.Actor.GetScript(ElementType.Type));
}
}
Editor.SetValue(list);
}
}
_dragHandlers.OnDragDrop(null);
}
return result;
}
}
} }
} }
@@ -123,9 +123,9 @@ namespace FlaxEditor.CustomEditors.Editors
{ {
if (tree.IsLayoutLocked) if (tree.IsLayoutLocked)
return; return;
root.LockChildrenRecursive(); tree.LockChildrenRecursive();
Utilities.Utils.UpdateSearchPopupFilter(root, searchBox.Text); Utilities.Utils.UpdateSearchPopupFilter(root, searchBox.Text);
root.UnlockChildrenRecursive(); tree.UnlockChildrenRecursive();
menu.PerformLayout(); menu.PerformLayout();
}; };
root.ExpandAll(true); root.ExpandAll(true);
@@ -26,7 +26,7 @@ namespace FlaxEditor.CustomEditors.Editors
/// Describes object property/field information for custom editors pipeline. /// Describes object property/field information for custom editors pipeline.
/// </summary> /// </summary>
/// <seealso cref="System.IComparable" /> /// <seealso cref="System.IComparable" />
protected class ItemInfo : IComparable public class ItemInfo : IComparable
{ {
private Options.GeneralOptions.MembersOrder _membersOrder; private Options.GeneralOptions.MembersOrder _membersOrder;
@@ -247,8 +247,9 @@ namespace FlaxEditor.CustomEditors.Editors
/// <param name="type">The type.</param> /// <param name="type">The type.</param>
/// <param name="useProperties">True if use type properties.</param> /// <param name="useProperties">True if use type properties.</param>
/// <param name="useFields">True if use type fields.</param> /// <param name="useFields">True if use type fields.</param>
/// <param name="usePropertiesWithoutSetter">True if use type properties that have only getter method without setter method (aka read-only).</param>
/// <returns>The items.</returns> /// <returns>The items.</returns>
protected List<ItemInfo> GetItemsForType(ScriptType type, bool useProperties, bool useFields) public static List<ItemInfo> GetItemsForType(ScriptType type, bool useProperties, bool useFields, bool usePropertiesWithoutSetter = false)
{ {
var items = new List<ItemInfo>(); var items = new List<ItemInfo>();
@@ -264,7 +265,7 @@ namespace FlaxEditor.CustomEditors.Editors
var showInEditor = attributes.Any(x => x is ShowInEditorAttribute); var showInEditor = attributes.Any(x => x is ShowInEditorAttribute);
// Skip properties without getter or setter // Skip properties without getter or setter
if (!p.HasGet || (!p.HasSet && !showInEditor)) if (!p.HasGet || (!p.HasSet && !showInEditor && !usePropertiesWithoutSetter))
continue; continue;
// Skip hidden fields, handle special attributes // Skip hidden fields, handle special attributes
@@ -16,6 +16,7 @@ namespace FlaxEditor.CustomEditors.Editors
/// <inheritdoc /> /// <inheritdoc />
protected override OptionType[] Options => new[] protected override OptionType[] Options => new[]
{ {
new OptionType("null", null),
new OptionType("Texture", typeof(TextureBrush)), new OptionType("Texture", typeof(TextureBrush)),
new OptionType("Sprite", typeof(SpriteBrush)), new OptionType("Sprite", typeof(SpriteBrush)),
new OptionType("GPU Texture", typeof(GPUTextureBrush)), new OptionType("GPU Texture", typeof(GPUTextureBrush)),
@@ -0,0 +1,146 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using System.Collections.Generic;
using FlaxEditor.CustomEditors.GUI;
using FlaxEditor.GUI;
using FlaxEditor.GUI.ContextMenu;
using FlaxEngine;
namespace FlaxEditor.CustomEditors.Editors
{
/// <summary>
/// Default implementation of the inspector used to edit input event properties.
/// </summary>
[CustomEditor(typeof(InputEvent)), DefaultEditor]
public class InputEventEditor : CustomEditor
{
private ComboBox _comboBox;
/// <inheritdoc />
public override DisplayStyle Style => DisplayStyle.Inline;
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
{
LinkedLabel.SetupContextMenu += OnSetupContextMenu;
var comboBoxElement = layout.ComboBox();
_comboBox = comboBoxElement.ComboBox;
var names = new List<string>();
foreach (var mapping in Input.ActionMappings)
{
if (!names.Contains(mapping.Name))
names.Add(mapping.Name);
}
_comboBox.Items = names;
if (Values[0] is InputEvent inputEvent && names.Contains(inputEvent.Name))
_comboBox.SelectedItem = inputEvent.Name;
_comboBox.SelectedIndexChanged += OnSelectedIndexChanged;
}
private void OnSetupContextMenu(PropertyNameLabel label, ContextMenu menu, CustomEditor linkededitor)
{
var button = menu.AddButton("Set to null");
button.Clicked += () => _comboBox.SelectedItem = null;
}
private void OnSelectedIndexChanged(ComboBox comboBox)
{
SetValue(comboBox.SelectedItem == null ? null : new InputEvent(comboBox.SelectedItem));
}
/// <inheritdoc />
public override void Refresh()
{
base.Refresh();
if (HasDifferentValues)
{
}
else
{
if (Values[0] is InputEvent inputEvent && _comboBox.Items.Contains(inputEvent.Name))
_comboBox.SelectedItem = inputEvent.Name;
else
_comboBox.SelectedItem = null;
}
}
/// <inheritdoc />
protected override void Deinitialize()
{
if (LinkedLabel != null)
LinkedLabel.SetupContextMenu -= OnSetupContextMenu;
if (_comboBox != null)
_comboBox.SelectedIndexChanged -= OnSelectedIndexChanged;
_comboBox = null;
}
}
/// <summary>
/// Default implementation of the inspector used to edit input axis properties.
/// </summary>
[CustomEditor(typeof(InputAxis)), DefaultEditor]
public class InputAxisEditor : CustomEditor
{
private ComboBox _comboBox;
/// <inheritdoc />
public override DisplayStyle Style => DisplayStyle.Inline;
/// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout)
{
LinkedLabel.SetupContextMenu += OnSetupContextMenu;
var comboBoxElement = layout.ComboBox();
_comboBox = comboBoxElement.ComboBox;
var names = new List<string>();
foreach (var mapping in Input.AxisMappings)
{
if (!names.Contains(mapping.Name))
names.Add(mapping.Name);
}
_comboBox.Items = names;
if (Values[0] is InputAxis inputAxis && names.Contains(inputAxis.Name))
_comboBox.SelectedItem = inputAxis.Name;
_comboBox.SelectedIndexChanged += OnSelectedIndexChanged;
}
private void OnSetupContextMenu(PropertyNameLabel label, ContextMenu menu, CustomEditor linkededitor)
{
var button = menu.AddButton("Set to null");
button.Clicked += () => _comboBox.SelectedItem = null;
}
private void OnSelectedIndexChanged(ComboBox comboBox)
{
SetValue(comboBox.SelectedItem == null ? null : new InputAxis(comboBox.SelectedItem));
}
/// <inheritdoc />
public override void Refresh()
{
base.Refresh();
if (HasDifferentValues)
{
}
else
{
if (Values[0] is InputAxis inputAxis && _comboBox.Items.Contains(inputAxis.Name))
_comboBox.SelectedItem = inputAxis.Name;
else
_comboBox.SelectedItem = null;
}
}
/// <inheritdoc />
protected override void Deinitialize()
{
if (LinkedLabel != null)
LinkedLabel.SetupContextMenu -= OnSetupContextMenu;
if (_comboBox != null)
_comboBox.SelectedIndexChanged -= OnSelectedIndexChanged;
_comboBox = null;
}
}
}
@@ -1,6 +1,8 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved. // Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using FlaxEditor.CustomEditors.Elements; using FlaxEditor.CustomEditors.Elements;
using FlaxEditor.CustomEditors.GUI;
using FlaxEditor.Scripting;
using FlaxEngine; using FlaxEngine;
namespace FlaxEditor.CustomEditors.Editors namespace FlaxEditor.CustomEditors.Editors
@@ -13,6 +15,11 @@ namespace FlaxEditor.CustomEditors.Editors
{ {
private GroupElement _group; private GroupElement _group;
private bool _updateName; private bool _updateName;
private int _entryIndex;
private bool _isRefreshing;
private MaterialBase _material;
private ModelInstanceActor _modelInstance;
private AssetRefEditor _materialEditor;
/// <inheritdoc /> /// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout) public override void Initialize(LayoutElementsContainer layout)
@@ -21,47 +28,128 @@ namespace FlaxEditor.CustomEditors.Editors
var group = layout.Group("Entry"); var group = layout.Group("Entry");
_group = group; _group = group;
if (ParentEditor == null || HasDifferentTypes)
return;
var entry = (ModelInstanceEntry)Values[0];
var entryIndex = ParentEditor.ChildrenEditors.IndexOf(this);
var materialLabel = new PropertyNameLabel("Material");
materialLabel.TooltipText = "The mesh surface material used for the rendering.";
var parentEditorValues = ParentEditor.ParentEditor?.Values;
if (parentEditorValues?[0] is ModelInstanceActor modelInstance)
{
// TODO: store _modelInstance and _material in array for each selected model instance actor
_entryIndex = entryIndex;
_modelInstance = modelInstance;
var slots = modelInstance.MaterialSlots;
if (slots == null || entryIndex >= slots.Length)
return;
if (entry.Material == slots[entryIndex].Material)
{
// Ensure that entry with default material set is set back to null
modelInstance.SetMaterial(entryIndex, null);
}
_material = modelInstance.GetMaterial(entryIndex);
var defaultValue = GPUDevice.Instance.DefaultMaterial;
if (slots[entryIndex].Material)
{
// Use default value set on asset (eg. Model Asset)
defaultValue = slots[entryIndex].Material;
}
// Create material picker
var materialValue = new CustomValueContainer(new ScriptType(typeof(MaterialBase)), _material, (instance, index) => _material, (instance, index, value) => _material = value as MaterialBase);
for (var i = 1; i < parentEditorValues.Count; i++)
materialValue.Add(_material);
var materialEditor = (AssetRefEditor)_group.Property(materialLabel, materialValue);
materialEditor.Values.SetDefaultValue(defaultValue);
materialEditor.RefreshDefaultValue();
materialEditor.Picker.SelectedItemChanged += OnSelectedMaterialChanged;
_materialEditor = materialEditor;
}
base.Initialize(group); base.Initialize(group);
} }
private void OnSelectedMaterialChanged()
{
if (_isRefreshing)
return;
_isRefreshing = true;
var slots = _modelInstance.MaterialSlots;
var material = _materialEditor.Picker.Validator.SelectedAsset as MaterialBase;
var defaultMaterial = GPUDevice.Instance.DefaultMaterial;
var value = (ModelInstanceEntry)Values[0];
var prevMaterial = value.Material;
if (!material)
{
// Fallback to default material
_materialEditor.Picker.Validator.SelectedAsset = defaultMaterial;
value.Material = defaultMaterial;
}
else if (material == slots[_entryIndex].Material)
{
// Asset default material
value.Material = null;
}
else if (material == defaultMaterial && !slots[_entryIndex].Material)
{
// Default material while asset has no set as well
value.Material = null;
}
else
{
// Custom material
value.Material = material;
}
if (prevMaterial != value.Material)
SetValue(value);
_isRefreshing = false;
}
/// <inheritdoc />
protected override void SpawnProperty(LayoutElementsContainer itemLayout, ValueContainer itemValues, ItemInfo item)
{
// Skip material member as it is overridden
if (item.Info.Name == "Material" && _materialEditor != null)
return;
base.SpawnProperty(itemLayout, itemValues, item);
}
/// <inheritdoc /> /// <inheritdoc />
public override void Refresh() public override void Refresh()
{ {
// Update panel title to match material slot name
if (_updateName && if (_updateName &&
_group != null && _group != null &&
ParentEditor?.ParentEditor != null && ParentEditor?.ParentEditor != null &&
ParentEditor.ParentEditor.Values.Count > 0) ParentEditor.ParentEditor.Values.Count > 0)
{ {
var entryIndex = ParentEditor.ChildrenEditors.IndexOf(this); var entryIndex = ParentEditor.ChildrenEditors.IndexOf(this);
if (ParentEditor.ParentEditor.Values[0] is StaticModel staticModel) if (ParentEditor.ParentEditor.Values[0] is ModelInstanceActor modelInstance)
{ {
var model = staticModel.Model; var slots = modelInstance.MaterialSlots;
if (model && model.IsLoaded) if (slots != null && slots.Length > entryIndex)
{ {
var slots = model.MaterialSlots; _updateName = false;
if (slots != null && slots.Length > entryIndex) _group.Panel.HeaderText = "Entry " + slots[entryIndex].Name;
{
_group.Panel.HeaderText = "Entry " + slots[entryIndex].Name;
_updateName = false;
}
}
}
else if (ParentEditor.ParentEditor.Values[0] is AnimatedModel animatedModel)
{
var model = animatedModel.SkinnedModel;
if (model && model.IsLoaded)
{
var slots = model.MaterialSlots;
if (slots != null && slots.Length > entryIndex)
{
_group.Panel.HeaderText = "Entry " + slots[entryIndex].Name;
_updateName = false;
}
} }
} }
} }
// Refresh currently selected material
_material = _modelInstance.GetMaterial(_entryIndex);
base.Refresh(); base.Refresh();
} }
/// <inheritdoc />
protected override void Deinitialize()
{
_material = null;
_modelInstance = null;
_materialEditor = null;
base.Deinitialize();
}
} }
} }
@@ -125,7 +125,7 @@ namespace FlaxEditor.CustomEditors.Editors
} }
// Value // Value
var values = new CustomValueContainer(type, (instance, index) => instance, (instance, index, value) => { }); var values = new CustomValueContainer(type, (instance, index) => instance);
values.AddRange(Values); values.AddRange(Values);
var editor = CustomEditorsUtil.CreateEditor(type); var editor = CustomEditorsUtil.CreateEditor(type);
var style = editor.Style; var style = editor.Style;
@@ -158,7 +158,8 @@ namespace FlaxEditor.CustomEditors.Editors
if (comboBox.SelectedIndex != -1) if (comboBox.SelectedIndex != -1)
{ {
var option = _options[comboBox.SelectedIndex]; var option = _options[comboBox.SelectedIndex];
value = option.Creator(option.Type); if (option.Type != null)
value = option.Creator(option.Type);
} }
SetValue(value); SetValue(value);
RebuildLayoutOnRefresh(); RebuildLayoutOnRefresh();
@@ -593,9 +593,9 @@ namespace FlaxEditor.CustomEditors.Editors
{ {
if (tree.IsLayoutLocked) if (tree.IsLayoutLocked)
return; return;
root.LockChildrenRecursive(); tree.LockChildrenRecursive();
Utilities.Utils.UpdateSearchPopupFilter(root, searchBox.Text); Utilities.Utils.UpdateSearchPopupFilter(root, searchBox.Text);
root.UnlockChildrenRecursive(); tree.UnlockChildrenRecursive();
menu.PerformLayout(); menu.PerformLayout();
}; };
@@ -623,13 +623,18 @@ namespace FlaxEditor.CustomEditors.Editors
{ {
_label = layout.ClickableLabel(GetText(out _)).CustomControl; _label = layout.ClickableLabel(GetText(out _)).CustomControl;
_label.RightClick += ShowPicker; _label.RightClick += ShowPicker;
var buttonText = "...";
var button = new Button var button = new Button
{ {
Size = new Float2(16.0f), Size = new Float2(16.0f),
Text = "...", Text = buttonText,
TooltipText = "Edit...", TooltipText = "Edit...",
Parent = _label, Parent = _label,
}; };
var textSize = FlaxEngine.GUI.Style.Current.FontMedium.MeasureText(buttonText);
if (textSize.Y > button.Width)
button.Width = textSize.Y + 2;
button.SetAnchorPreset(AnchorPresets.MiddleRight, false, true); button.SetAnchorPreset(AnchorPresets.MiddleRight, false, true);
button.Clicked += ShowPicker; button.Clicked += ShowPicker;
} }
@@ -674,9 +679,9 @@ namespace FlaxEditor.CustomEditors.Editors
} }
set set
{ {
if (Values[0] is Tag[]) if (Values[0] is Tag[] || Values.Type.Type == typeof(Tag[]))
SetValue(value); SetValue(value);
if (Values[0] is List<Tag>) else if (Values[0] is List<Tag> || Values.Type.Type == typeof(List<Tag>))
SetValue(new List<Tag>(value)); SetValue(new List<Tag>(value));
} }
} }
@@ -464,6 +464,11 @@ namespace FlaxEditor.CustomEditors.Editors
/// </summary> /// </summary>
public class TypeNameEditor : TypeEditorBase public class TypeNameEditor : TypeEditorBase
{ {
/// <summary>
/// Prevents spamming log if Value contains missing type to skip research in subsequential Refresh ticks.
/// </summary>
private string _lastTypeNameError;
/// <inheritdoc /> /// <inheritdoc />
public override void Initialize(LayoutElementsContainer layout) public override void Initialize(LayoutElementsContainer layout)
{ {
@@ -484,8 +489,19 @@ namespace FlaxEditor.CustomEditors.Editors
{ {
base.Refresh(); base.Refresh();
if (!HasDifferentValues && Values[0] is string asTypename) if (!HasDifferentValues && Values[0] is string asTypename &&
_element.CustomControl.Value = TypeUtils.GetType(asTypename); !string.Equals(asTypename, _lastTypeNameError, StringComparison.Ordinal))
{
try
{
_element.CustomControl.Value = TypeUtils.GetType(asTypename);
}
finally
{
if (_element.CustomControl.Value == null && asTypename.Length != 0)
_lastTypeNameError = asTypename;
}
}
} }
} }
} }
@@ -22,7 +22,7 @@ namespace FlaxEditor.CustomEditors.Elements
/// <summary> /// <summary>
/// [Deprecated on 26.05.2022, expires on 26.05.2024] /// [Deprecated on 26.05.2022, expires on 26.05.2024]
/// </summary> /// </summary>
[System.Obsolete("Deprecated in 1.4")] [System.Obsolete("Deprecated in 1.4, use ValueBox instead")]
public DoubleValueBox DoubleValue => ValueBox; public DoubleValueBox DoubleValue => ValueBox;
/// <summary> /// <summary>
@@ -22,7 +22,7 @@ namespace FlaxEditor.CustomEditors.Elements
/// <summary> /// <summary>
/// [Deprecated on 26.05.2022, expires on 26.05.2024] /// [Deprecated on 26.05.2022, expires on 26.05.2024]
/// </summary> /// </summary>
[System.Obsolete("Deprecated in 1.4, ValueBox instead")] [System.Obsolete("Deprecated in 1.4, use ValueBox instead")]
public FloatValueBox FloatValue => ValueBox; public FloatValueBox FloatValue => ValueBox;
/// <summary> /// <summary>
@@ -175,7 +175,7 @@ namespace FlaxEditor.CustomEditors.GUI
{ {
// Clear flag // Clear flag
_mouseOverSplitter = false; _mouseOverSplitter = false;
if (_cursorChanged) if (_cursorChanged)
{ {
Cursor = CursorType.Default; Cursor = CursorType.Default;
@@ -38,15 +38,12 @@ namespace FlaxEditor.CustomEditors
/// </summary> /// </summary>
/// <param name="valueType">Type of the value.</param> /// <param name="valueType">Type of the value.</param>
/// <param name="getter">The value getter.</param> /// <param name="getter">The value getter.</param>
/// <param name="setter">The value setter.</param> /// <param name="setter">The value setter (can be null if value is read-only).</param>
/// <param name="attributes">The custom type attributes used to override the value editor logic or appearance (eg. instance of <see cref="LimitAttribute"/>).</param> /// <param name="attributes">The custom type attributes used to override the value editor logic or appearance (eg. instance of <see cref="LimitAttribute"/>).</param>
public CustomValueContainer(ScriptType valueType, GetDelegate getter, SetDelegate setter, object[] attributes = null) public CustomValueContainer(ScriptType valueType, GetDelegate getter, SetDelegate setter = null, object[] attributes = null)
: base(ScriptMemberInfo.Null, valueType) : base(ScriptMemberInfo.Null, valueType)
{ {
if (getter == null || setter == null) _getter = getter ?? throw new ArgumentNullException();
throw new ArgumentNullException();
_getter = getter;
_setter = setter; _setter = setter;
_attributes = attributes; _attributes = attributes;
} }
@@ -57,9 +54,9 @@ namespace FlaxEditor.CustomEditors
/// <param name="valueType">Type of the value.</param> /// <param name="valueType">Type of the value.</param>
/// <param name="initialValue">The initial value.</param> /// <param name="initialValue">The initial value.</param>
/// <param name="getter">The value getter.</param> /// <param name="getter">The value getter.</param>
/// <param name="setter">The value setter.</param> /// <param name="setter">The value setter (can be null if value is read-only).</param>
/// <param name="attributes">The custom type attributes used to override the value editor logic or appearance (eg. instance of <see cref="LimitAttribute"/>).</param> /// <param name="attributes">The custom type attributes used to override the value editor logic or appearance (eg. instance of <see cref="LimitAttribute"/>).</param>
public CustomValueContainer(ScriptType valueType, object initialValue, GetDelegate getter, SetDelegate setter, object[] attributes = null) public CustomValueContainer(ScriptType valueType, object initialValue, GetDelegate getter, SetDelegate setter = null, object[] attributes = null)
: this(valueType, getter, setter, attributes) : this(valueType, getter, setter, attributes)
{ {
Add(initialValue); Add(initialValue);
@@ -76,7 +73,6 @@ namespace FlaxEditor.CustomEditors
{ {
if (instanceValues == null || instanceValues.Count != Count) if (instanceValues == null || instanceValues.Count != Count)
throw new ArgumentException(); throw new ArgumentException();
for (int i = 0; i < Count; i++) for (int i = 0; i < Count; i++)
{ {
var v = instanceValues[i]; var v = instanceValues[i];
@@ -89,6 +85,8 @@ namespace FlaxEditor.CustomEditors
{ {
if (instanceValues == null || instanceValues.Count != Count) if (instanceValues == null || instanceValues.Count != Count)
throw new ArgumentException(); throw new ArgumentException();
if (_setter == null)
return;
for (int i = 0; i < Count; i++) for (int i = 0; i < Count; i++)
{ {
@@ -105,6 +103,8 @@ namespace FlaxEditor.CustomEditors
throw new ArgumentException(); throw new ArgumentException();
if (values == null || values.Count != Count) if (values == null || values.Count != Count)
throw new ArgumentException(); throw new ArgumentException();
if (_setter == null)
return;
for (int i = 0; i < Count; i++) for (int i = 0; i < Count; i++)
{ {
@@ -120,6 +120,8 @@ namespace FlaxEditor.CustomEditors
{ {
if (instanceValues == null || instanceValues.Count != Count) if (instanceValues == null || instanceValues.Count != Count)
throw new ArgumentException(); throw new ArgumentException();
if (_setter == null)
return;
for (int i = 0; i < Count; i++) for (int i = 0; i < Count; i++)
{ {
+7
View File
@@ -41,6 +41,11 @@ public class Editor : EditorModule
options.ScriptingAPI.SystemReferences.Add("System.Xml.ReaderWriter"); options.ScriptingAPI.SystemReferences.Add("System.Xml.ReaderWriter");
options.ScriptingAPI.SystemReferences.Add("System.Text.RegularExpressions"); options.ScriptingAPI.SystemReferences.Add("System.Text.RegularExpressions");
options.ScriptingAPI.SystemReferences.Add("System.ComponentModel.TypeConverter"); options.ScriptingAPI.SystemReferences.Add("System.ComponentModel.TypeConverter");
options.ScriptingAPI.SystemReferences.Add("System.IO.Compression.ZipFile");
// Enable optimizations for Editor, disable this for debugging the editor
if (options.Configuration == TargetConfiguration.Development)
options.ScriptingAPI.Optimization = true;
options.PublicDependencies.Add("Engine"); options.PublicDependencies.Add("Engine");
options.PrivateDependencies.Add("pugixml"); options.PrivateDependencies.Add("pugixml");
@@ -102,5 +107,7 @@ public class Editor : EditorModule
files.Add(Path.Combine(FolderPath, "Cooker/GameCooker.h")); files.Add(Path.Combine(FolderPath, "Cooker/GameCooker.h"));
files.Add(Path.Combine(FolderPath, "Cooker/PlatformTools.h")); files.Add(Path.Combine(FolderPath, "Cooker/PlatformTools.h"));
files.Add(Path.Combine(FolderPath, "Cooker/Steps/CookAssetsStep.h")); files.Add(Path.Combine(FolderPath, "Cooker/Steps/CookAssetsStep.h"));
files.Add(Path.Combine(FolderPath, "Utilities/ScreenUtilities.h"));
files.Add(Path.Combine(FolderPath, "Utilities/ViewportIconsRenderer.h"));
} }
} }

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