Compare commits
660 Commits
1682411bdb
...
sdl_platfo
| Author | SHA1 | Date | |
|---|---|---|---|
| f5974a7448 | |||
|
|
5d3da8a8d0 | ||
|
|
2cf30c27eb | ||
|
|
5d32bb962f | ||
|
|
477c979cdd | ||
|
|
9d46626641 | ||
|
|
e7824d6d9b | ||
|
|
7120ac4f10 | ||
|
|
f5751254d6 | ||
|
|
f11349f16c | ||
|
|
862c2db11a | ||
|
|
2af6bdc283 | ||
|
|
3c303514a4 | ||
|
|
a3cc3c79e2 | ||
|
|
cab0f92da8 | ||
|
|
21c07b7bf3 | ||
|
|
0b85438b20 | ||
|
|
9c15094855 | ||
|
|
9e9b255c00 | ||
|
|
1a5874e425 | ||
|
|
f256b0670f | ||
|
|
a54299a560 | ||
|
|
273b366f44 | ||
|
|
131d2fa4f1 | ||
|
|
08a43b93f4 | ||
|
|
47b004a4aa | ||
|
|
f7e5bcb058 | ||
|
|
e30647b675 | ||
|
|
f8e6e09717 | ||
|
|
b8ae066542 | ||
|
|
b96ff56043 | ||
|
|
2b0dc8b16d | ||
|
|
3c7d88663a | ||
|
|
cd72f4f19b | ||
|
|
897e451ab6 | ||
|
|
7a83bce996 | ||
|
|
48343897cd | ||
|
|
52c09b95ca | ||
|
|
09b23e2376 | ||
| 72ef6f92ae | |||
| 45c388c92d | |||
|
|
0abd953ded | ||
|
|
7f8729451c | ||
|
|
5340eac14a | ||
| 83d6f9fcf3 | |||
| 4d3588d09e | |||
| d72f8a61cb | |||
| 0e173de542 | |||
| 8aa0aa4292 | |||
| 26f8aa9985 | |||
| 24c62e2a8d | |||
| 91c1d3ce0a | |||
| 93aba7b959 | |||
| fbe61eee9e | |||
| 12bb3f3a22 | |||
| 713c4f5d1d | |||
| 2fe286eed0 | |||
| 4539ec4dcf | |||
| 17714c52e0 | |||
| 8810a98c28 | |||
| 1da6ffe920 | |||
| f966f92583 | |||
| ca17bc501f | |||
| 2e866aa156 | |||
| 696be807bd | |||
| ed63f47620 | |||
| 0d546a82c7 | |||
| 9a6c0dd5f4 | |||
| a00342b1c3 | |||
| a798965d9a | |||
| d0925b82df | |||
| 0c535d5a33 | |||
|
|
05cf5a4d7a | ||
| da59713152 | |||
| 8510fd237f | |||
| 3dc2fe0558 | |||
| 716f76dca4 | |||
| 29e732c783 | |||
| 53862298b6 | |||
| 4464555dcc | |||
| ec383ffb1d | |||
| 909ba336b0 | |||
| ecaa03365f | |||
| fb88460903 | |||
| db840ebef9 | |||
| 3f303a7a77 | |||
| 848d8e35e5 | |||
| 2f3b45ae82 | |||
| 48600c6ac5 | |||
| bb132305e3 | |||
| 769823ddf5 | |||
| 8a0ce55fec | |||
| 832d902699 | |||
| 6843205ec9 | |||
| 74fb1a74a6 | |||
| 29c3a9e4bf | |||
| 6f55b5452f | |||
| 716ae95630 | |||
| 02e9d60c5b | |||
| a1b7666c1c | |||
| 1b9663a390 | |||
|
|
bc4f3668fe | ||
|
|
a93085d6d6 | ||
|
|
34dcbc0445 | ||
|
|
3643ec7a58 | ||
|
|
1e2e613a78 | ||
|
|
fe95ac96af | ||
|
|
3b7c90644e | ||
|
|
5e8f9e357a | ||
|
|
4c9d51f0ef | ||
|
|
f7c6d34f59 | ||
|
|
7808c65dd3 | ||
|
|
baf28382a8 | ||
|
|
e9f2d94a2e | ||
|
|
837a4927c1 | ||
|
|
1ece21e25c | ||
|
|
54dc66d22e | ||
|
|
5ea6e7b49d | ||
|
|
8a52fa257b | ||
|
|
7d79dbac40 | ||
|
|
fef967d4a0 | ||
|
|
679d56d7a3 | ||
|
|
e760e5cc97 | ||
|
|
5bdbbb6d38 | ||
|
|
0c0f128585 | ||
|
|
ca153e70ab | ||
|
|
bc6f4f50cb | ||
|
|
84f6667105 | ||
|
|
5d80cb03f1 | ||
|
|
4fada6ba40 | ||
|
|
0fa88b23c6 | ||
|
|
301491bcde | ||
|
|
5f57286cdb | ||
|
|
7135eb3591 | ||
|
|
cc7d88d4a9 | ||
|
|
772f7f7fd2 | ||
|
|
8e2f3ec0c0 | ||
|
|
196ada5710 | ||
|
|
06729f6b62 | ||
|
|
7809007a13 | ||
|
|
06de1c0041 | ||
|
|
06665734e7 | ||
|
|
668511a727 | ||
|
|
5ffa3eb837 | ||
|
|
00202b06a4 | ||
|
|
93442ec8fa | ||
|
|
520bab7463 | ||
|
|
35fa63852c | ||
|
|
fee54f0f39 | ||
|
|
e66ae2ee74 | ||
|
|
30e9fe2371 | ||
|
|
a5e8f7d405 | ||
|
|
a3822b6669 | ||
|
|
819ce2222d | ||
|
|
e82bb639ed | ||
|
|
3200fc1570 | ||
|
|
54ad9a7629 | ||
|
|
6f28302fd1 | ||
|
|
47b22b305d | ||
|
|
6ad20b222d | ||
|
|
68b21652bb | ||
|
|
5fe9108803 | ||
|
|
02ecfad428 | ||
|
|
25b51cf9c4 | ||
|
|
b2c5b4c2e5 | ||
|
|
379c31ca49 | ||
|
|
383df75a81 | ||
|
|
0ff19e9c95 | ||
|
|
cbe96252f6 | ||
|
|
4846852762 | ||
|
|
72c3d2b94c | ||
|
|
7ccae0140b | ||
|
|
7885590593 | ||
|
|
dad8c0cd6b | ||
|
|
7410b506e3 | ||
|
|
dec9905bd3 | ||
|
|
bb35d9f811 | ||
|
|
b2c8c4018c | ||
|
|
809fd2653a | ||
|
|
2d956ebb36 | ||
|
|
33dd47c169 | ||
|
|
e101048c71 | ||
|
|
aaad2face2 | ||
|
|
8f1a1827f2 | ||
|
|
83c3201ef8 | ||
|
|
dcba97f84a | ||
|
|
ca6544204b | ||
|
|
1c3d1b623d | ||
|
|
1fac78f48f | ||
|
|
953cbb6e40 | ||
|
|
21047ac8ac | ||
|
|
754d321ef0 | ||
|
|
2ab9adab24 | ||
|
|
bf21b0a267 | ||
|
|
0d5534c445 | ||
|
|
afc4158dd3 | ||
|
|
09ead0cc7a | ||
|
|
f2e840577a | ||
|
|
345cbdb8d4 | ||
|
|
0ebda18669 | ||
|
|
efa081716f | ||
|
|
7225737984 | ||
|
|
0b1a64305a | ||
|
|
bfd972b96d | ||
|
|
25f26a7a91 | ||
|
|
d9ae41ed10 | ||
|
|
68877eebe3 | ||
|
|
5ed18c7448 | ||
|
|
1fda1d749d | ||
|
|
ac728f1a31 | ||
|
|
8beeea0da1 | ||
|
|
fc4b79239b | ||
|
|
618027b181 | ||
|
|
f97ead8a20 | ||
|
|
bae381430a | ||
|
|
1c3f7fcec0 | ||
|
|
65a219512c | ||
|
|
bb12562c2f | ||
|
|
b81b0b7616 | ||
|
|
bd9a5f03a4 | ||
|
|
9d5d80bf4a | ||
|
|
44e894f406 | ||
|
|
ef8612fb59 | ||
|
|
366b47ad80 | ||
|
|
b3508b9fe1 | ||
|
|
3f2eab5206 | ||
|
|
5bdf5da142 | ||
| c823257b79 | |||
|
|
937d369856 | ||
|
|
060bc0aaf8 | ||
|
|
ce335a0fe4 | ||
|
|
4aab1be3d6 | ||
|
|
6b6d808698 | ||
|
|
a6fb651ff4 | ||
|
|
c81ddd09cc | ||
|
|
015c4ab475 | ||
|
|
ccdf004404 | ||
|
|
9049093267 | ||
|
|
9d4d9ccf38 | ||
|
|
8b1d678f2e | ||
|
|
25b8939aff | ||
|
|
e4d2e429a0 | ||
|
|
67db774a2f | ||
|
|
3cd951f0a0 | ||
|
|
0525ce2cb3 | ||
|
|
5e74ec01ce | ||
|
|
bbbc0c9d50 | ||
|
|
25067959eb | ||
|
|
054d06f49e | ||
|
|
086ddc96bb | ||
|
|
3394de0b93 | ||
|
|
abd0c7dece | ||
|
|
ee540b3cb7 | ||
|
|
c146e156ec | ||
|
|
6efb015169 | ||
|
|
a982e0a111 | ||
|
|
84843f8cbb | ||
|
|
dccb43702e | ||
|
|
f459249f78 | ||
|
|
3ad369501a | ||
|
|
b0fe4373b0 | ||
|
|
9df5ed5b7f | ||
|
|
aa8add7b38 | ||
|
|
21f8dab5de | ||
|
|
4baa38c0cc | ||
|
|
3c091dc214 | ||
|
|
58090aa6d6 | ||
|
|
2521ed4ad5 | ||
|
|
9e25714338 | ||
|
|
6a5f22400d | ||
|
|
a5fffc0c9e | ||
|
|
e551ecbe5f | ||
|
|
898295e9d4 | ||
|
|
a17c15ae96 | ||
|
|
be6a258846 | ||
|
|
8542f78b0b | ||
|
|
da513972e8 | ||
|
|
be293a957a | ||
|
|
8e26591c0b | ||
|
|
4e31d436d5 | ||
|
|
b6f7914b14 | ||
|
|
9ffbe1f8ca | ||
| 0764ff6cb7 | |||
|
|
4e0cd9e8a9 | ||
|
|
24f3dfe264 | ||
|
|
42fc62eb68 | ||
|
|
b1392be3a1 | ||
|
|
04dde7a3f2 | ||
|
|
44fae3838e | ||
|
|
f11306af24 | ||
|
|
4057dc189d | ||
|
|
fc98b5f1f0 | ||
|
|
4d6282a5b4 | ||
|
|
45a24a05c5 | ||
|
|
0e058b2590 | ||
|
|
a31279954a | ||
|
|
16ed7272a7 | ||
|
|
d25cb7a9da | ||
|
|
6461ffbd0d | ||
|
|
1b04c9a7b1 | ||
|
|
6a27e5338a | ||
|
|
5ad323c7cb | ||
|
|
abe2482a01 | ||
|
|
9c065d55e0 | ||
|
|
1475075b00 | ||
|
|
702564366d | ||
|
|
e2fd3891d1 | ||
| f54e961f11 | |||
|
|
aabd70fbe7 | ||
| 428ebf7fd7 | |||
|
|
72f16d738f | ||
|
|
475818554d | ||
|
|
8ebb3a3215 | ||
|
|
2085a0bf25 | ||
|
|
d829461def | ||
|
|
2d169fdcd8 | ||
|
|
53ba5968fd | ||
|
|
cc735a1b6a | ||
|
|
970af7bdc8 | ||
|
|
2ff6a6dd9a | ||
|
|
ae3149c9c0 | ||
|
|
1a1bd56802 | ||
|
|
25b566b348 | ||
|
|
4fb95a704a | ||
|
|
5f09ef4c1f | ||
|
|
fc4c2c53fc | ||
|
|
fa06a8cc16 | ||
|
|
4d4c046556 | ||
|
|
4598cdb2d0 | ||
|
|
eb43d4813d | ||
|
|
7bc099c32c | ||
|
|
9a59d0c5ed | ||
|
|
275ca296fa | ||
|
|
57af076c8d | ||
|
|
d501018feb | ||
|
|
d4c72487cd | ||
|
|
0b48a274e5 | ||
|
|
342f3543ca | ||
|
|
b36e55446f | ||
|
|
cf40facefe | ||
|
|
f905c49f0b | ||
|
|
fa2f2e3104 | ||
|
|
ae74d49b09 | ||
|
|
80a44b5f5c | ||
|
|
c72fac335f | ||
|
|
dffc6ea24d | ||
|
|
38f74c8cf7 | ||
|
|
61a731704d | ||
|
|
c1339765b7 | ||
|
|
f5280eab74 | ||
|
|
030befdcaa | ||
|
|
3a591577ad | ||
|
|
af416fe0c8 | ||
|
|
326bc498b8 | ||
|
|
d1cc8da841 | ||
|
|
4cf22c3a1f | ||
|
|
8736d4c91a | ||
|
|
682ca9e953 | ||
|
|
344d17714c | ||
|
|
b247070840 | ||
|
|
236b8d5667 | ||
|
|
c3ad937d3f | ||
|
|
d8dcec42d5 | ||
|
|
3b5f953b3d | ||
|
|
9fd98c8e12 | ||
|
|
0b24c50161 | ||
|
|
8f9eaddbe5 | ||
|
|
fe8f862b16 | ||
|
|
7d0804af91 | ||
|
|
67f12596e2 | ||
|
|
6a66a944d2 | ||
|
|
65a689f8ab | ||
|
|
18fd68db25 | ||
|
|
86444aa5f3 | ||
|
|
011abe4ac0 | ||
|
|
f4c07388d9 | ||
|
|
eaf48bb176 | ||
|
|
d4a5c76c82 | ||
|
|
8a7ceef288 | ||
|
|
ec11a79f55 | ||
|
|
55fd198102 | ||
|
|
425699c4b0 | ||
|
|
1497acef58 | ||
|
|
6111f67e33 | ||
|
|
39419787fa | ||
|
|
e02f2990d9 | ||
|
|
d0a6edbb2c | ||
| 10a906d51b | |||
| f61779119b | |||
|
|
be8686bbb2 | ||
|
|
59061c01d3 | ||
| af3badaeef | |||
|
|
90ba7f4a92 | ||
|
|
754e0c4e29 | ||
|
|
addc6d5216 | ||
|
|
f17d6f62ab | ||
|
|
ae3d437539 | ||
|
|
99b737eb14 | ||
|
|
4add5dcf49 | ||
|
|
a204ada6d3 | ||
|
|
bdc7f0760f | ||
|
|
07ef2f03d5 | ||
|
|
b5437a9097 | ||
|
|
890c3e75c3 | ||
|
|
7fcf8c2d4c | ||
|
|
3796b0ccae | ||
|
|
bc18ddc04b | ||
|
|
90316dfa52 | ||
|
|
55fa372197 | ||
|
|
563f0b9ab4 | ||
|
|
30ea3bc9c2 | ||
|
|
07b9e5bfdd | ||
|
|
3b7cb00af2 | ||
|
|
d0d5ad4657 | ||
|
|
f274639e94 | ||
|
|
7ac2376231 | ||
|
|
01d1dbba6c | ||
|
|
ca995093b6 | ||
|
|
f36d3a11ab | ||
|
|
06a04167c7 | ||
|
|
e2df7a1e85 | ||
|
|
80f5b554cd | ||
|
|
f10404a948 | ||
|
|
a9580b9b46 | ||
|
|
3d76a99c9b | ||
|
|
eaeeea6a81 | ||
|
|
b546e4a332 | ||
|
|
281e13b42c | ||
|
|
8451439abb | ||
|
|
95c9df2581 | ||
|
|
2699755581 | ||
|
|
99b0fbee07 | ||
|
|
f153c67c0e | ||
|
|
fa8857be0e | ||
|
|
ea96418764 | ||
|
|
d751c6a6c6 | ||
|
|
344d342610 | ||
|
|
e75d7ad257 | ||
|
|
54869f1da0 | ||
|
|
02df6bafac | ||
|
|
d60f3bdfb1 | ||
|
|
506efb7538 | ||
|
|
1b97e49ed9 | ||
|
|
b71f803554 | ||
|
|
647d74af0d | ||
|
|
237ea121be | ||
|
|
a1c46d2e6e | ||
|
|
2260236fa6 | ||
|
|
cb7fc6141d | ||
|
|
77c48c037e | ||
|
|
756ba0a533 | ||
|
|
99788e4743 | ||
|
|
ccbcab9793 | ||
|
|
3505b8971b | ||
|
|
1f294605a3 | ||
|
|
9264db8317 | ||
|
|
2b2ace0d00 | ||
|
|
7e165d6127 | ||
|
|
e1dbaebe8e | ||
|
|
21f1a46c05 | ||
|
|
6fbb5548b9 | ||
|
|
fa17c49eb1 | ||
|
|
e87bb2325b | ||
|
|
13863344d2 | ||
|
|
7aa240e5eb | ||
|
|
7f0d852f49 | ||
|
|
edaed7bda1 | ||
|
|
3133ebbd83 | ||
|
|
bff25a8dd8 | ||
|
|
a9d0f62039 | ||
|
|
5335594cb5 | ||
|
|
3f201c3863 | ||
|
|
3dc3406230 | ||
|
|
0b99cb6de5 | ||
|
|
deab78d6b1 | ||
|
|
45c01e7ada | ||
|
|
bcc8544c46 | ||
|
|
597bbf1f30 | ||
|
|
67b5b74588 | ||
|
|
39f2f0ccdf | ||
|
|
6ad2cd0697 | ||
|
|
ef01a4afeb | ||
|
|
12b98f2df1 | ||
|
|
99ba59d02a | ||
|
|
3b4d4d234d | ||
|
|
bc73d38d34 | ||
|
|
db4d7d2a05 | ||
|
|
7eb2088af0 | ||
|
|
29bfef677f | ||
|
|
933fac6c13 | ||
|
|
78cf1a4948 | ||
|
|
792d322818 | ||
|
|
6f04231b31 | ||
|
|
04fc118ddf | ||
|
|
5aa5c97e4c | ||
|
|
4f42fb2302 | ||
|
|
a66cb4d1b2 | ||
|
|
22914dc232 | ||
|
|
5af13bcc93 | ||
|
|
ea5cb5d83a | ||
|
|
7b7dd9d142 | ||
|
|
348f17479d | ||
|
|
1e262b69cc | ||
|
|
97184c87af | ||
|
|
867f7d0143 | ||
|
|
26d0b9a42c | ||
|
|
f2e4fe300b | ||
|
|
a313db22d2 | ||
|
|
e53eddaba5 | ||
|
|
757b8ff855 | ||
|
|
f71e731e54 | ||
|
|
cb6ab6a647 | ||
|
|
899528e087 | ||
|
|
c79cd82fd4 | ||
|
|
711fc80d8c | ||
|
|
9219b34dc3 | ||
|
|
e6450bfc7a | ||
|
|
6a8814c99a | ||
|
|
3151e47722 | ||
|
|
ab99a25cee | ||
|
|
e7132086a5 | ||
|
|
668f3fa68d | ||
|
|
fee0ab74ff | ||
|
|
88703d721b | ||
|
|
723a882824 | ||
|
|
36d4417905 | ||
|
|
9f648caac8 | ||
|
|
1bf29c042b | ||
|
|
8eaa906e0c | ||
|
|
5b98603c16 | ||
|
|
80299c8552 | ||
|
|
d1ac9cd2bc | ||
|
|
59b4755379 | ||
|
|
b3f37ca041 | ||
|
|
666efb7675 | ||
|
|
fc4e6f4972 | ||
|
|
873491eca2 | ||
|
|
3ba1ebb847 | ||
|
|
cedf4b1eb5 | ||
|
|
35e9e048f2 | ||
|
|
f9e125f795 | ||
|
|
0991628a78 | ||
|
|
ab78314a01 | ||
|
|
0e13173119 | ||
|
|
a7061a7524 | ||
|
|
344595e171 | ||
|
|
9d70fd82d6 | ||
|
|
914d82a087 | ||
|
|
74993dcf9e | ||
|
|
f8f4edfa76 | ||
|
|
826d37c513 | ||
|
|
377eb78020 | ||
|
|
3de3c1f2c6 | ||
|
|
246944f688 | ||
|
|
e9dcb8a8bb | ||
|
|
3f50625cc3 | ||
|
|
35c44d60a4 | ||
|
|
6e598ae9f6 | ||
|
|
4de9e9d918 | ||
|
|
c1bd42ff7e | ||
|
|
b1a54d2967 | ||
|
|
2288684950 | ||
|
|
0c645e8b0c | ||
|
|
072f7c7e45 | ||
|
|
41a0ccb218 | ||
|
|
f88eeeb313 | ||
|
|
082d97248d | ||
|
|
d88c5f3063 | ||
|
|
fa9ce1d346 | ||
|
|
1c2c010ddc | ||
|
|
46c1cc9a49 | ||
|
|
dcd7b4b6c3 | ||
|
|
2d371fd05f | ||
|
|
62ece0d92e | ||
|
|
8338ec6076 | ||
|
|
86e21a53ff | ||
|
|
c3e31baa7a | ||
|
|
302fc2feb1 | ||
|
|
e324d32769 | ||
|
|
5d7eba05ea | ||
|
|
9a654f729f | ||
|
|
87d35f0314 | ||
|
|
5904c0eea5 | ||
|
|
e5289931c6 | ||
|
|
0b1263a9e2 | ||
|
|
16235c21c0 | ||
|
|
2127961069 | ||
|
|
b681a03bfb | ||
|
|
449e988a59 | ||
|
|
a2693fa354 | ||
|
|
5328ea891d | ||
|
|
91d86552cd | ||
|
|
14a615cd7c | ||
|
|
703e83cd48 | ||
|
|
c94052513e | ||
|
|
7e1d6679ce | ||
|
|
60ed23105d | ||
|
|
ac832a0e81 | ||
|
|
c202a639cf | ||
|
|
b957733150 | ||
|
|
7e4d7743a4 | ||
|
|
a6f1dbbf32 | ||
|
|
b38af8fd00 | ||
|
|
4ddf1a2cc8 | ||
|
|
443fe5dbcb | ||
|
|
23ad24751a | ||
|
|
f8371d037b | ||
|
|
ff495e1319 | ||
|
|
575a286e1e | ||
|
|
a72e8f2f65 | ||
|
|
1fca41b31a | ||
|
|
8b3f1ca019 | ||
|
|
a50c21cf36 | ||
|
|
863afc065d | ||
|
|
eda4f433d0 | ||
|
|
f56207f1a4 | ||
|
|
541ca67a06 | ||
|
|
44dad402f6 | ||
|
|
1a588eb9f7 | ||
|
|
cda74f5cc4 | ||
|
|
077ececcf8 | ||
|
|
d48a4c4483 | ||
|
|
6f6348508a | ||
|
|
23624aa7f8 | ||
|
|
c9b1f6f516 | ||
|
|
a2874a189e | ||
|
|
edfbeea0e6 | ||
|
|
db06f4f72e | ||
|
|
32b09538ba | ||
|
|
c6958357c3 | ||
|
|
74d2f5d115 | ||
|
|
777e65c170 | ||
|
|
adbe578aa1 | ||
|
|
85915d787a | ||
|
|
2f0518a348 | ||
|
|
7f5f1ba938 | ||
|
|
a932d549f4 | ||
|
|
791435ba76 | ||
|
|
0b3a95e551 | ||
|
|
f746940485 | ||
|
|
ecb80e0f34 | ||
|
|
aded4bfdeb | ||
|
|
1161a4114d | ||
|
|
7ede250403 | ||
|
|
5780fb7392 | ||
|
|
840abf8cdb | ||
|
|
b57e847916 | ||
|
|
c858b67f2e | ||
|
|
6d77d45529 | ||
|
|
eed44c14df | ||
|
|
af63858d80 | ||
|
|
22764f5362 | ||
|
|
1b84f57a5b | ||
|
|
23f4a82bbc | ||
|
|
9fbfc83535 | ||
|
|
ad8d84bfd7 | ||
|
|
4257f1e2ac | ||
|
|
8166970038 | ||
|
|
88530606df | ||
|
|
d9b3443818 |
4
.github/workflows/build_linux.yml
vendored
4
.github/workflows/build_linux.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
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 libwayland-dev
|
||||
- name: Setup Vulkan
|
||||
uses: ./.github/actions/vulkan
|
||||
- name: Setup .NET
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev
|
||||
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev libwayland-dev
|
||||
- name: Setup Vulkan
|
||||
uses: ./.github/actions/vulkan
|
||||
- name: Setup .NET
|
||||
|
||||
29
.github/workflows/cd.yml
vendored
29
.github/workflows/cd.yml
vendored
@@ -1,12 +1,13 @@
|
||||
name: Continuous Deployment
|
||||
on:
|
||||
schedule:
|
||||
- cron: '15 4 * * *'
|
||||
- cron: '15 6 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: false
|
||||
GIT_LFS_PULL_OPTIONS: '-c lfs.concurrenttransfers=1 -c lfs.transfer.maxretries=2 -c http.version="HTTP/1.1" -c lfs.activitytimeout=60'
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -20,7 +21,7 @@ jobs:
|
||||
- name: Checkout LFS
|
||||
run: |
|
||||
git lfs version
|
||||
git lfs pull
|
||||
git ${{ env.GIT_LFS_PULL_OPTIONS }} lfs pull
|
||||
- name: Setup Vulkan
|
||||
uses: ./.github/actions/vulkan
|
||||
- name: Setup .NET
|
||||
@@ -35,12 +36,12 @@ jobs:
|
||||
run: |
|
||||
.\PackageEditor.bat -arch=x64 -platform=Windows -deployOutput=Output
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Windows-Editor
|
||||
path: Output/Editor.zip
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Windows-EditorDebugSymbols
|
||||
path: Output/EditorDebugSymbols.zip
|
||||
@@ -53,7 +54,7 @@ jobs:
|
||||
- name: Checkout LFS
|
||||
run: |
|
||||
git lfs version
|
||||
git lfs pull
|
||||
git ${{ env.GIT_LFS_PULL_OPTIONS }} lfs pull
|
||||
- name: Setup Vulkan
|
||||
uses: ./.github/actions/vulkan
|
||||
- name: Setup .NET
|
||||
@@ -68,7 +69,7 @@ jobs:
|
||||
run: |
|
||||
.\PackagePlatforms.bat -arch=x64 -platform=Windows -deployOutput=Output
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Windows-Game
|
||||
path: Output/Windows.zip
|
||||
@@ -83,7 +84,7 @@ jobs:
|
||||
- name: Checkout LFS
|
||||
run: |
|
||||
git lfs version
|
||||
git lfs pull
|
||||
git ${{ env.GIT_LFS_PULL_OPTIONS }} lfs pull
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev
|
||||
@@ -101,7 +102,7 @@ jobs:
|
||||
run: |
|
||||
./PackageEditor.sh -arch=x64 -platform=Linux -deployOutput=Output
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Linux-Editor
|
||||
path: Output/FlaxEditorLinux.zip
|
||||
@@ -114,7 +115,7 @@ jobs:
|
||||
- name: Checkout LFS
|
||||
run: |
|
||||
git lfs version
|
||||
git lfs pull
|
||||
git ${{ env.GIT_LFS_PULL_OPTIONS }} lfs pull
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev
|
||||
@@ -132,7 +133,7 @@ jobs:
|
||||
run: |
|
||||
./PackagePlatforms.sh -arch=x64 -platform=Linux -deployOutput=Output
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Linux-Game
|
||||
path: Output/Linux.zip
|
||||
@@ -147,7 +148,7 @@ jobs:
|
||||
- name: Checkout LFS
|
||||
run: |
|
||||
git lfs version
|
||||
git lfs pull
|
||||
git ${{ env.GIT_LFS_PULL_OPTIONS }} lfs pull
|
||||
- name: Setup Vulkan
|
||||
uses: ./.github/actions/vulkan
|
||||
- name: Setup .NET
|
||||
@@ -162,7 +163,7 @@ jobs:
|
||||
run: |
|
||||
./PackageEditor.command -arch=ARM64 -platform=Mac -deployOutput=Output
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Mac-Editor
|
||||
path: Output/FlaxEditorMac.zip
|
||||
@@ -175,7 +176,7 @@ jobs:
|
||||
- name: Checkout LFS
|
||||
run: |
|
||||
git lfs version
|
||||
git lfs pull
|
||||
git ${{ env.GIT_LFS_PULL_OPTIONS }} lfs pull
|
||||
- name: Setup Vulkan
|
||||
uses: ./.github/actions/vulkan
|
||||
- name: Setup .NET
|
||||
@@ -190,7 +191,7 @@ jobs:
|
||||
run: |
|
||||
./PackagePlatforms.command -arch=ARM64 -platform=Mac -deployOutput=Output
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Mac-Game
|
||||
path: Output/Mac.zip
|
||||
|
||||
5
.github/workflows/tests.yml
vendored
5
.github/workflows/tests.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
||||
git lfs pull
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
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 libwayland-dev
|
||||
- name: Build
|
||||
run: |
|
||||
./GenerateProjectFiles.sh -vs2022 -log -verbose -printSDKs -dotnet=8
|
||||
@@ -73,8 +73,11 @@ jobs:
|
||||
.\Development\Scripts\Windows\CallBuildTool.bat -build -log -dotnet=8 -arch=x64 -platform=Windows -configuration=Development -buildtargets=FlaxTestsTarget
|
||||
dotnet msbuild Source\Tools\Flax.Build.Tests\Flax.Build.Tests.csproj /m /t:Restore,Build /p:Configuration=Debug /p:Platform=AnyCPU /nologo
|
||||
- name: Test
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ErrorActionPreference = "Stop"
|
||||
.\Binaries\Editor\Win64\Development\FlaxTests.exe
|
||||
if(!$?) { Write-Host "Tests failed with exit code $LastExitCode" -ForegroundColor Red; Exit $LastExitCode }
|
||||
dotnet test -f net8.0 Binaries\Tests\Flax.Build.Tests.dll
|
||||
xcopy /y Binaries\Editor\Win64\Development\FlaxEngine.CSharp.dll Binaries\Tests
|
||||
xcopy /y Binaries\Editor\Win64\Development\FlaxEngine.CSharp.runtimeconfig.json Binaries\Tests
|
||||
|
||||
BIN
Content/Editor/Camera/M_Camera.flax
(Stored with Git LFS)
BIN
Content/Editor/Camera/M_Camera.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Camera/O_Camera.flax
(Stored with Git LFS)
BIN
Content/Editor/Camera/O_Camera.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/CubeTexturePreviewMaterial.flax
(Stored with Git LFS)
BIN
Content/Editor/CubeTexturePreviewMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/DebugMaterials/DDGIDebugProbes.flax
(Stored with Git LFS)
BIN
Content/Editor/DebugMaterials/DDGIDebugProbes.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/DebugMaterials/SingleColor/Decal.flax
(Stored with Git LFS)
BIN
Content/Editor/DebugMaterials/SingleColor/Decal.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/DebugMaterials/SingleColor/Particle.flax
(Stored with Git LFS)
BIN
Content/Editor/DebugMaterials/SingleColor/Particle.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/DebugMaterials/SingleColor/Surface.flax
(Stored with Git LFS)
BIN
Content/Editor/DebugMaterials/SingleColor/Surface.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/DebugMaterials/SingleColor/SurfaceAdditive.flax
(Stored with Git LFS)
BIN
Content/Editor/DebugMaterials/SingleColor/SurfaceAdditive.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/DebugMaterials/SingleColor/Terrain.flax
(Stored with Git LFS)
BIN
Content/Editor/DebugMaterials/SingleColor/Terrain.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/DefaultFontMaterial.flax
(Stored with Git LFS)
BIN
Content/Editor/DefaultFontMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Gizmo/FoliageBrushMaterial.flax
(Stored with Git LFS)
BIN
Content/Editor/Gizmo/FoliageBrushMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Gizmo/Material.flax
(Stored with Git LFS)
BIN
Content/Editor/Gizmo/Material.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Gizmo/MaterialWire.flax
(Stored with Git LFS)
BIN
Content/Editor/Gizmo/MaterialWire.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Gizmo/MaterialWireFocus.flax
(Stored with Git LFS)
BIN
Content/Editor/Gizmo/MaterialWireFocus.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Gizmo/RotationAxis.flax
(Stored with Git LFS)
BIN
Content/Editor/Gizmo/RotationAxis.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Gizmo/ScaleAxis.flax
(Stored with Git LFS)
BIN
Content/Editor/Gizmo/ScaleAxis.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Gizmo/SelectionOutlineMaterial.flax
(Stored with Git LFS)
BIN
Content/Editor/Gizmo/SelectionOutlineMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Gizmo/TranslationAxis.flax
(Stored with Git LFS)
BIN
Content/Editor/Gizmo/TranslationAxis.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Gizmo/VertexColorsPreviewMaterial.flax
(Stored with Git LFS)
BIN
Content/Editor/Gizmo/VertexColorsPreviewMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Gizmo/WireBox.flax
(Stored with Git LFS)
BIN
Content/Editor/Gizmo/WireBox.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Highlight Material.flax
(Stored with Git LFS)
BIN
Content/Editor/Highlight Material.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Icons/AudioListener.flax
(Stored with Git LFS)
BIN
Content/Editor/Icons/AudioListener.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Icons/AudioSource.flax
(Stored with Git LFS)
BIN
Content/Editor/Icons/AudioSource.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Icons/Decal.flax
(Stored with Git LFS)
BIN
Content/Editor/Icons/Decal.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Icons/DirectionalLight.flax
(Stored with Git LFS)
BIN
Content/Editor/Icons/DirectionalLight.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Icons/EnvironmentProbe.flax
(Stored with Git LFS)
BIN
Content/Editor/Icons/EnvironmentProbe.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Icons/IconsMaterial.flax
(Stored with Git LFS)
BIN
Content/Editor/Icons/IconsMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Icons/ParticleEffect.flax
(Stored with Git LFS)
BIN
Content/Editor/Icons/ParticleEffect.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Icons/PointLight.flax
(Stored with Git LFS)
BIN
Content/Editor/Icons/PointLight.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Icons/SceneAnimationPlayer.flax
(Stored with Git LFS)
BIN
Content/Editor/Icons/SceneAnimationPlayer.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Icons/SkyLight.flax
(Stored with Git LFS)
BIN
Content/Editor/Icons/SkyLight.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Icons/Skybox.flax
(Stored with Git LFS)
BIN
Content/Editor/Icons/Skybox.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/IesProfilePreviewMaterial.flax
(Stored with Git LFS)
BIN
Content/Editor/IesProfilePreviewMaterial.flax
(Stored with Git LFS)
Binary file not shown.
@@ -83,6 +83,12 @@ float3 GetObjectSize(MaterialInput input)
|
||||
return float3(1, 1, 1);
|
||||
}
|
||||
|
||||
// Gets the current object scale (supports instancing)
|
||||
float3 GetObjectScale(MaterialInput input)
|
||||
{
|
||||
return float3(1, 1, 1);
|
||||
}
|
||||
|
||||
// Get the current object random value supports instancing)
|
||||
float GetPerInstanceRandom(MaterialInput input)
|
||||
{
|
||||
|
||||
@@ -207,6 +207,20 @@ float3 GetObjectSize(MaterialInput input)
|
||||
return GeometrySize * float3(world._m00, world._m11, world._m22);
|
||||
}
|
||||
|
||||
// Gets the current object scale (supports instancing)
|
||||
float3 GetObjectScale(MaterialInput input)
|
||||
{
|
||||
float4x4 world = WorldMatrix;
|
||||
|
||||
// Extract scale from the world matrix
|
||||
float3 scale;
|
||||
scale.x = length(float3(world._11, world._12, world._13));
|
||||
scale.y = length(float3(world._21, world._22, world._23));
|
||||
scale.z = length(float3(world._31, world._32, world._33));
|
||||
|
||||
return scale;
|
||||
}
|
||||
|
||||
// Get the current object random value
|
||||
float GetPerInstanceRandom(MaterialInput input)
|
||||
{
|
||||
@@ -297,7 +311,7 @@ VertexOutput VS_SplineModel(ModelInput input)
|
||||
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
|
||||
|
||||
// Pass vertex attributes
|
||||
output.Geometry.TexCoord = input.TexCoord;
|
||||
output.Geometry.TexCoord = input.TexCoord0;
|
||||
#if USE_VERTEX_COLOR
|
||||
output.Geometry.VertexColor = input.Color;
|
||||
#endif
|
||||
|
||||
@@ -140,7 +140,7 @@ void SetParticleVec4(uint particleIndex, int offset, float4 value)
|
||||
bool AddParticle(out uint dstIndex)
|
||||
{
|
||||
// Acquire the particle index in the destination buffer
|
||||
DstParticlesData.InterlockedAdd(ParticleCounterOffset, 1, dstIndex);
|
||||
DstParticlesData.InterlockedAdd(ParticleCounterOffset, 1u, dstIndex);
|
||||
|
||||
// Prevent overflow
|
||||
return dstIndex >= PARTICLE_CAPACITY;
|
||||
|
||||
@@ -163,6 +163,12 @@ float3 GetObjectSize(MaterialInput input)
|
||||
return float3(1, 1, 1);
|
||||
}
|
||||
|
||||
// Gets the current object scale (supports instancing)
|
||||
float3 GetObjectScale(MaterialInput input)
|
||||
{
|
||||
return float3(1, 1, 1);
|
||||
}
|
||||
|
||||
// Get the current object random value supports instancing)
|
||||
float GetPerInstanceRandom(MaterialInput input)
|
||||
{
|
||||
|
||||
@@ -299,24 +299,22 @@ half3x3 CalcTangentToLocal(ModelInput input)
|
||||
float3 normal = input.Normal.xyz * 2.0 - 1.0;
|
||||
float3 tangent = input.Tangent.xyz * 2.0 - 1.0;
|
||||
float3 bitangent = cross(normal, tangent) * bitangentSign;
|
||||
return float3x3(tangent, bitangent, normal);
|
||||
return (half3x3)float3x3(tangent, bitangent, normal);
|
||||
}
|
||||
|
||||
half3x3 CalcTangentToWorld(in float4x4 world, in half3x3 tangentToLocal)
|
||||
{
|
||||
half3x3 localToWorld = RemoveScaleFromLocalToWorld((float3x3)world);
|
||||
half3x3 localToWorld = (half3x3)RemoveScaleFromLocalToWorld((float3x3)world);
|
||||
return mul(tangentToLocal, localToWorld);
|
||||
}
|
||||
|
||||
float3 GetParticlePosition(uint ParticleIndex)
|
||||
float3 GetParticlePosition(uint particleIndex)
|
||||
{
|
||||
return TransformParticlePosition(GetParticleVec3(ParticleIndex, PositionOffset));
|
||||
return TransformParticlePosition(GetParticleVec3(particleIndex, PositionOffset));
|
||||
}
|
||||
|
||||
// Vertex Shader function for Sprite Rendering
|
||||
META_VS(true, FEATURE_LEVEL_ES2)
|
||||
META_VS_IN_ELEMENT(POSITION, 0, R32G32_FLOAT, 0, 0, PER_VERTEX, 0, true)
|
||||
META_VS_IN_ELEMENT(TEXCOORD, 0, R32G32_FLOAT, 0, ALIGN, PER_VERTEX, 0, true)
|
||||
VertexOutput VS_Sprite(SpriteInput input, uint particleIndex : SV_InstanceID)
|
||||
{
|
||||
VertexOutput output;
|
||||
@@ -407,7 +405,7 @@ VertexOutput VS_Sprite(SpriteInput input, uint particleIndex : SV_InstanceID)
|
||||
output.InstanceParams = PerInstanceRandom;
|
||||
|
||||
// Calculate tanget space to world space transformation matrix for unit vectors
|
||||
half3x3 tangentToLocal = float3x3(axisX, axisY, axisZ);
|
||||
half3x3 tangentToLocal = half3x3(axisX, axisY, axisZ);
|
||||
half3x3 tangentToWorld = CalcTangentToWorld(world, tangentToLocal);
|
||||
output.TBN = tangentToWorld;
|
||||
|
||||
@@ -516,7 +514,7 @@ VertexOutput VS_Model(ModelInput input, uint particleIndex : SV_InstanceID)
|
||||
output.Position = mul(float4(output.WorldPosition, 1), ViewProjectionMatrix);
|
||||
|
||||
// Pass vertex attributes
|
||||
output.TexCoord = input.TexCoord;
|
||||
output.TexCoord = input.TexCoord0;
|
||||
output.ParticleIndex = particleIndex;
|
||||
#if USE_VERTEX_COLOR
|
||||
output.VertexColor = input.Color;
|
||||
@@ -612,7 +610,7 @@ VertexOutput VS_Ribbon(RibbonInput input, uint vertexIndex : SV_VertexID)
|
||||
{
|
||||
output.TexCoord.x = (float)input.Order / (float)RibbonSegmentCount;
|
||||
}
|
||||
output.TexCoord.y = (vertexIndex + 1) & 0x1;
|
||||
output.TexCoord.y = (float)((vertexIndex + 1) & 0x1);
|
||||
output.TexCoord = output.TexCoord * RibbonUVScale + RibbonUVOffset;
|
||||
|
||||
// Compute world space vertex position
|
||||
@@ -631,7 +629,7 @@ VertexOutput VS_Ribbon(RibbonInput input, uint vertexIndex : SV_VertexID)
|
||||
output.InstanceParams = PerInstanceRandom;
|
||||
|
||||
// Calculate tanget space to world space transformation matrix for unit vectors
|
||||
half3x3 tangentToLocal = float3x3(tangentRight, tangentUp, cross(tangentRight, tangentUp));
|
||||
half3x3 tangentToLocal = half3x3(tangentRight, tangentUp, cross(tangentRight, tangentUp));
|
||||
half3x3 tangentToWorld = CalcTangentToWorld(world, tangentToLocal);
|
||||
output.TBN = tangentToWorld;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// Version: @0
|
||||
|
||||
#define MATERIAL 1
|
||||
#define MATERIAL_TEXCOORDS 4
|
||||
#define USE_PER_VIEW_CONSTANTS 1
|
||||
#define USE_PER_DRAW_CONSTANTS 1
|
||||
@3
|
||||
@@ -24,21 +25,29 @@ Buffer<float4> BoneMatrices : register(t1);
|
||||
Buffer<float4> PrevBoneMatrices : register(t2);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Geometry data passed though the graphics rendering stages up to the pixel shader
|
||||
struct GeometryData
|
||||
{
|
||||
float3 WorldPosition : TEXCOORD0;
|
||||
float2 TexCoord : TEXCOORD1;
|
||||
float2 LightmapUV : TEXCOORD2;
|
||||
float4 TexCoords01 : TEXCOORD1;
|
||||
float4 TexCoords23 : TEXCOORD2;
|
||||
float2 LightmapUV : TEXCOORD3;
|
||||
#if USE_VERTEX_COLOR
|
||||
half4 VertexColor : COLOR;
|
||||
#endif
|
||||
float3 WorldNormal : TEXCOORD3;
|
||||
float4 WorldTangent : TEXCOORD4;
|
||||
float3 WorldNormal : TEXCOORD4;
|
||||
float4 WorldTangent : TEXCOORD5;
|
||||
float3 PrevWorldPosition : TEXCOORD7;
|
||||
nointerpolation uint ObjectIndex : TEXCOORD8;
|
||||
};
|
||||
|
||||
float3 DecodeNormal(float4 normalMap)
|
||||
{
|
||||
float2 xy = normalMap.rg * 2.0 - 1.0;
|
||||
return float3(xy, sqrt(1.0 - saturate(dot(xy, xy))));
|
||||
}
|
||||
|
||||
// Interpolants passed from the vertex shader
|
||||
struct VertexOutput
|
||||
{
|
||||
@@ -68,7 +77,7 @@ struct MaterialInput
|
||||
{
|
||||
float3 WorldPosition;
|
||||
float TwoSidedSign;
|
||||
float2 TexCoord;
|
||||
float2 TexCoords[MATERIAL_TEXCOORDS];
|
||||
#if USE_LIGHTMAP
|
||||
float2 LightmapUV;
|
||||
#endif
|
||||
@@ -86,12 +95,18 @@ struct MaterialInput
|
||||
#endif
|
||||
};
|
||||
|
||||
// Map access to the main texure coordinate channel as UV0
|
||||
#define TexCoord TexCoords[0]
|
||||
|
||||
// Extracts geometry data to the material input
|
||||
MaterialInput GetGeometryMaterialInput(GeometryData geometry)
|
||||
{
|
||||
MaterialInput output = (MaterialInput)0;
|
||||
output.WorldPosition = geometry.WorldPosition;
|
||||
output.TexCoord = geometry.TexCoord;
|
||||
output.TexCoords[0] = geometry.TexCoords01.xy;
|
||||
output.TexCoords[1] = geometry.TexCoords01.zw;
|
||||
output.TexCoords[2] = geometry.TexCoords23.xy;
|
||||
output.TexCoords[3] = geometry.TexCoords23.zw;
|
||||
#if USE_LIGHTMAP
|
||||
output.LightmapUV = geometry.LightmapUV;
|
||||
#endif
|
||||
@@ -126,8 +141,8 @@ MaterialInput GetGeometryMaterialInput(GeometryData geometry)
|
||||
GeometryData InterpolateGeometry(GeometryData p0, float w0, GeometryData p1, float w1, GeometryData p2, float w2)
|
||||
{
|
||||
GeometryData output = (GeometryData)0;
|
||||
output.TexCoord = p0.TexCoord * w0 + p1.TexCoord * w1 + p2.TexCoord * w2;
|
||||
output.LightmapUV = p0.LightmapUV * w0 + p1.LightmapUV * w1 + p2.LightmapUV * w2;
|
||||
output.TexCoords01 = p0.TexCoords01 * w0 + p1.TexCoords01 * w1 + p2.TexCoords01 * w2;
|
||||
output.TexCoords23 = p0.TexCoords23 * w0 + p1.TexCoords23 * w1 + p2.TexCoords23 * w2;
|
||||
#if USE_VERTEX_COLOR
|
||||
output.VertexColor = p0.VertexColor * w0 + p1.VertexColor * w1 + p2.VertexColor * w2;
|
||||
#endif
|
||||
@@ -223,6 +238,24 @@ float3 GetObjectSize(MaterialInput input)
|
||||
return input.Object.GeometrySize * float3(world._m00, world._m11, world._m22);
|
||||
}
|
||||
|
||||
// Gets the current object scale (supports instancing)
|
||||
float3 GetObjectScale(MaterialInput input)
|
||||
{
|
||||
float4x4 world = input.Object.WorldMatrix;
|
||||
|
||||
// Get the squares of the scale factors
|
||||
float scaleXSquared = dot(world[0].xyz, world[0].xyz);
|
||||
float scaleYSquared = dot(world[1].xyz, world[1].xyz);
|
||||
float scaleZSquared = dot(world[2].xyz, world[2].xyz);
|
||||
|
||||
// Take square root to get actual scales
|
||||
return float3(
|
||||
sqrt(scaleXSquared),
|
||||
sqrt(scaleYSquared),
|
||||
sqrt(scaleZSquared)
|
||||
);
|
||||
}
|
||||
|
||||
// Get the current object random value (supports instancing)
|
||||
float GetPerInstanceRandom(MaterialInput input)
|
||||
{
|
||||
@@ -312,14 +345,15 @@ VertexOutput VS(ModelInput input)
|
||||
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
|
||||
|
||||
// Pass vertex attributes
|
||||
output.Geometry.TexCoord = input.TexCoord;
|
||||
output.Geometry.TexCoords01 = float4(input.TexCoord0, input.TexCoord1);
|
||||
output.Geometry.TexCoords23 = float4(input.TexCoord2, input.TexCoord3);
|
||||
#if USE_VERTEX_COLOR
|
||||
output.Geometry.VertexColor = input.Color;
|
||||
#endif
|
||||
#if CAN_USE_LIGHTMAP
|
||||
output.Geometry.LightmapUV = input.LightmapUV * object.LightmapArea.zw + object.LightmapArea.xy;
|
||||
#else
|
||||
output.Geometry.LightmapUV = input.LightmapUV;
|
||||
output.Geometry.LightmapUV = float2(0, 0);
|
||||
#endif
|
||||
|
||||
// Calculate tanget space to world space transformation matrix for unit vectors
|
||||
@@ -459,7 +493,7 @@ META_VS_IN_ELEMENT(TEXCOORD, 0, R16G16_FLOAT, 0, ALIGN, PER_VERTEX, 0,
|
||||
META_VS_IN_ELEMENT(NORMAL, 0, R10G10B10A2_UNORM, 0, ALIGN, PER_VERTEX, 0, true)
|
||||
META_VS_IN_ELEMENT(TANGENT, 0, R10G10B10A2_UNORM, 0, ALIGN, PER_VERTEX, 0, true)
|
||||
META_VS_IN_ELEMENT(BLENDINDICES, 0, R8G8B8A8_UINT, 0, ALIGN, PER_VERTEX, 0, true)
|
||||
META_VS_IN_ELEMENT(BLENDWEIGHT, 0, R16G16B16A16_FLOAT,0, ALIGN, PER_VERTEX, 0, true)
|
||||
META_VS_IN_ELEMENT(BLENDWEIGHTS, 0, R16G16B16A16_FLOAT,0, ALIGN, PER_VERTEX, 0, true)
|
||||
VertexOutput VS_Skinned(ModelInput_Skinned input)
|
||||
{
|
||||
VertexOutput output;
|
||||
@@ -486,9 +520,10 @@ VertexOutput VS_Skinned(ModelInput_Skinned input)
|
||||
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
|
||||
|
||||
// Pass vertex attributes
|
||||
output.Geometry.TexCoord = input.TexCoord;
|
||||
output.Geometry.TexCoords01 = float4(input.TexCoord0, input.TexCoord1);
|
||||
output.Geometry.TexCoords23 = float4(input.TexCoord2, input.TexCoord3);
|
||||
#if USE_VERTEX_COLOR
|
||||
output.Geometry.VertexColor = float4(0, 0, 0, 1);
|
||||
output.Geometry.VertexColor = input.Color;
|
||||
#endif
|
||||
output.Geometry.LightmapUV = float2(0, 0);
|
||||
|
||||
|
||||
@@ -236,6 +236,12 @@ float3 GetObjectSize(MaterialInput input)
|
||||
return float3(1, 1, 1);
|
||||
}
|
||||
|
||||
// Gets the current object scale (supports instancing)
|
||||
float3 GetObjectScale(MaterialInput input)
|
||||
{
|
||||
return float3(1, 1, 1);
|
||||
}
|
||||
|
||||
// Get the current object random value
|
||||
float GetPerInstanceRandom(MaterialInput input)
|
||||
{
|
||||
@@ -319,8 +325,6 @@ struct TerrainVertexInput
|
||||
|
||||
// Vertex Shader function for terrain rendering
|
||||
META_VS(true, FEATURE_LEVEL_ES2)
|
||||
META_VS_IN_ELEMENT(TEXCOORD, 0, R32G32_FLOAT, 0, ALIGN, PER_VERTEX, 0, true)
|
||||
META_VS_IN_ELEMENT(TEXCOORD, 1, R8G8B8A8_UNORM, 0, ALIGN, PER_VERTEX, 0, true)
|
||||
VertexOutput VS(TerrainVertexInput input)
|
||||
{
|
||||
VertexOutput output;
|
||||
|
||||
BIN
Content/Editor/Particles/Particle Material Color.flax
(Stored with Git LFS)
BIN
Content/Editor/Particles/Particle Material Color.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Particles/Particle Material Preview.flax
(Stored with Git LFS)
BIN
Content/Editor/Particles/Particle Material Preview.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Particles/Smoke Material.flax
(Stored with Git LFS)
BIN
Content/Editor/Particles/Smoke Material.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Primitives/Capsule.flax
(Stored with Git LFS)
BIN
Content/Editor/Primitives/Capsule.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Primitives/Cone.flax
(Stored with Git LFS)
BIN
Content/Editor/Primitives/Cone.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Primitives/Cube.flax
(Stored with Git LFS)
BIN
Content/Editor/Primitives/Cube.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Primitives/Cylinder.flax
(Stored with Git LFS)
BIN
Content/Editor/Primitives/Cylinder.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Primitives/Plane.flax
(Stored with Git LFS)
BIN
Content/Editor/Primitives/Plane.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Primitives/Sphere.flax
(Stored with Git LFS)
BIN
Content/Editor/Primitives/Sphere.flax
(Stored with Git LFS)
Binary file not shown.
25
Content/Editor/Scripting/GamePluginTemplate.cs
Normal file
25
Content/Editor/Scripting/GamePluginTemplate.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
%copyright%using System;
|
||||
using System.Collections.Generic;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace %namespace%;
|
||||
|
||||
/// <summary>
|
||||
/// %class% GamePlugin.
|
||||
/// </summary>
|
||||
public class %class% : GamePlugin
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void Deinitialize()
|
||||
{
|
||||
base.Deinitialize();
|
||||
|
||||
}
|
||||
}
|
||||
BIN
Content/Editor/SpriteMaterial.flax
(Stored with Git LFS)
BIN
Content/Editor/SpriteMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Terrain/Circle Brush Material.flax
(Stored with Git LFS)
BIN
Content/Editor/Terrain/Circle Brush Material.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Terrain/Highlight Terrain Material.flax
(Stored with Git LFS)
BIN
Content/Editor/Terrain/Highlight Terrain Material.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/TexturePreviewMaterial.flax
(Stored with Git LFS)
BIN
Content/Editor/TexturePreviewMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Wires Debug Material.flax
(Stored with Git LFS)
BIN
Content/Editor/Wires Debug Material.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Engine/DefaultDeformableMaterial.flax
(Stored with Git LFS)
BIN
Content/Engine/DefaultDeformableMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Engine/DefaultMaterial.flax
(Stored with Git LFS)
BIN
Content/Engine/DefaultMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Engine/DefaultRadialMenu.flax
(Stored with Git LFS)
BIN
Content/Engine/DefaultRadialMenu.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Engine/DefaultTerrainMaterial.flax
(Stored with Git LFS)
BIN
Content/Engine/DefaultTerrainMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Engine/Models/Box.flax
(Stored with Git LFS)
BIN
Content/Engine/Models/Box.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Engine/Models/Quad.flax
(Stored with Git LFS)
BIN
Content/Engine/Models/Quad.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Engine/Models/SimpleBox.flax
(Stored with Git LFS)
BIN
Content/Engine/Models/SimpleBox.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Engine/Models/Sphere.flax
(Stored with Git LFS)
BIN
Content/Engine/Models/Sphere.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Engine/Models/SphereLowPoly.flax
(Stored with Git LFS)
BIN
Content/Engine/Models/SphereLowPoly.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Engine/SingleColorMaterial.flax
(Stored with Git LFS)
BIN
Content/Engine/SingleColorMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Engine/SkyboxMaterial.flax
(Stored with Git LFS)
BIN
Content/Engine/SkyboxMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Engine/WhiteMaterial.flax
(Stored with Git LFS)
BIN
Content/Engine/WhiteMaterial.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Shaders/BakeLightmap.flax
(Stored with Git LFS)
BIN
Content/Shaders/BakeLightmap.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Shaders/Editor/Grid.flax
(Stored with Git LFS)
BIN
Content/Shaders/Editor/Grid.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Shaders/Editor/LightmapUVsDensity.flax
(Stored with Git LFS)
BIN
Content/Shaders/Editor/LightmapUVsDensity.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Shaders/GI/GlobalSurfaceAtlas.flax
(Stored with Git LFS)
BIN
Content/Shaders/GI/GlobalSurfaceAtlas.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Shaders/PostProcessing.flax
(Stored with Git LFS)
BIN
Content/Shaders/PostProcessing.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Shaders/Quad.flax
(Stored with Git LFS)
BIN
Content/Shaders/Quad.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Shaders/Shadows.flax
(Stored with Git LFS)
BIN
Content/Shaders/Shadows.flax
(Stored with Git LFS)
Binary file not shown.
@@ -2,9 +2,9 @@
|
||||
"Name": "Flax",
|
||||
"Version": {
|
||||
"Major": 1,
|
||||
"Minor": 9,
|
||||
"Minor": 10,
|
||||
"Revision": 0,
|
||||
"Build": 6606
|
||||
"Build": 6702
|
||||
},
|
||||
"Company": "Flax",
|
||||
"Copyright": "Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.",
|
||||
@@ -13,6 +13,7 @@
|
||||
"Configuration": {
|
||||
"UseCSharp": true,
|
||||
"UseLargeWorlds": false,
|
||||
"UseDotNet": true
|
||||
"UseDotNet": true,
|
||||
"UseSDL": true
|
||||
}
|
||||
}
|
||||
@@ -237,6 +237,7 @@
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/GrammarAndSpelling/GrammarChecking/Exceptions/=Try_0020to_0020scripting/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:String x:Key="/Default/GrammarAndSpelling/GrammarChecking/RulesStates/=LanguageTool_002EEN_002EE_005FG/@EntryIndexedValue">DisabledByUser</s:String>
|
||||
<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=EEA05B0ED8200E4BA9D2D3F1052EBFFD/@KeyIndexDefined">True</s:Boolean>
|
||||
<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=EEA05B0ED8200E4BA9D2D3F1052EBFFD/Color/@EntryValue">Blue</s:String>
|
||||
|
||||
@@ -31,7 +31,7 @@ Follow the instructions below to compile and run the engine from source.
|
||||
* Install Visual Studio 2022 or newer
|
||||
* 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 .NET 8 SDK for **Windows x64** (via Visual Studio Installer or [from web](https://dotnet.microsoft.com/en-us/download/dotnet/8.0))
|
||||
* Install .NET 8 or 9 SDK for **Windows x64** (via Visual Studio Installer or [from web](https://dotnet.microsoft.com/en-us/download/dotnet/8.0))
|
||||
* Install Git with LFS
|
||||
* Clone repo (with LFS)
|
||||
* Run **GenerateProjectFiles.bat**
|
||||
@@ -44,8 +44,9 @@ Follow the instructions below to compile and run the engine from source.
|
||||
## Linux
|
||||
|
||||
* Install Visual Studio Code
|
||||
* Install .NET 8 SDK ([https://dotnet.microsoft.com/en-us/download/dotnet/8.0](https://dotnet.microsoft.com/en-us/download/dotnet/8.0))
|
||||
* Install .NET 8 or 9 SDK ([https://dotnet.microsoft.com/en-us/download/dotnet/8.0](https://dotnet.microsoft.com/en-us/download/dotnet/8.0))
|
||||
* Ubuntu: `sudo apt install dotnet-sdk-8.0`
|
||||
* Arch: `sudo pacman -S dotnet-sdk-8.0 dotnet-runtime-8.0 dotnet-targeting-pack-8.0 dotnet-host`
|
||||
* Install Vulkan SDK ([https://vulkan.lunarg.com/](https://vulkan.lunarg.com/))
|
||||
* Ubuntu: `sudo apt install vulkan-sdk`
|
||||
* Arch: `sudo pacman -S spirv-tools vulkan-headers vulkan-tools vulkan-validation-layers`
|
||||
@@ -67,12 +68,12 @@ Follow the instructions below to compile and run the engine from source.
|
||||
## Mac
|
||||
|
||||
* Install XCode
|
||||
* Install .NET 8 SDK ([https://dotnet.microsoft.com/en-us/download/dotnet/8.0](https://dotnet.microsoft.com/en-us/download/dotnet/8.0))
|
||||
* Install .NET 8 or 9 SDK ([https://dotnet.microsoft.com/en-us/download/dotnet/8.0](https://dotnet.microsoft.com/en-us/download/dotnet/8.0))
|
||||
* Install Vulkan SDK ([https://vulkan.lunarg.com/](https://vulkan.lunarg.com/))
|
||||
* Clone repo (with LFS)
|
||||
* Run `GenerateProjectFiles.command`
|
||||
* Open workspace with XCode or Visual Studio Code
|
||||
* Build and run (configuration `Editor.Mac.Development`)
|
||||
* Build and run (configuration `Editor.Mac.Development`)
|
||||
|
||||
#### Troubleshooting
|
||||
|
||||
|
||||
@@ -750,7 +750,8 @@ namespace FlaxEditor.Content
|
||||
|
||||
// Draw short name
|
||||
Render2D.PushClip(ref textRect);
|
||||
Render2D.DrawText(style.FontMedium, ShowFileExtension || view.ShowFileExtensions ? FileName : ShortName, textRect, style.Foreground, nameAlignment, TextAlignment.Center, TextWrapping.WrapWords, 1f, 0.95f);
|
||||
var scale = 0.95f * view.ViewScale;
|
||||
Render2D.DrawText(style.FontMedium, ShowFileExtension || view.ShowFileExtensions ? FileName : ShortName, textRect, style.Foreground, nameAlignment, TextAlignment.Center, TextWrapping.WrapWords, 1f, scale);
|
||||
Render2D.PopClip();
|
||||
|
||||
if (IsBeingCut)
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace FlaxEditor.Content
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string TypeDescription => Path.EndsWith(".h") ? "C++ Header File" : "C++ Source Code";
|
||||
public override string TypeDescription => Path.EndsWith(".h") || Path.EndsWith(".hpp") ? "C++ Header File" : "C++ Source Code";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.CPPScript128;
|
||||
|
||||
@@ -106,6 +106,23 @@ namespace FlaxEditor.Content
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Context proxy object for C# GamePlugin files.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEditor.Content.CSharpProxy" />
|
||||
[ContentContextMenu("New/C#/C# GamePlugin")]
|
||||
public class CSharpGamePluginProxy : CSharpProxy
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override string Name => "C# GamePlugin";
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void GetTemplatePath(out string path)
|
||||
{
|
||||
path = StringUtils.CombinePaths(Globals.EngineContentFolder, "Editor/Scripting/GamePluginTemplate.cs");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Context proxy object for empty C# files.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using FlaxEditor.Content.Create;
|
||||
using FlaxEditor.CustomEditors;
|
||||
using FlaxEditor.CustomEditors.Editors;
|
||||
using FlaxEditor.Scripting;
|
||||
using FlaxEditor.Windows;
|
||||
using FlaxEditor.Windows.Assets;
|
||||
using FlaxEngine;
|
||||
@@ -84,18 +86,67 @@ namespace FlaxEditor.Content
|
||||
|
||||
if (_element != null)
|
||||
{
|
||||
// Define the rule for the types that can be used to create a json data asset
|
||||
_element.CustomControl.CheckValid += type =>
|
||||
type.Type != null &&
|
||||
type.IsClass &&
|
||||
type.Type.IsVisible &&
|
||||
!type.IsAbstract &&
|
||||
!type.IsGenericType &&
|
||||
type.Type.GetConstructor(Type.EmptyTypes) != null &&
|
||||
!typeof(FlaxEngine.GUI.Control).IsAssignableFrom(type.Type) &&
|
||||
!typeof(FlaxEngine.Object).IsAssignableFrom(type.Type);
|
||||
_element.CustomControl.CheckValid += OnCheckValidJsonAssetType;
|
||||
}
|
||||
}
|
||||
|
||||
private static Type[] BlacklistedClasses =
|
||||
[
|
||||
typeof(System.Attribute),
|
||||
typeof(FlaxEngine.Object),
|
||||
typeof(FlaxEngine.GUI.Control),
|
||||
];
|
||||
|
||||
private static Type[] BlacklistedStructs =
|
||||
[
|
||||
typeof(Float2),
|
||||
typeof(Float3),
|
||||
typeof(Float4),
|
||||
typeof(Double2),
|
||||
typeof(Double3),
|
||||
typeof(Double4),
|
||||
typeof(Vector2),
|
||||
typeof(Vector3),
|
||||
typeof(Vector4),
|
||||
typeof(Half2),
|
||||
typeof(Half3),
|
||||
typeof(Half4),
|
||||
typeof(Int2),
|
||||
typeof(Int3),
|
||||
typeof(Int4),
|
||||
typeof(Transform),
|
||||
typeof(Quaternion),
|
||||
typeof(BoundingBox),
|
||||
typeof(BoundingSphere),
|
||||
typeof(BoundingFrustum),
|
||||
typeof(Ray),
|
||||
typeof(Plane),
|
||||
typeof(Matrix),
|
||||
typeof(Color),
|
||||
typeof(Color32),
|
||||
typeof(FloatR11G11B10),
|
||||
typeof(FloatR10G10B10A2),
|
||||
typeof(FlaxEngine.Half),
|
||||
];
|
||||
|
||||
private static bool OnCheckValidJsonAssetType(ScriptType type)
|
||||
{
|
||||
// Define the rule for the types that can be used to create a json data asset
|
||||
var mType = type.Type;
|
||||
if (mType == null ||
|
||||
type.IsAbstract ||
|
||||
type.IsStatic ||
|
||||
type.IsGenericType ||
|
||||
!mType.IsVisible)
|
||||
return false;
|
||||
if (type.IsClass)
|
||||
return mType.GetConstructor(Type.EmptyTypes) != null && BlacklistedClasses.FirstOrDefault(x => x.IsAssignableFrom(mType)) == null;
|
||||
if (type.IsStructure)
|
||||
return !type.IsPrimitive &&
|
||||
!type.IsVoid &&
|
||||
!BlacklistedStructs.Contains(mType);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,7 +226,7 @@ namespace FlaxEditor.Content
|
||||
{
|
||||
_thumbnail = SpriteHandle.Invalid;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Constructor with overriden thumbnail.
|
||||
/// </summary>
|
||||
@@ -196,7 +247,7 @@ namespace FlaxEditor.Content
|
||||
{
|
||||
Editor.SaveJsonAsset(outputPath, new T());
|
||||
}
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
public override AssetItem ConstructItem(string path, string typeName, ref Guid id)
|
||||
{
|
||||
|
||||
@@ -496,7 +496,7 @@ namespace FlaxEditor.Content.Thumbnails
|
||||
// Prepare requests
|
||||
bool isAnyReady = false;
|
||||
int checks = Mathf.Min(10, _requests.Count);
|
||||
for (int i = 0; i < checks; i++)
|
||||
for (int i = 0; i < checks && i < _requests.Count; i++)
|
||||
{
|
||||
var request = _requests[i];
|
||||
try
|
||||
|
||||
@@ -671,11 +671,14 @@ bool GameCookerImpl::Build()
|
||||
MCore::Thread::Attach();
|
||||
|
||||
// Build Started
|
||||
CallEvent(GameCooker::EventType::BuildStarted);
|
||||
data.Tools->OnBuildStarted(data);
|
||||
for (int32 stepIndex = 0; stepIndex < Steps.Count(); stepIndex++)
|
||||
Steps[stepIndex]->OnBuildStarted(data);
|
||||
data.InitProgress(Steps.Count());
|
||||
if (!EnumHasAnyFlags(data.Options, BuildOptions::NoCook))
|
||||
{
|
||||
CallEvent(GameCooker::EventType::BuildStarted);
|
||||
data.Tools->OnBuildStarted(data);
|
||||
for (int32 stepIndex = 0; stepIndex < Steps.Count(); stepIndex++)
|
||||
Steps[stepIndex]->OnBuildStarted(data);
|
||||
data.InitProgress(Steps.Count());
|
||||
}
|
||||
|
||||
// Execute all steps in a sequence
|
||||
bool failed = false;
|
||||
@@ -741,10 +744,13 @@ bool GameCookerImpl::Build()
|
||||
}
|
||||
IsRunning = false;
|
||||
CancelFlag = 0;
|
||||
for (int32 stepIndex = 0; stepIndex < Steps.Count(); stepIndex++)
|
||||
Steps[stepIndex]->OnBuildEnded(data, failed);
|
||||
data.Tools->OnBuildEnded(data, failed);
|
||||
CallEvent(failed ? GameCooker::EventType::BuildFailed : GameCooker::EventType::BuildDone);
|
||||
if (!EnumHasAnyFlags(data.Options, BuildOptions::NoCook))
|
||||
{
|
||||
for (int32 stepIndex = 0; stepIndex < Steps.Count(); stepIndex++)
|
||||
Steps[stepIndex]->OnBuildEnded(data, failed);
|
||||
data.Tools->OnBuildEnded(data, failed);
|
||||
CallEvent(failed ? GameCooker::EventType::BuildFailed : GameCooker::EventType::BuildDone);
|
||||
}
|
||||
Delete(Data);
|
||||
Data = nullptr;
|
||||
|
||||
|
||||
@@ -364,6 +364,33 @@ bool AndroidPlatformTools::OnPostProcess(CookingData& data)
|
||||
}
|
||||
#endif
|
||||
const bool distributionPackage = buildSettings->ForDistribution || data.Configuration == BuildConfiguration::Release;
|
||||
|
||||
if (platformSettings->BuildAAB)
|
||||
{
|
||||
// .aab
|
||||
{
|
||||
CreateProcessSettings procSettings;
|
||||
procSettings.FileName = String::Format(TEXT("\"{0}\" {1}"), data.OriginalOutputPath / gradlew, distributionPackage ? TEXT(":app:bundle") : TEXT(":app:bundleDebug"));
|
||||
procSettings.WorkingDirectory = data.OriginalOutputPath;
|
||||
const int32 result = Platform::CreateProcess(procSettings);
|
||||
if (result != 0)
|
||||
{
|
||||
data.Error(String::Format(TEXT("Failed to build Gradle project into .aab package (result code: {0}). See log for more info."), result));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// Copy result package
|
||||
const String aab = data.OriginalOutputPath / (distributionPackage ? TEXT("app/build/outputs/bundle/release/app-release.aab") : TEXT("app/build/outputs/bundle/debug/app-debug.aab"));
|
||||
const String outputAab = data.OriginalOutputPath / EditorUtilities::GetOutputName() + TEXT(".aab");
|
||||
if (FileSystem::CopyFile(outputAab, aab))
|
||||
{
|
||||
LOG(Error, "Failed to copy .aab package from {0} to {1}", aab, outputAab);
|
||||
return true;
|
||||
}
|
||||
LOG(Info, "Output Android AAB application package: {0} (size: {1} MB)", outputAab, FileSystem::GetFileSize(outputAab) / 1024 / 1024);
|
||||
}
|
||||
|
||||
// .apk
|
||||
{
|
||||
CreateProcessSettings procSettings;
|
||||
procSettings.FileName = String::Format(TEXT("\"{0}\" {1}"), data.OriginalOutputPath / gradlew, distributionPackage ? TEXT("assemble") : TEXT("assembleDebug"));
|
||||
@@ -371,20 +398,20 @@ bool AndroidPlatformTools::OnPostProcess(CookingData& data)
|
||||
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));
|
||||
data.Error(String::Format(TEXT("Failed to build Gradle project into .apk package (result code: {0}). See log for more info."), result));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Copy result package
|
||||
const String apk = data.OriginalOutputPath / (distributionPackage ? TEXT("app/build/outputs/apk/release/app-release-unsigned.apk") : TEXT("app/build/outputs/apk/debug/app-debug.apk"));
|
||||
const String outputApk = data.OriginalOutputPath / EditorUtilities::GetOutputName() + TEXT(".apk");
|
||||
if (FileSystem::CopyFile(outputApk, apk))
|
||||
{
|
||||
LOG(Error, "Failed to copy package from {0} to {1}", apk, outputApk);
|
||||
LOG(Error, "Failed to copy .apk package from {0} to {1}", apk, outputApk);
|
||||
return true;
|
||||
}
|
||||
LOG(Info, "Output Android application package: {0} (size: {1} MB)", outputApk, FileSystem::GetFileSize(outputApk) / 1024 / 1024);
|
||||
LOG(Info, "Output Android APK application package: {0} (size: {1} MB)", outputApk, FileSystem::GetFileSize(outputApk) / 1024 / 1024);
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "Engine/Core/Math/Color32.h"
|
||||
#include "Engine/Core/Config/GameSettings.h"
|
||||
#include "Editor/Utilities/EditorUtilities.h"
|
||||
#include "Engine/Graphics/PixelFormatSampler.h"
|
||||
#include "Engine/Graphics/Textures/TextureData.h"
|
||||
#include "Engine/Tools/TextureTool/TextureTool.h"
|
||||
#include "Engine/Content/Content.h"
|
||||
@@ -240,7 +241,7 @@ void UpdateIconData(uint8* iconData, const TextureData* icon)
|
||||
const TextureMipData* srcPixels = icon->GetData(0, srcPixelsMip);
|
||||
const Color32* srcPixelsData = (Color32*)srcPixels->Data.Get();
|
||||
const Int2 srcPixelsSize(Math::Max(1, icon->Width >> srcPixelsMip), Math::Max(1, icon->Height >> srcPixelsMip));
|
||||
const auto sampler = TextureTool::GetSampler(icon->Format);
|
||||
const auto sampler = PixelFormatSampler::Get(icon->Format);
|
||||
ASSERT_LOW_LAYER(sampler);
|
||||
|
||||
// Write colors
|
||||
@@ -252,7 +253,7 @@ void UpdateIconData(uint8* iconData, const TextureData* icon)
|
||||
for (uint32 x = 0; x < width; x++)
|
||||
{
|
||||
float u = (float)x / width;
|
||||
const Color c = TextureTool::SampleLinear(sampler, Float2(u, v), srcPixelsData, srcPixelsSize, srcPixels->RowPitch);
|
||||
const Color c = sampler->SampleLinear(srcPixelsData, Float2(u, v), srcPixelsSize, srcPixels->RowPitch);
|
||||
colorData[idx++] = Color32(c).GetAsBGRA();
|
||||
}
|
||||
}
|
||||
@@ -271,7 +272,7 @@ void UpdateIconData(uint8* iconData, const TextureData* icon)
|
||||
{
|
||||
uint32 x = packedX * 8 + pixelIdx;
|
||||
float u = (float)x / width;
|
||||
const Color c = TextureTool::SampleLinear(sampler, Float2(u, v), srcPixelsData, srcPixelsSize, srcPixels->RowPitch);
|
||||
const Color c = sampler->SampleLinear(srcPixelsData, Float2(u, v), srcPixelsSize, srcPixels->RowPitch);
|
||||
if (c.A < 0.25f)
|
||||
mask |= 1 << (7 - pixelIdx);
|
||||
}
|
||||
@@ -322,7 +323,7 @@ bool UpdateExeIcon(const String& path, const TextureData& icon)
|
||||
const TextureData* iconRGBA8 = &icon;
|
||||
TextureData tmpData1;
|
||||
//if (icon.Format != PixelFormat::R8G8B8A8_UNorm)
|
||||
if (TextureTool::GetSampler(icon.Format) == nullptr)
|
||||
if (PixelFormatSampler::Get(icon.Format) == nullptr)
|
||||
{
|
||||
if (TextureTool::Convert(tmpData1, *iconRGBA8, PixelFormat::R8G8B8A8_UNorm))
|
||||
{
|
||||
|
||||
@@ -137,10 +137,7 @@ void CookAssetsStep::CacheData::Load(CookingData& data)
|
||||
if (!FileSystem::DirectoryExists(CacheFolder))
|
||||
FileSystem::CreateDirectory(CacheFolder);
|
||||
if (!FileSystem::FileExists(HeaderFilePath))
|
||||
{
|
||||
LOG(Warning, "Missing incremental build cooking assets cache.");
|
||||
return;
|
||||
}
|
||||
|
||||
auto file = FileReadStream::Open(HeaderFilePath);
|
||||
if (file == nullptr)
|
||||
@@ -158,7 +155,7 @@ void CookAssetsStep::CacheData::Load(CookingData& data)
|
||||
|
||||
LOG(Info, "Loading incremental build cooking cache (entries count: {0})", entriesCount);
|
||||
file->ReadBytes(&Settings, sizeof(Settings));
|
||||
Entries.EnsureCapacity(Math::RoundUpToPowerOf2(static_cast<int32>(entriesCount * 3.0f)));
|
||||
Entries.EnsureCapacity(entriesCount);
|
||||
|
||||
Array<Pair<String, DateTime>> fileDependencies;
|
||||
for (int32 i = 0; i < entriesCount; i++)
|
||||
@@ -166,7 +163,7 @@ void CookAssetsStep::CacheData::Load(CookingData& data)
|
||||
Guid id;
|
||||
file->Read(id);
|
||||
String typeName;
|
||||
file->ReadString(&typeName);
|
||||
file->Read(typeName);
|
||||
DateTime fileModified;
|
||||
file->Read(fileModified);
|
||||
int32 fileDependenciesCount;
|
||||
@@ -176,7 +173,7 @@ void CookAssetsStep::CacheData::Load(CookingData& data)
|
||||
for (int32 j = 0; j < fileDependenciesCount; j++)
|
||||
{
|
||||
Pair<String, DateTime>& f = fileDependencies[j];
|
||||
file->ReadString(&f.First, 10);
|
||||
file->Read(f.First, 10);
|
||||
file->Read(f.Second);
|
||||
}
|
||||
|
||||
@@ -311,9 +308,9 @@ void CookAssetsStep::CacheData::Save(CookingData& data)
|
||||
{
|
||||
auto& e = i->Value;
|
||||
file->Write(e.ID);
|
||||
file->WriteString(e.TypeName);
|
||||
file->Write(e.TypeName);
|
||||
file->Write(e.FileModified);
|
||||
file->WriteInt32(e.FileDependencies.Count());
|
||||
file->Write(e.FileDependencies.Count());
|
||||
for (auto& f : e.FileDependencies)
|
||||
{
|
||||
file->Write(f.First, 10);
|
||||
@@ -365,17 +362,27 @@ bool CookAssetsStep::ProcessDefaultAsset(AssetCookData& options)
|
||||
|
||||
bool CookAssetsStep::Process(CookingData& data, CacheData& cache, Asset* asset)
|
||||
{
|
||||
// Validate asset
|
||||
PROFILE_CPU_ASSET(asset);
|
||||
if (asset->IsVirtual())
|
||||
{
|
||||
// Virtual assets are not included into the build
|
||||
return false;
|
||||
}
|
||||
const bool wasLoaded = asset->IsLoaded();
|
||||
if (asset->WaitForLoaded())
|
||||
{
|
||||
LOG(Error, "Failed to load asset \'{0}\'", asset->ToString());
|
||||
return true;
|
||||
}
|
||||
if (!wasLoaded)
|
||||
{
|
||||
// HACK: give some time to resave any old assets in Asset::onLoad after it's loaded
|
||||
// This assumes that if Load Thread enters Asset::Save then it will get asset lock and hold it until asset is saved
|
||||
// So we can take the same lock to wait for save end but first we need to wait for it to get that lock
|
||||
// (in future try to handle it in a better way)
|
||||
Platform::Sleep(5);
|
||||
}
|
||||
ScopeLock lock(asset->Locker);
|
||||
|
||||
// Switch based on an asset type
|
||||
const auto asBinaryAsset = dynamic_cast<BinaryAsset*>(asset);
|
||||
@@ -793,7 +800,10 @@ bool CookAssetsStep::Process(CookingData& data, CacheData& cache, BinaryAsset* a
|
||||
// Prepare asset data
|
||||
AssetInitData initData;
|
||||
if (asset->Storage->LoadAssetHeader(asset->GetID(), initData))
|
||||
{
|
||||
LOG(Warning, "Failed to load asset {} header from storage '{}'", asset->GetID(), asset->Storage->GetPath());
|
||||
return true;
|
||||
}
|
||||
initData.Header.UnlinkChunks();
|
||||
initData.Metadata.Release();
|
||||
for (auto& e : initData.Dependencies)
|
||||
@@ -1165,7 +1175,7 @@ bool CookAssetsStep::Perform(CookingData& data)
|
||||
assetRef = Content::LoadAsync<Asset>(assetId);
|
||||
if (assetRef == nullptr)
|
||||
{
|
||||
data.Error(TEXT("Failed to load asset included in build."));
|
||||
LOG(Error, "Failed to load asset {} included in build", assetId);
|
||||
return true;
|
||||
}
|
||||
e.Info.TypeName = assetRef->GetTypeName();
|
||||
@@ -1173,6 +1183,7 @@ bool CookAssetsStep::Perform(CookingData& data)
|
||||
// Cook asset
|
||||
if (Process(data, cache, assetRef.Get()))
|
||||
{
|
||||
LOG(Error, "Failed to process asset {}", assetRef->ToString());
|
||||
cache.Save(data);
|
||||
return true;
|
||||
}
|
||||
@@ -1205,10 +1216,17 @@ bool CookAssetsStep::Perform(CookingData& data)
|
||||
// Copy file
|
||||
if (!FileSystem::FileExists(cookedPath) || FileSystem::GetFileLastEditTime(cookedPath) >= FileSystem::GetFileLastEditTime(filePath))
|
||||
{
|
||||
if (FileSystem::CreateDirectory(StringUtils::GetDirectoryName(cookedPath)))
|
||||
const String cookedFolder = StringUtils::GetDirectoryName(cookedPath);
|
||||
if (FileSystem::CreateDirectory(cookedFolder))
|
||||
{
|
||||
LOG(Error, "Failed to create directory '{}'", cookedFolder);
|
||||
return true;
|
||||
}
|
||||
if (FileSystem::CopyFile(cookedPath, filePath))
|
||||
{
|
||||
LOG(Error, "Failed to copy file from '{}' to '{}'", filePath, cookedPath);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Count stats of file extension
|
||||
@@ -1249,7 +1267,7 @@ bool CookAssetsStep::Perform(CookingData& data)
|
||||
*(int32*)(bytes.Get() + 804) = contentKey;
|
||||
*(Guid*)(bytes.Get() + 808) = gameSettings->SplashScreen;
|
||||
Encryption::EncryptBytes(bytes.Get(), bytes.Count());
|
||||
stream->WriteArray(bytes);
|
||||
stream->Write(bytes);
|
||||
|
||||
Delete(stream);
|
||||
}
|
||||
|
||||
@@ -213,11 +213,59 @@ bool DeployDataStep::Perform(CookingData& data)
|
||||
}
|
||||
FileSystem::NormalizePath(srcDotnet);
|
||||
LOG(Info, "Using .NET Runtime {} at {}", TEXT("Host"), srcDotnet);
|
||||
const bool srcDotnetFromEngine = srcDotnet.Contains(TEXT("Source/Platforms"));
|
||||
String packFolder = srcDotnet / TEXT("../../../");
|
||||
|
||||
// Get .NET runtime version
|
||||
String version;
|
||||
{
|
||||
// Detect from path provided by build tool
|
||||
Array<String> pathParts;
|
||||
srcDotnet.Split('/', pathParts);
|
||||
for (int32 i = 1; i < pathParts.Count(); i++)
|
||||
{
|
||||
if (pathParts[i] == TEXT("runtimes"))
|
||||
{
|
||||
Array<String> versionParts;
|
||||
pathParts[i - 1].Split('.', versionParts);
|
||||
if (!versionParts.IsEmpty())
|
||||
{
|
||||
const String majorVersion = versionParts[0].TrimTrailing();
|
||||
int32 versionNum;
|
||||
StringUtils::Parse(*majorVersion, majorVersion.Length(), &versionNum);
|
||||
if (Math::IsInRange(versionNum, GAME_BUILD_DOTNET_RUNTIME_MIN_VER, GAME_BUILD_DOTNET_RUNTIME_MAX_VER)) // Check for major part
|
||||
version = majorVersion;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (version.IsEmpty())
|
||||
{
|
||||
if (srcDotnetFromEngine)
|
||||
{
|
||||
// Detect version from runtime files inside Engine Platform folder
|
||||
for (int32 i = GAME_BUILD_DOTNET_RUNTIME_MAX_VER; i >= GAME_BUILD_DOTNET_RUNTIME_MIN_VER; i--)
|
||||
{
|
||||
// Check runtime files inside Engine Platform folder
|
||||
String testPath1 = srcDotnet / String::Format(TEXT("lib/net{}.0"), i);
|
||||
String testPath2 = packFolder / String::Format(TEXT("Dotnet/lib/net{}.0"), i);
|
||||
if ((FileSystem::DirectoryExists(testPath1) && FileSystem::GetDirectorySize(testPath1) > 0) ||
|
||||
(FileSystem::DirectoryExists(testPath2) && FileSystem::GetDirectorySize(testPath2) > 0))
|
||||
{
|
||||
version = StringUtils::ToString(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (version.IsEmpty())
|
||||
{
|
||||
data.Error(TEXT("Failed to find supported .NET version for the current host platform."));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Deploy runtime files
|
||||
const Char* corlibPrivateName = TEXT("System.Private.CoreLib.dll");
|
||||
const bool srcDotnetFromEngine = srcDotnet.Contains(TEXT("Source/Platforms"));
|
||||
String packFolder = srcDotnet / TEXT("../../../");
|
||||
String dstDotnetLibs = dstDotnet, srcDotnetLibs = srcDotnet;
|
||||
StringUtils::PathRemoveRelativeParts(packFolder);
|
||||
if (usAOT)
|
||||
@@ -226,14 +274,14 @@ bool DeployDataStep::Perform(CookingData& data)
|
||||
{
|
||||
// AOT runtime files inside Engine Platform folder
|
||||
packFolder /= TEXT("Dotnet");
|
||||
dstDotnetLibs /= TEXT("lib/net8.0");
|
||||
srcDotnetLibs = packFolder / TEXT("lib/net8.0");
|
||||
dstDotnetLibs /= String::Format(TEXT("lib/net{}.0"), version);
|
||||
srcDotnetLibs = packFolder / String::Format(TEXT("lib/net{}.0"), version);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Runtime files inside Dotnet SDK folder but placed for AOT
|
||||
dstDotnetLibs /= TEXT("lib/net8.0");
|
||||
srcDotnetLibs /= TEXT("../lib/net8.0");
|
||||
dstDotnetLibs /= String::Format(TEXT("lib/net{}.0"), version);
|
||||
srcDotnetLibs /= String::Format(TEXT("../lib/net{}.0"), version);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -241,14 +289,14 @@ bool DeployDataStep::Perform(CookingData& data)
|
||||
if (srcDotnetFromEngine)
|
||||
{
|
||||
// Runtime files inside Engine Platform folder
|
||||
dstDotnetLibs /= TEXT("lib/net8.0");
|
||||
srcDotnetLibs /= TEXT("lib/net8.0");
|
||||
dstDotnetLibs /= String::Format(TEXT("lib/net{}.0"), version);
|
||||
srcDotnetLibs /= String::Format(TEXT("lib/net{}.0"), version);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Runtime files inside Dotnet SDK folder
|
||||
dstDotnetLibs /= TEXT("shared/Microsoft.NETCore.App");
|
||||
srcDotnetLibs /= TEXT("../lib/net8.0");
|
||||
srcDotnetLibs /= String::Format(TEXT("../lib/net{}.0"), version);
|
||||
}
|
||||
}
|
||||
LOG(Info, "Copying .NET files from {} to {}", packFolder, dstDotnet);
|
||||
@@ -273,6 +321,7 @@ bool DeployDataStep::Perform(CookingData& data)
|
||||
DEPLOY_NATIVE_FILE("libmonosgen-2.0.so");
|
||||
DEPLOY_NATIVE_FILE("libSystem.IO.Compression.Native.so");
|
||||
DEPLOY_NATIVE_FILE("libSystem.Native.so");
|
||||
DEPLOY_NATIVE_FILE("libSystem.Globalization.Native.so");
|
||||
DEPLOY_NATIVE_FILE("libSystem.Security.Cryptography.Native.Android.so");
|
||||
break;
|
||||
case BuildPlatform::iOSARM64:
|
||||
|
||||
@@ -883,7 +883,7 @@ namespace FlaxEditor.CustomEditors
|
||||
/// </summary>
|
||||
protected virtual void ClearToken()
|
||||
{
|
||||
ParentEditor.ClearToken();
|
||||
ParentEditor?.ClearToken();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,14 +39,9 @@ CustomEditorsUtilService CustomEditorsUtilServiceInstance;
|
||||
|
||||
struct Entry
|
||||
{
|
||||
MClass* DefaultEditor;
|
||||
MClass* CustomEditor;
|
||||
|
||||
Entry()
|
||||
{
|
||||
DefaultEditor = nullptr;
|
||||
CustomEditor = nullptr;
|
||||
}
|
||||
MClass* DefaultEditor = nullptr;
|
||||
MClass* CustomEditor = nullptr;
|
||||
MType* CustomEditorType = nullptr;
|
||||
};
|
||||
|
||||
Dictionary<MType*, Entry> Cache(512);
|
||||
@@ -63,11 +58,11 @@ MTypeObject* CustomEditorsUtil::GetCustomEditor(MTypeObject* refType)
|
||||
Entry result;
|
||||
if (Cache.TryGet(type, result))
|
||||
{
|
||||
if (result.CustomEditorType)
|
||||
return INTERNAL_TYPE_GET_OBJECT(result.CustomEditorType);
|
||||
MClass* editor = result.CustomEditor ? result.CustomEditor : result.DefaultEditor;
|
||||
if (editor)
|
||||
{
|
||||
return MUtils::GetType(editor);
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
@@ -157,7 +152,7 @@ void OnAssemblyLoaded(MAssembly* assembly)
|
||||
else if (typeClass)
|
||||
{
|
||||
auto& entry = Cache[mclass->GetType()];
|
||||
entry.CustomEditor = typeClass;
|
||||
entry.CustomEditorType = type;
|
||||
|
||||
//LOG(Info, "Custom Editor {0} for type {1}", String(typeClass->GetFullName()), String(mclass->GetFullName()));
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ using FlaxEditor.CustomEditors.Elements;
|
||||
using FlaxEditor.GUI;
|
||||
using FlaxEditor.GUI.ContextMenu;
|
||||
using FlaxEditor.GUI.Tree;
|
||||
using FlaxEditor.Modules;
|
||||
using FlaxEditor.Scripting;
|
||||
using FlaxEditor.Windows;
|
||||
using FlaxEditor.Windows.Assets;
|
||||
@@ -67,12 +68,15 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
// Use default prefab instance as a reference for the editor
|
||||
Values.SetReferenceValue(prefabInstance);
|
||||
|
||||
if (Presenter == Editor.Instance.Windows.PropertiesWin.Presenter)
|
||||
// Display prefab UI (when displaying object inside Prefab Window then display only nested prefabs)
|
||||
prefab.GetNestedObject(ref prefabObjectId, out var nestedPrefabId, out var nestedPrefabObjectId);
|
||||
var nestedPrefab = FlaxEngine.Content.Load<Prefab>(nestedPrefabId);
|
||||
var panel = layout.CustomContainer<UniformGridPanel>();
|
||||
panel.CustomControl.Height = 20.0f;
|
||||
panel.CustomControl.SlotsVertically = 1;
|
||||
if (Presenter == Editor.Instance.Windows.PropertiesWin.Presenter || nestedPrefab)
|
||||
{
|
||||
// Add some UI
|
||||
var panel = layout.CustomContainer<UniformGridPanel>();
|
||||
panel.CustomControl.Height = 20.0f;
|
||||
panel.CustomControl.SlotsVertically = 1;
|
||||
var targetPrefab = nestedPrefab ?? prefab;
|
||||
panel.CustomControl.SlotsHorizontally = 3;
|
||||
|
||||
// Selecting actor prefab asset
|
||||
@@ -80,22 +84,21 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
selectPrefab.Button.Clicked += () =>
|
||||
{
|
||||
Editor.Instance.Windows.ContentWin.ClearItemsSearch();
|
||||
Editor.Instance.Windows.ContentWin.Select(prefab);
|
||||
Editor.Instance.Windows.ContentWin.Select(targetPrefab);
|
||||
};
|
||||
|
||||
// Edit selected prefab asset
|
||||
var editPrefab = panel.Button("Edit Prefab");
|
||||
editPrefab.Button.Clicked += () =>
|
||||
{
|
||||
Editor.Instance.Windows.ContentWin.ClearItemsSearch();
|
||||
Editor.Instance.Windows.ContentWin.Select(prefab);
|
||||
Editor.Instance.Windows.ContentWin.Open(Editor.Instance.Windows.ContentWin.View.Selection[0]);
|
||||
};
|
||||
|
||||
// Viewing changes applied to this actor
|
||||
var viewChanges = panel.Button("View Changes");
|
||||
viewChanges.Button.Clicked += () => ViewChanges(viewChanges.Button, new Float2(0.0f, 20.0f));
|
||||
editPrefab.Button.Clicked += () => Editor.Instance.Windows.ContentWin.Open(Editor.Instance.ContentDatabase.FindAsset(targetPrefab.ID));
|
||||
}
|
||||
else
|
||||
{
|
||||
panel.CustomControl.SlotsHorizontally = 1;
|
||||
}
|
||||
|
||||
// Viewing changes applied to this actor
|
||||
var viewChanges = panel.Button("View Changes");
|
||||
viewChanges.Button.Clicked += () => ViewChanges(viewChanges.Button, new Float2(0.0f, 20.0f));
|
||||
|
||||
// Link event to update editor on prefab apply
|
||||
_linkedPrefabId = prefab.ID;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using FlaxEditor.CustomEditors.Elements;
|
||||
using FlaxEditor.Surface;
|
||||
using FlaxEngine;
|
||||
@@ -35,6 +36,8 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
(instance, parameter, tag) => ((AnimatedModel)instance).GetParameterValue(parameter.Identifier),
|
||||
(instance, value, parameter, tag) => ((AnimatedModel)instance).SetParameterValue(parameter.Identifier, value),
|
||||
Values);
|
||||
if (!parameters.Any())
|
||||
group.Label("No parameters", TextAlignment.Center);
|
||||
_parametersAdded = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,13 +15,23 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
private int _firstTimeShow;
|
||||
private BezierCurveEditor<T> _curve;
|
||||
private Splitter _splitter;
|
||||
private string _heightCachedPath;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void Initialize(LayoutElementsContainer layout)
|
||||
{
|
||||
var item = layout.CustomContainer<BezierCurveEditor<T>>();
|
||||
_curve = item.CustomControl;
|
||||
_curve.Height = 120.0f;
|
||||
var height = 120.0f;
|
||||
var presenter = Presenter;
|
||||
if (presenter != null && (presenter.Features & FeatureFlags.CacheExpandedGroups) != 0)
|
||||
{
|
||||
// Try to restore curve height
|
||||
_heightCachedPath = layout.GetLayoutCachePath("Height");
|
||||
if (Editor.Instance.ProjectCache.TryGetCustomData(_heightCachedPath, out float cachedHeight) && cachedHeight > 10.0f)
|
||||
height = cachedHeight;
|
||||
}
|
||||
_curve.Height = height;
|
||||
_curve.Edited += OnCurveEdited;
|
||||
_firstTimeShow = 4; // For some weird reason it needs several frames of warmup (probably due to sliders smoothing)
|
||||
_splitter = new Splitter
|
||||
@@ -45,7 +55,11 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
|
||||
private void OnSplitterMoved(Float2 location)
|
||||
{
|
||||
_curve.Height = Mathf.Clamp(_splitter.PointToParent(location).Y, 50.0f, 1000.0f);
|
||||
_curve.Height = Mathf.Clamp(_splitter.PointToParent(location).Y, 50.0f, 1000.0f);
|
||||
|
||||
// Cache curve height
|
||||
if (_heightCachedPath != null)
|
||||
Editor.Instance.ProjectCache.SetCustomData(_heightCachedPath, _curve.Height);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -133,13 +147,23 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
private int _firstTimeShow;
|
||||
private LinearCurveEditor<T> _curve;
|
||||
private Splitter _splitter;
|
||||
private string _heightCachedPath;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void Initialize(LayoutElementsContainer layout)
|
||||
{
|
||||
var item = layout.CustomContainer<LinearCurveEditor<T>>();
|
||||
_curve = item.CustomControl;
|
||||
_curve.Height = 120.0f;
|
||||
var height = 120.0f;
|
||||
var presenter = Presenter;
|
||||
if (presenter != null && (presenter.Features & FeatureFlags.CacheExpandedGroups) != 0)
|
||||
{
|
||||
// Try to restore curve height
|
||||
_heightCachedPath = layout.GetLayoutCachePath("Height");
|
||||
if (Editor.Instance.ProjectCache.TryGetCustomData(_heightCachedPath, out float cachedHeight) && cachedHeight > 10.0f)
|
||||
height = cachedHeight;
|
||||
}
|
||||
_curve.Height = height;
|
||||
_curve.Edited += OnCurveEdited;
|
||||
_firstTimeShow = 4; // For some weird reason it needs several frames of warmup (probably due to sliders smoothing)
|
||||
_splitter = new Splitter
|
||||
@@ -164,6 +188,10 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
private void OnSplitterMoved(Float2 location)
|
||||
{
|
||||
_curve.Height = Mathf.Clamp(_splitter.PointToParent(location).Y, 50.0f, 1000.0f);
|
||||
|
||||
// Cache curve height
|
||||
if (_heightCachedPath != null)
|
||||
Editor.Instance.ProjectCache.SetCustomData(_heightCachedPath, _curve.Height);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -186,12 +186,12 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
foreach (var file in files)
|
||||
FindNewKeysCSharp(file, newKeys, allKeys);
|
||||
|
||||
// C++
|
||||
files = Directory.GetFiles(Globals.ProjectSourceFolder, "*.cpp", SearchOption.AllDirectories);
|
||||
// C/C++
|
||||
files = Directory.GetFiles(Globals.ProjectSourceFolder, "*.cpp", SearchOption.AllDirectories).Concat(Directory.GetFiles(Globals.ProjectSourceFolder, "*.c", SearchOption.AllDirectories)).ToArray();
|
||||
filesCount += files.Length;
|
||||
foreach (var file in files)
|
||||
FindNewKeysCpp(file, newKeys, allKeys);
|
||||
files = Directory.GetFiles(Globals.ProjectSourceFolder, "*.h", SearchOption.AllDirectories);
|
||||
files = Directory.GetFiles(Globals.ProjectSourceFolder, "*.h", SearchOption.AllDirectories).Concat(Directory.GetFiles(Globals.ProjectSourceFolder, "*.hpp", SearchOption.AllDirectories)).ToArray();;
|
||||
filesCount += files.Length;
|
||||
foreach (var file in files)
|
||||
FindNewKeysCpp(file, newKeys, allKeys);
|
||||
|
||||
@@ -53,6 +53,9 @@ public class ModelPrefabEditor : GenericEditor
|
||||
}
|
||||
}
|
||||
|
||||
// Creates the import path UI
|
||||
Utilities.Utils.CreateImportPathUI(layout, modelPrefab.ImportPath, false);
|
||||
|
||||
var button = layout.Button("Reimport", "Reimports the source asset as prefab.");
|
||||
_reimportButton = button.Button;
|
||||
_reimportButton.Clicked += OnReimport;
|
||||
|
||||
@@ -117,6 +117,9 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
var data = SurfaceUtils.InitGraphParameters(parametersGroup);
|
||||
SurfaceUtils.DisplayGraphParameters(group, data, ParameterGet, ParameterSet, Values, ParameterDefaultValue);
|
||||
}
|
||||
|
||||
if (!parameters.Any())
|
||||
groups.Label("No parameters", TextAlignment.Center);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
{
|
||||
if (IsLinearTangentMode(spline, index) || IsSmoothInTangentMode(spline, index) || IsSmoothOutTangentMode(spline, index))
|
||||
{
|
||||
SetPointSmooth(spline, index);
|
||||
SetPointSmooth(Editor, spline, index);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -145,7 +145,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
{
|
||||
if (!IsAlignedTangentMode(spline, index))
|
||||
{
|
||||
SetPointSmooth(spline, index);
|
||||
SetPointSmooth(Editor, spline, index);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
/// <inheritdoc/>
|
||||
public override void OnSetMode(Spline spline, int index)
|
||||
{
|
||||
SetTangentSmoothIn(spline, index);
|
||||
SetTangentSmoothIn(Editor, spline, index);
|
||||
Editor.SetSelectTangentIn(spline, index);
|
||||
}
|
||||
}
|
||||
@@ -190,7 +190,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
/// <inheritdoc/>
|
||||
public override void OnSetMode(Spline spline, int index)
|
||||
{
|
||||
SetTangentSmoothOut(spline, index);
|
||||
SetTangentSmoothOut(Editor, spline, index);
|
||||
Editor.SetSelectTangentOut(spline, index);
|
||||
}
|
||||
}
|
||||
@@ -756,14 +756,15 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
spline.UpdateSpline();
|
||||
}
|
||||
|
||||
private static void SetTangentSmoothIn(Spline spline, int index)
|
||||
private static void SetTangentSmoothIn(SplineEditor editor, 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 cameraTransform = editor.Presenter.Owner.PresenterViewport.ViewTransform.Translation;
|
||||
var smoothRange = SplineNode.NodeSizeByDistance(spline.GetSplineTangent(index, false).Translation, 10f, cameraTransform);
|
||||
var previousKeyframe = spline.GetSplineKeyframe(index - 1);
|
||||
var tangentDirection = keyframe.Value.WorldToLocalVector(previousKeyframe.Value.Translation - keyframe.Value.Translation);
|
||||
tangentDirection = tangentDirection.Normalized * smoothRange;
|
||||
@@ -775,14 +776,15 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
spline.UpdateSpline();
|
||||
}
|
||||
|
||||
private static void SetTangentSmoothOut(Spline spline, int index)
|
||||
private static void SetTangentSmoothOut(SplineEditor editor, 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 cameraTransform = editor.Presenter.Owner.PresenterViewport.ViewTransform.Translation;
|
||||
var smoothRange = SplineNode.NodeSizeByDistance(spline.GetSplineTangent(index, false).Translation, 10f, cameraTransform);
|
||||
var nextKeyframe = spline.GetSplineKeyframe(index + 1);
|
||||
var tangentDirection = keyframe.Value.WorldToLocalVector(nextKeyframe.Value.Translation - keyframe.Value.Translation);
|
||||
tangentDirection = tangentDirection.Normalized * smoothRange;
|
||||
@@ -795,7 +797,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
spline.UpdateSpline();
|
||||
}
|
||||
|
||||
private static void SetPointSmooth(Spline spline, int index)
|
||||
private static void SetPointSmooth(SplineEditor editor, Spline spline, int index)
|
||||
{
|
||||
var keyframe = spline.GetSplineKeyframe(index);
|
||||
var tangentInSize = keyframe.TangentIn.Translation.Length;
|
||||
@@ -803,7 +805,8 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
|
||||
var isLastKeyframe = index >= spline.SplinePointsCount - 1;
|
||||
var isFirstKeyframe = index <= 0;
|
||||
var smoothRange = SplineNode.NodeSizeByDistance(spline.GetSplinePoint(index), 10f);
|
||||
var cameraTransform = editor.Presenter.Owner.PresenterViewport.ViewTransform.Translation;
|
||||
var smoothRange = SplineNode.NodeSizeByDistance(spline.GetSplinePoint(index), 10f, cameraTransform);
|
||||
|
||||
// Force smooth it's linear point
|
||||
if (tangentInSize == 0f)
|
||||
|
||||
@@ -4,6 +4,7 @@ using System;
|
||||
using System.Linq;
|
||||
using FlaxEditor.Content;
|
||||
using FlaxEditor.GUI;
|
||||
using FlaxEditor.GUI.Drag;
|
||||
using FlaxEditor.Scripting;
|
||||
using FlaxEngine;
|
||||
using FlaxEngine.GUI;
|
||||
@@ -94,7 +95,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
if (assetReference != null)
|
||||
{
|
||||
if (assetReference.UseSmallPicker)
|
||||
height = 32;
|
||||
height = 36;
|
||||
if (string.IsNullOrEmpty(assetReference.TypeName))
|
||||
{
|
||||
}
|
||||
@@ -122,7 +123,9 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
{
|
||||
base.Refresh();
|
||||
|
||||
if (!HasDifferentValues)
|
||||
var differentValues = HasDifferentValues;
|
||||
Picker.DifferentValues = differentValues;
|
||||
if (!differentValues)
|
||||
{
|
||||
_isRefreshing = true;
|
||||
var value = Values[0];
|
||||
@@ -156,6 +159,17 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
private Rectangle DropdownRect => new Rectangle(Width - DropdownIconSize - DropdownIconMargin, DropdownIconMargin, DropdownIconSize, DropdownIconSize);
|
||||
|
||||
public Action ShowPicker;
|
||||
public Action<ContentItem> OnAssetDropped;
|
||||
|
||||
private DragItems _dragItems;
|
||||
private DragHandlers _dragHandlers;
|
||||
private bool _hasValidDragOver;
|
||||
private Func<ContentItem, bool> _validate;
|
||||
|
||||
public void SetValidationMethod(Func<ContentItem, bool> validate)
|
||||
{
|
||||
_validate = validate;
|
||||
}
|
||||
|
||||
public override void Draw()
|
||||
{
|
||||
@@ -164,6 +178,14 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
var style = FlaxEngine.GUI.Style.Current;
|
||||
var dropdownRect = DropdownRect;
|
||||
Render2D.DrawSprite(style.ArrowDown, dropdownRect, Enabled ? (DropdownRect.Contains(PointFromWindow(RootWindow.MousePosition)) ? style.BorderSelected : style.Foreground) : style.ForegroundDisabled);
|
||||
|
||||
// Check if drag is over
|
||||
if (IsDragOver && _hasValidDragOver)
|
||||
{
|
||||
var bounds = new Rectangle(Float2.Zero, Size);
|
||||
Render2D.FillRectangle(bounds, style.Selection);
|
||||
Render2D.DrawRectangle(bounds, style.SelectionBorder);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnMouseDown(Float2 location, MouseButton button)
|
||||
@@ -207,6 +229,68 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
private DragDropEffect DragEffect => _hasValidDragOver ? DragDropEffect.Move : DragDropEffect.None;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override DragDropEffect OnDragEnter(ref Float2 location, DragData data)
|
||||
{
|
||||
base.OnDragEnter(ref location, data);
|
||||
|
||||
// Ensure to have valid drag helpers (uses lazy init)
|
||||
if (_dragItems == null)
|
||||
_dragItems = new DragItems(ValidateDragAsset);
|
||||
if (_dragHandlers == null)
|
||||
{
|
||||
_dragHandlers = new DragHandlers
|
||||
{
|
||||
_dragItems,
|
||||
};
|
||||
}
|
||||
|
||||
_hasValidDragOver = _dragHandlers.OnDragEnter(data) != DragDropEffect.None;
|
||||
|
||||
|
||||
return DragEffect;
|
||||
}
|
||||
|
||||
private bool ValidateDragAsset(ContentItem contentItem)
|
||||
{
|
||||
// Load or get asset
|
||||
return _validate?.Invoke(contentItem) ?? false;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override DragDropEffect OnDragMove(ref Float2 location, DragData data)
|
||||
{
|
||||
base.OnDragMove(ref location, data);
|
||||
|
||||
return DragEffect;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnDragLeave()
|
||||
{
|
||||
_hasValidDragOver = false;
|
||||
_dragHandlers.OnDragLeave();
|
||||
|
||||
base.OnDragLeave();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override DragDropEffect OnDragDrop(ref Float2 location, DragData data)
|
||||
{
|
||||
var result = DragEffect;
|
||||
|
||||
base.OnDragDrop(ref location, data);
|
||||
|
||||
if (_dragItems.HasValidDrag)
|
||||
{
|
||||
OnAssetDropped(_dragItems.Objects[0]);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
private TextBoxWithPicker _textBox;
|
||||
@@ -221,13 +305,21 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
{
|
||||
if (HasDifferentTypes)
|
||||
return;
|
||||
|
||||
_validator = new AssetPickerValidator(ScriptType.Null);
|
||||
_textBox = layout.Custom<TextBoxWithPicker>().CustomControl;
|
||||
_textBox.ShowPicker = OnShowPicker;
|
||||
_textBox.OnAssetDropped = OnItemDropped;
|
||||
_textBox.EditEnd += OnEditEnd;
|
||||
_validator = new AssetPickerValidator(ScriptType.Null);
|
||||
_textBox.SetValidationMethod(_validator.IsValid);
|
||||
AssetRefEditor.ApplyAssetReferenceAttribute(Values, out _, _validator);
|
||||
}
|
||||
|
||||
private void OnItemDropped(ContentItem item)
|
||||
{
|
||||
SetPickerPath(item);
|
||||
}
|
||||
|
||||
private void OnShowPicker()
|
||||
{
|
||||
if (_validator.AssetType != ScriptType.Null)
|
||||
@@ -285,12 +377,9 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
{
|
||||
base.Refresh();
|
||||
|
||||
if (!HasDifferentValues)
|
||||
{
|
||||
_isRefreshing = true;
|
||||
_textBox.Text = GetPath();
|
||||
_isRefreshing = false;
|
||||
}
|
||||
_isRefreshing = true;
|
||||
_textBox.Text = HasDifferentValues ? "Multiple Values" : GetPath();
|
||||
_isRefreshing = false;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user