Compare commits
815 Commits
sdl_platfo
...
emscripten
| Author | SHA1 | Date | |
|---|---|---|---|
| 578287f3bf | |||
|
|
489c4a3661 | ||
|
|
43dca143fa | ||
|
|
6bd13feba6 | ||
|
|
d1557e5292 | ||
|
|
6f13a33be2 | ||
|
|
4ccf969f7a | ||
|
|
3d206e06d0 | ||
|
|
25e90deed6 | ||
|
|
7bc687194f | ||
|
|
8a760dc1e2 | ||
|
|
fc0b885a14 | ||
|
|
f12ad5c874 | ||
|
|
fd0584b406 | ||
|
|
374f6e40bb | ||
|
|
9c9e17a9d9 | ||
|
|
865a26cbbe | ||
|
|
56e825cad4 | ||
|
|
1df608e902 | ||
|
|
07f031e4c5 | ||
|
|
06c31a39f2 | ||
|
|
2a6e38e020 | ||
|
|
cc69e5d966 | ||
|
|
d68969dbe2 | ||
|
|
c4d20f06ee | ||
|
|
3c5c6f9883 | ||
|
|
8e7dc2a91e | ||
|
|
4ddbc8ba5c | ||
|
|
15f379e87f | ||
|
|
d4a7b3074e | ||
|
|
a3492e59ef | ||
|
|
515ad56fa2 | ||
|
|
ebd20dd816 | ||
|
|
019a9f6089 | ||
|
|
273b110db4 | ||
|
|
0bea701a83 | ||
|
|
ee22b9dc25 | ||
|
|
a1096aaf92 | ||
|
|
885ee15767 | ||
|
|
c978ab2b84 | ||
|
|
f045b5b6b6 | ||
|
|
c51a023e61 | ||
|
|
645df4fb06 | ||
|
|
b53028782f | ||
|
|
ef551c36ae | ||
|
|
e851efa0a8 | ||
| 0084bc051c | |||
|
|
9c8023d64f | ||
|
|
6d02f5d9da | ||
|
|
1f9f281c31 | ||
|
|
846b64048f | ||
|
|
55f73b6cf7 | ||
|
|
0f6c1aea62 | ||
|
|
d2ee61ef8d | ||
|
|
a1399c5157 | ||
|
|
7b7a92758f | ||
|
|
bd300651ec | ||
|
|
a2b0d0714e | ||
|
|
3d66316716 | ||
|
|
9c32f978fb | ||
|
|
ed5ad91a32 | ||
|
|
ecddb8aae5 | ||
|
|
a855b17cc0 | ||
|
|
27dd1bda25 | ||
|
|
4afd9fd8df | ||
|
|
73c19b278f | ||
|
|
b4cb1028ed | ||
|
|
4a7f1a5fde | ||
|
|
5d0fdc8313 | ||
|
|
70b324cdec | ||
|
|
20516bb8bc | ||
|
|
c18b9163ca | ||
|
|
db5b65beac | ||
|
|
78e5baf6a5 | ||
|
|
4833c19366 | ||
|
|
65fd22f5b6 | ||
|
|
f57df83d26 | ||
|
|
66894b71fa | ||
|
|
7e9ee0610a | ||
|
|
f733611213 | ||
|
|
780e78f056 | ||
|
|
4d447b7544 | ||
|
|
9a44902949 | ||
|
|
e84b5410ec | ||
|
|
9ac19cbd2f | ||
|
|
39a2bc2535 | ||
|
|
15771355cb | ||
|
|
f3111e855d | ||
|
|
3c6838ee35 | ||
|
|
36ab08e60d | ||
|
|
834c4553b2 | ||
|
|
5a95336601 | ||
|
|
f26fae2daf | ||
|
|
20df4289c2 | ||
|
|
217701ae05 | ||
|
|
f1509bab28 | ||
|
|
30fdd7336e | ||
|
|
3b120cc5a4 | ||
|
|
4cf0c38940 | ||
|
|
0f383d2fc6 | ||
| 483df22929 | |||
|
|
07f21a1520 | ||
| f870fc3ae2 | |||
|
|
bbb5354e9c | ||
|
|
21e2c830e5 | ||
|
|
c828c90161 | ||
|
|
f725f4c0b9 | ||
|
|
1535f95cf1 | ||
|
|
b1f85b7462 | ||
|
|
3a0af54f48 | ||
|
|
4e3e9386cc | ||
|
|
449fc597b5 | ||
|
|
0e91a2d25b | ||
|
|
aba995a42f | ||
|
|
bf0c7fe0dc | ||
|
|
2ab8b9dd55 | ||
|
|
e1ffdee57a | ||
|
|
7c44767d4d | ||
|
|
87ccaa9dd8 | ||
|
|
e8c2f18a4d | ||
|
|
6b36543717 | ||
|
|
bb2a883dc7 | ||
|
|
be7e88de36 | ||
|
|
4a1490f0b1 | ||
|
|
e0d0acc33c | ||
|
|
e2f2d3e6f6 | ||
|
|
afc04dc41c | ||
|
|
bdfa503c05 | ||
|
|
205a8b2ebe | ||
|
|
d18c245730 | ||
|
|
e4eb064562 | ||
|
|
9fc9382e58 | ||
|
|
2bf9efaf30 | ||
|
|
528b4c89ce | ||
|
|
277dabc8b4 | ||
|
|
9a5bc444ba | ||
|
|
e834fc5a42 | ||
|
|
6b87985a44 | ||
|
|
a65a74b866 | ||
|
|
b2124201d5 | ||
|
|
29b8326042 | ||
|
|
81bfa6edc9 | ||
|
|
8ed6a92022 | ||
|
|
c9d16e16cc | ||
|
|
d9f9401c5a | ||
|
|
1e9918b9cc | ||
|
|
6c84b7a259 | ||
|
|
43b337e163 | ||
|
|
45306ca20e | ||
|
|
259d93f95c | ||
|
|
61b6aeb252 | ||
|
|
d694c35db4 | ||
|
|
f105d6f84f | ||
|
|
b1b6953200 | ||
|
|
fa428e343b | ||
|
|
dbbb67f398 | ||
|
|
a9bddfa784 | ||
|
|
f9b784a42a | ||
|
|
d47bd5d6e7 | ||
|
|
e1013aec94 | ||
|
|
1c294059df | ||
|
|
305296883d | ||
|
|
a7016d1186 | ||
|
|
004e02af73 | ||
|
|
143d714037 | ||
|
|
da8376bba1 | ||
|
|
f773a0755d | ||
|
|
d8343dae8e | ||
|
|
b09fbe2d9b | ||
|
|
6dbfd25bdb | ||
|
|
ecfd03f79c | ||
|
|
66a295d5af | ||
|
|
d7458d81a5 | ||
|
|
cc5e4c19e1 | ||
|
|
0c5cb59875 | ||
|
|
85ed0ecb06 | ||
|
|
95b9392f51 | ||
|
|
c7c1bbe35f | ||
|
|
192d3d1a8e | ||
|
|
877d57681d | ||
|
|
0a9bc084f4 | ||
|
|
ec4f8ce239 | ||
|
|
d049a16882 | ||
|
|
ee75cab73e | ||
|
|
0072e21ffa | ||
|
|
f44dde89db | ||
|
|
e6fd761b80 | ||
|
|
62a378e01a | ||
|
|
e67b705397 | ||
|
|
847f6411e7 | ||
|
|
0d7c04682d | ||
|
|
baf068330c | ||
|
|
593646061e | ||
|
|
9ac231c403 | ||
|
|
d2d7a871ce | ||
|
|
b172b08782 | ||
|
|
18778aa511 | ||
|
|
b7e32e13ab | ||
|
|
610c76578b | ||
|
|
e721fbd89f | ||
|
|
ff2c5290b5 | ||
|
|
2b4dc97a97 | ||
|
|
14842183f2 | ||
|
|
b4b13d8dd4 | ||
|
|
e3d1e8a5ea | ||
|
|
d9f90f726b | ||
|
|
e0062a6ff1 | ||
|
|
e494c9ec76 | ||
|
|
2501095500 | ||
|
|
3cfc5db54a | ||
|
|
840835fad2 | ||
|
|
41f136ce0f | ||
|
|
32cae3aacd | ||
|
|
832c524c3c | ||
|
|
a18ca9a4ad | ||
|
|
05e7e6630c | ||
|
|
788d8660b8 | ||
|
|
ab806b2a9b | ||
|
|
610ba00915 | ||
|
|
e60bd165f4 | ||
|
|
223d4f64eb | ||
|
|
827ad85651 | ||
|
|
69c5d65318 | ||
|
|
b834dddb11 | ||
|
|
baddfec6d1 | ||
|
|
fc2f56aca6 | ||
|
|
0364fd629b | ||
|
|
5dbaf3f94e | ||
|
|
c5b7ea9c44 | ||
|
|
7b856fdc95 | ||
|
|
890df65970 | ||
|
|
ab6dfca36e | ||
|
|
72bb2dd932 | ||
|
|
ca09852898 | ||
|
|
e21cb9154a | ||
|
|
af124ce163 | ||
|
|
c28381fb09 | ||
|
|
973ff0efa0 | ||
|
|
27896b6410 | ||
|
|
4bb9de21b4 | ||
|
|
890538c667 | ||
|
|
4b9fa0dcf5 | ||
|
|
14d1b7dd24 | ||
|
|
6788844270 | ||
|
|
b2f2537338 | ||
|
|
450b998a29 | ||
|
|
688d9c77cb | ||
|
|
d71ea5a72b | ||
|
|
01e3ece2af | ||
|
|
afc65f7557 | ||
|
|
d60484b917 | ||
| feceb4e00f | |||
| 67b33a575a | |||
|
|
76b869146d | ||
|
|
32e725392b | ||
|
|
0975ac2a25 | ||
|
|
cf3bcc4549 | ||
|
|
11ea889fa9 | ||
|
|
c5a28a5734 | ||
|
|
6c79a17c7a | ||
|
|
b24d98df9e | ||
|
|
400e2f1b0e | ||
|
|
22e6139ca3 | ||
|
|
859fa16a74 | ||
|
|
8facb46def | ||
|
|
b87f8b96e1 | ||
|
|
37df16a3e4 | ||
|
|
ce45fa3d54 | ||
|
|
7f56d9456b | ||
|
|
1cad2489a3 | ||
|
|
7cdc2456cd | ||
|
|
6b0ee3eeed | ||
|
|
57330e39ca | ||
|
|
af29f2f3dc | ||
|
|
1bdb577b60 | ||
|
|
329ea1c9b4 | ||
|
|
728da6354f | ||
|
|
d5456d6eb3 | ||
|
|
e65714988f | ||
|
|
4e4df736f9 | ||
|
|
5bfe5b0035 | ||
|
|
b30553ea65 | ||
|
|
2550763808 | ||
|
|
6f6dd2f4a3 | ||
|
|
c30d457b1c | ||
|
|
b786fa1c22 | ||
|
|
bbcbe305a8 | ||
|
|
222df16f11 | ||
|
|
8b924d13c1 | ||
|
|
66e25c81b0 | ||
|
|
e12f99ee53 | ||
|
|
387f0cf457 | ||
|
|
f11acdf5db | ||
|
|
3af7dddcc2 | ||
|
|
543e2ecd13 | ||
| 35f8051a62 | |||
| 4453453d46 | |||
|
|
23f5f4d85f | ||
|
|
90a21696f6 | ||
|
|
fa38f0ac91 | ||
| e3f5af530b | |||
|
|
38d8832468 | ||
|
|
c68aa3b371 | ||
| d031649bbd | |||
| 21b8d1838d | |||
| c8ee2fc155 | |||
|
|
dc22fa4061 | ||
| 3eb690fe58 | |||
| 52e2327527 | |||
| f95cbb0e52 | |||
| 518a19c857 | |||
| c0b54be692 | |||
|
|
c2c92eba82 | ||
| d64c28f672 | |||
| 2a959d0531 | |||
|
|
4504d0ae96 | ||
| f14ba6ace6 | |||
| 518f9dc9dc | |||
| 8db29a30e0 | |||
|
|
0e76585709 | ||
|
|
8bf51512ac | ||
|
|
779e8e7169 | ||
|
|
3c8b80152b | ||
|
|
f280412ef4 | ||
| 1327fa40cb | |||
| b70ab01308 | |||
| 46fd5a5855 | |||
| 74c1e200ce | |||
| 31945a53a2 | |||
| 3e91ba3fb2 | |||
|
|
e257f9e4a0 | ||
|
|
056de752ed | ||
|
|
76700c0b24 | ||
|
|
9fdcff657d | ||
|
|
2b6339c05c | ||
|
|
bb91202439 | ||
|
|
f25e9f262a | ||
|
|
ee51077f49 | ||
|
|
950e958a58 | ||
|
|
5fdbed2b56 | ||
|
|
0e627577fc | ||
|
|
4846d4b024 | ||
|
|
5e5293bf7b | ||
|
|
d88477dcae | ||
| ae03bc2dd2 | |||
| 5cd27032b4 | |||
| 7445064d97 | |||
|
|
bd58bd91b4 | ||
|
|
7ce0d88bdc | ||
|
|
98bb2d40d6 | ||
|
|
f4bc620bbd | ||
|
|
0313bf32c9 | ||
|
|
0c887cd29e | ||
|
|
5bd9bce634 | ||
|
|
2a53d0a462 | ||
| 82bd915274 | |||
|
|
e47fc5a54a | ||
|
|
26e24769be | ||
|
|
71391cf1cc | ||
|
|
b5286af526 | ||
|
|
9f07a2a54e | ||
|
|
c39c642b60 | ||
|
|
02cff3973a | ||
|
|
a63b97d31d | ||
|
|
ca52122656 | ||
|
|
20a7fcf6a0 | ||
|
|
43665aa7eb | ||
|
|
3b9b49950c | ||
|
|
0a8752ec0a | ||
|
|
47685dc2be | ||
|
|
517ee5bb25 | ||
|
|
3ab01d3576 | ||
|
|
31b6d4d658 | ||
|
|
08f840d642 | ||
|
|
776b6259cd | ||
|
|
5c81c71116 | ||
|
|
188b635ea0 | ||
|
|
56066a3212 | ||
|
|
ed50ce9c90 | ||
|
|
a7e77f6e21 | ||
|
|
56278b17ee | ||
|
|
bd78db72b9 | ||
|
|
32bd72fecd | ||
|
|
3a798a70fa | ||
|
|
02429266b1 | ||
|
|
77aea0c69c | ||
|
|
6a3ce862cb | ||
|
|
93217da619 | ||
|
|
63def54dad | ||
|
|
00f9a28729 | ||
| 092beb6ae9 | |||
| eb69186271 | |||
|
|
56beca0db4 | ||
|
|
64cd898a65 | ||
|
|
394860656a | ||
|
|
90472a4b31 | ||
|
|
a1999183f2 | ||
|
|
1e3ce48024 | ||
|
|
0007185b5f | ||
|
|
403d2cedc0 | ||
|
|
c8839b8587 | ||
|
|
cf048c9804 | ||
|
|
bea75f51bd | ||
|
|
1bf6612002 | ||
|
|
d9a18b1d31 | ||
|
|
465f30661f | ||
|
|
a62ca5452e | ||
|
|
b07d74d28d | ||
|
|
dacb3b0891 | ||
|
|
92254eefcc | ||
|
|
2d56411e5f | ||
|
|
f8dc8ab903 | ||
|
|
2a55cda583 | ||
|
|
7c91c03adf | ||
|
|
caa902ea9b | ||
|
|
fb07071e24 | ||
|
|
a1cb7dcbe7 | ||
|
|
a8db0086b1 | ||
|
|
e46b6d5b06 | ||
|
|
dfc8c1fac2 | ||
|
|
f8de118288 | ||
|
|
032f698c7b | ||
| 0ac3ab2329 | |||
|
|
e2aaef9b88 | ||
|
|
ee0303bcfb | ||
|
|
1523c7b4ce | ||
|
|
a16a8eaded | ||
|
|
9ff9d48ffd | ||
|
|
dfb1fb91a5 | ||
|
|
8f56ab9534 | ||
|
|
c0dda45c7b | ||
|
|
3efb981f00 | ||
|
|
ed408917c6 | ||
|
|
2ca435a414 | ||
|
|
de9e282bad | ||
|
|
c437daf9be | ||
|
|
1e4f96486f | ||
|
|
e03d0f3322 | ||
|
|
5f0e1253cc | ||
|
|
7e6b040258 | ||
|
|
329ebb6482 | ||
|
|
7a9c58003d | ||
|
|
371a16e37b | ||
|
|
95629e792d | ||
|
|
e79af2fd60 | ||
|
|
4aba0153f8 | ||
|
|
f91c33e17c | ||
|
|
6c29877b20 | ||
|
|
3abde6ecfc | ||
|
|
b42168eee5 | ||
|
|
ac3b2c0ef2 | ||
|
|
f640452b7b | ||
|
|
2f670495ac | ||
|
|
2a36edf528 | ||
|
|
5e690abd76 | ||
|
|
4008e19ca9 | ||
|
|
e9070b30a0 | ||
|
|
636a1ff930 | ||
|
|
887311d1f1 | ||
|
|
3888c4ba21 | ||
|
|
69173803bf | ||
|
|
13e31650be | ||
|
|
3563287f17 | ||
|
|
91ee9f5e05 | ||
| 49918a1067 | |||
| 466f9a4797 | |||
|
|
c7997e0c2f | ||
|
|
4805dfbdba | ||
|
|
62424215c1 | ||
|
|
97ae13759e | ||
|
|
108678d94f | ||
|
|
66dbba5c16 | ||
|
|
d84cef0c18 | ||
|
|
077cefc60e | ||
|
|
35acc668c9 | ||
|
|
ebbe0f12ed | ||
|
|
6a8b76278a | ||
|
|
8ac99ef28f | ||
|
|
547cf7f600 | ||
|
|
b8b8b118c9 | ||
|
|
76247323eb | ||
|
|
0ff20c7c85 | ||
|
|
dd690e7495 | ||
|
|
ca500548a3 | ||
|
|
c0b73375b1 | ||
|
|
9c6d6a0b07 | ||
|
|
179f6014bf | ||
|
|
b580c6ec8e | ||
|
|
dd60cf0040 | ||
|
|
cc851b29fc | ||
|
|
59643b2fb9 | ||
|
|
3a5bb81d39 | ||
|
|
5ec860015d | ||
|
|
0f701ec08e | ||
|
|
387c3ea2f4 | ||
|
|
85b134b7be | ||
|
|
5d17d2509d | ||
|
|
036d4b2f4b | ||
|
|
f8e4f54c77 | ||
|
|
93f12b73d8 | ||
|
|
1091bc6e2c | ||
|
|
594c0fb8e7 | ||
| ea20dc6da0 | |||
| 9becddd84f | |||
| b08c765400 | |||
| afd59d7eb3 | |||
| 47cdd0582c | |||
| af54d04f9d | |||
| 1d2b3bc858 | |||
| 4b552563be | |||
| ebd929176c | |||
| 430e685a7c | |||
| d5bd857c45 | |||
| b8b9ba3069 | |||
| 84c79d5192 | |||
| 028f3a7871 | |||
| 0c462315f0 | |||
| 26261a2090 | |||
| 3fc1895b56 | |||
|
|
a70d7cf1f9 | ||
|
|
1f592ba1a1 | ||
|
|
a43daf025d | ||
|
|
296a2afa95 | ||
|
|
a7e879a3a4 | ||
|
|
27b160b464 | ||
|
|
7c3c4f1a63 | ||
| c61ecc0545 | |||
|
|
fbae93b532 | ||
|
|
35d6e5fd21 | ||
|
|
114828adcb | ||
|
|
b5de4d78ad | ||
|
|
0913e6f738 | ||
|
|
053e52c91f | ||
|
|
d24bd7dfd0 | ||
| 2c8c9b1637 | |||
|
|
05a8c841da | ||
|
|
c4fcaa999c | ||
|
|
70c9dd6608 | ||
|
|
802e2ac7c2 | ||
|
|
0ca60062d9 | ||
|
|
5a587a8582 | ||
|
|
22515c37b5 | ||
|
|
38a48cf1d4 | ||
|
|
cd66d00219 | ||
|
|
c944bd9bed | ||
|
|
a0689f3f00 | ||
|
|
2ee2c97f1e | ||
|
|
fd19e83a46 | ||
|
|
755702b65a | ||
|
|
72e200a7fc | ||
|
|
6353e5f4f2 | ||
|
|
b184022d15 | ||
|
|
26dce69404 | ||
| 2841ac22df | |||
|
|
516f22c3c0 | ||
|
|
5a8c4cd0a5 | ||
|
|
f53b7e3323 | ||
|
|
c1439c646e | ||
| 280035e54f | |||
| 0d140c4f39 | |||
| 32b4efc175 | |||
| 22ba7f2ee5 | |||
|
|
d1774cac28 | ||
|
|
99c26ff9af | ||
|
|
a2d91d989d | ||
|
|
881154e9f4 | ||
|
|
2629511224 | ||
|
|
bcf7226946 | ||
|
|
f5c9e00beb | ||
|
|
6353514188 | ||
|
|
8467315a1e | ||
|
|
be5dbbb95f | ||
| 6b9c727a6a | |||
| 91c0ba1986 | |||
|
|
e4bb8001b2 | ||
| f52f3920cb | |||
| f99a244b8e | |||
|
|
5ec2476aec | ||
|
|
a9fc5f720d | ||
|
|
d323b1c7e2 | ||
|
|
d93c32db9c | ||
|
|
08abdc159e | ||
|
|
708b9c6767 | ||
|
|
ed26a4c182 | ||
|
|
a239984908 | ||
|
|
fc3ea44c69 | ||
|
|
fdecad0d29 | ||
|
|
c7437ed533 | ||
|
|
dab44f5ceb | ||
|
|
79351f0c4d | ||
|
|
c635d93b3c | ||
|
|
7377bad721 | ||
|
|
09fa3ce4be | ||
|
|
bd0daf7580 | ||
|
|
25744986a3 | ||
| 668a4dbb4d | |||
|
|
e1b3429b4c | ||
|
|
efa963be68 | ||
|
|
e19be4c0c6 | ||
|
|
2d5fdfef2f | ||
|
|
46ee6bc193 | ||
|
|
a2ee2ec6ac | ||
|
|
2caaef02ad | ||
|
|
df28b0d977 | ||
|
|
48100cf9fc | ||
|
|
b62f331b08 | ||
|
|
f7b306532b | ||
|
|
212abe7d90 | ||
|
|
7dfc37f652 | ||
|
|
12decc3320 | ||
|
|
d7a528cdbc | ||
|
|
18364d2a8b | ||
|
|
5a9eedfadb | ||
|
|
be7871c292 | ||
|
|
59fb83a469 | ||
|
|
76f0768b99 | ||
|
|
7544500be1 | ||
|
|
b2b855200f | ||
|
|
241a8bc764 | ||
|
|
abdeaa9354 | ||
|
|
d3389604b0 | ||
|
|
d426c5b0d9 | ||
|
|
8da0d2c4ce | ||
|
|
20f576783b | ||
|
|
2bf62cc54f | ||
|
|
ef2c551cee | ||
|
|
65cf59642c | ||
|
|
e2fc8a6283 | ||
|
|
73976f3ed9 | ||
|
|
7ab6bafe39 | ||
|
|
deb2ad7c8f | ||
|
|
cd7fc3242e | ||
|
|
31a0a77e7c | ||
|
|
f0ec4a901a | ||
|
|
8cb67f017a | ||
|
|
7b643e9685 | ||
|
|
39803ce6b2 | ||
|
|
2f1f380062 | ||
|
|
f8dbf363b6 | ||
|
|
fc1451254d | ||
|
|
d3c54e590a | ||
|
|
361fc3ecfb | ||
|
|
3682159da6 | ||
|
|
e9f83f77bb | ||
|
|
823ed247d2 | ||
|
|
8f3b80492e | ||
|
|
c61c013517 | ||
|
|
a2170ffd8a | ||
|
|
4f1f77fb32 | ||
|
|
6ae370f8fc | ||
|
|
da5c8555e5 | ||
|
|
c4c7ee941f | ||
|
|
4f45b3c1d0 | ||
|
|
4c640b915f | ||
|
|
1f3f1ea67e | ||
|
|
60c19303f6 | ||
|
|
adcfc50218 | ||
|
|
9b812ec34a | ||
|
|
7e1ac5e167 | ||
|
|
028b5fedec | ||
|
|
9cc2c1da40 | ||
|
|
93219793d5 | ||
|
|
32f2ef3f06 | ||
|
|
5ed8564293 | ||
|
|
7c87ade12b | ||
|
|
7f87678282 | ||
|
|
e429d29d17 | ||
|
|
086a49f45d | ||
|
|
c46e1164d6 | ||
|
|
2a5898c1de | ||
|
|
f09d6aa0eb | ||
|
|
0848f1fa83 | ||
|
|
537d8b57ca | ||
|
|
02c5ad3fa4 | ||
|
|
41e851298d | ||
|
|
4a3fb41035 | ||
|
|
d57eec3403 | ||
|
|
87e2c4c4d5 | ||
|
|
797cb3c3f2 | ||
|
|
47670251ef | ||
|
|
cf1ef91246 | ||
|
|
7060cb5696 | ||
|
|
c449833d35 | ||
|
|
284aeca51a | ||
|
|
d8f7199c11 | ||
|
|
dc05bbbbcd | ||
|
|
3fcc9ed01f | ||
|
|
70ba750a5e | ||
|
|
50271199ac | ||
|
|
d1a99c9396 | ||
|
|
4ae3d57adc | ||
|
|
99b9967806 | ||
|
|
2f7e84253a | ||
|
|
2f55cb938f | ||
|
|
a86661a855 | ||
|
|
a68ce6633a | ||
|
|
5d57afe3aa | ||
|
|
6705138247 | ||
|
|
276caf771c | ||
|
|
5eea5a72c9 | ||
|
|
e9a7b1c8eb | ||
|
|
a151c78412 | ||
|
|
5f1e905e8f | ||
|
|
a0f764a774 | ||
|
|
7da5ce3ed4 | ||
|
|
1186833b2d | ||
|
|
bb180b0f59 | ||
|
|
5d1c79929a | ||
|
|
3f5a4cc4c9 | ||
|
|
62fd8ac967 | ||
|
|
d904b92f2e | ||
|
|
87e2b76ffa | ||
|
|
c5e11aed15 | ||
|
|
85d61b334b | ||
|
|
26e94f6f8e | ||
|
|
13dd80d429 | ||
|
|
6e9902a966 | ||
|
|
902744a0ce | ||
|
|
1c581bceaf | ||
|
|
fd1e0a4e80 | ||
|
|
b130b81863 | ||
|
|
9cc44825c6 | ||
|
|
92f4327fc2 | ||
|
|
47711ec5be | ||
|
|
d1fbc66cb9 | ||
|
|
7183a3306e | ||
|
|
fd191f7ffb | ||
|
|
b38a7e6eb2 | ||
|
|
2604d58687 | ||
|
|
01d1d634c2 | ||
|
|
c7e403661d | ||
|
|
1196db6d17 | ||
|
|
553a007508 | ||
|
|
de2ee36529 | ||
|
|
eea44ac897 | ||
|
|
c124713e99 | ||
|
|
364a523375 | ||
|
|
afdd264e63 | ||
|
|
8ec54f7b1c | ||
|
|
521518bde4 | ||
|
|
56077a268a | ||
|
|
4f3f1cd163 | ||
|
|
4d77646f26 | ||
|
|
187592b673 | ||
|
|
a0ca000793 | ||
|
|
ae4ae7a638 | ||
|
|
e2a4c8ab03 | ||
|
|
7a40722964 | ||
|
|
1de8909d05 | ||
|
|
9749487e24 | ||
|
|
55968a8ddc | ||
|
|
e325b190ea | ||
|
|
ada6b9140f | ||
|
|
5582579173 | ||
|
|
215467ae42 | ||
|
|
facd7d39dc | ||
|
|
6810e5f2a4 | ||
|
|
88773e71e5 | ||
|
|
ee6fae8956 | ||
|
|
bb6c3233d2 | ||
|
|
499228cc98 | ||
|
|
9e1f488f22 | ||
|
|
a471861e92 | ||
|
|
3d182c89f3 | ||
|
|
e3810a9938 | ||
|
|
f323fdb592 | ||
| f0dea9d528 | |||
|
|
b537a80031 | ||
|
|
5e52bf6469 | ||
|
|
8482f93a0f | ||
|
|
64c62f269c | ||
|
|
19d0d3b683 | ||
|
|
1f56c75821 | ||
|
|
64e127a47a | ||
|
|
8921cf5156 | ||
|
|
24e088fc08 | ||
|
|
14a69a11df | ||
|
|
f2699892e0 | ||
|
|
e27880c1e6 | ||
|
|
6f15ef7690 | ||
|
|
0e3a22faa0 | ||
|
|
0dc1e04c89 | ||
|
|
5c7712daad | ||
|
|
52b64540ab | ||
|
|
b9cfd054c1 | ||
|
|
53d4ea51af | ||
|
|
a4d3ede368 | ||
|
|
92edb996f2 | ||
|
|
2e0c35e6e4 | ||
|
|
baba151d8a | ||
|
|
b44d4107c0 | ||
|
|
f40c67ddf0 | ||
|
|
ec154b4998 | ||
|
|
6997cbeb47 | ||
|
|
c4130aa20f | ||
|
|
c9fe9213b3 | ||
|
|
608839b6a5 | ||
|
|
f71bdd0962 | ||
|
|
47a6da9e40 | ||
|
|
40dae18b76 | ||
| fc96b248cb | |||
| 36c1909111 | |||
| 643fe639e5 | |||
| 78dffc9ad1 | |||
|
|
1dfd717093 | ||
|
|
68ef6f08c6 | ||
|
|
a0b80c6096 | ||
|
|
59ac8a3f60 | ||
|
|
dd281bbca8 | ||
|
|
2e48be97b6 | ||
|
|
0b7550e5ca | ||
|
|
051d363358 | ||
|
|
9b495bbc68 | ||
|
|
e665cc7500 | ||
|
|
0a516ac98d |
42
.github/ISSUE_TEMPLATE/1-bug.yaml
vendored
Normal file
42
.github/ISSUE_TEMPLATE/1-bug.yaml
vendored
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
name: Bug Report
|
||||||
|
description: File a bug report.
|
||||||
|
title: "[Bug]: "
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Thanks for taking the time to fill out this bug report! Please attach any minimal reproduction projects!
|
||||||
|
- type: textarea
|
||||||
|
id: description-area
|
||||||
|
attributes:
|
||||||
|
label: Description
|
||||||
|
description: Please provide a description of the bug and what you expected to happen.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: steps-area
|
||||||
|
attributes:
|
||||||
|
label: Steps to reproduce
|
||||||
|
description: Please provide reproduction steps if possible.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: dropdown
|
||||||
|
id: version
|
||||||
|
attributes:
|
||||||
|
label: Version
|
||||||
|
description: What version of Flax are you running?
|
||||||
|
options:
|
||||||
|
- '1.8'
|
||||||
|
- '1.9'
|
||||||
|
- '1.10'
|
||||||
|
- '1.11'
|
||||||
|
- master branch
|
||||||
|
default: 3
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: logs
|
||||||
|
attributes:
|
||||||
|
label: Relevant logs
|
||||||
|
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
||||||
|
render: shell
|
||||||
22
.github/ISSUE_TEMPLATE/2-feature-request.yaml
vendored
Normal file
22
.github/ISSUE_TEMPLATE/2-feature-request.yaml
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
name: Feature Request
|
||||||
|
description: File a feature request.
|
||||||
|
title: "[Request]: "
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Thanks for taking the time to fill out a feature request!
|
||||||
|
- type: textarea
|
||||||
|
id: description-area
|
||||||
|
attributes:
|
||||||
|
label: Description
|
||||||
|
description: Please provide a description of the feature!
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: benefits-area
|
||||||
|
attributes:
|
||||||
|
label: Benefits
|
||||||
|
description: Please provide what benefits this feature would provide to the engine!
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
4
.github/workflows/build_ios.yml
vendored
4
.github/workflows/build_ios.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v3
|
||||||
with:
|
with:
|
||||||
dotnet-version: 8.0.x
|
dotnet-version: 9.0.x
|
||||||
- name: Setup .NET Workload
|
- name: Setup .NET Workload
|
||||||
run: |
|
run: |
|
||||||
dotnet workload install ios
|
dotnet workload install ios
|
||||||
@@ -33,4 +33,4 @@ jobs:
|
|||||||
git lfs pull
|
git lfs pull
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
./Development/Scripts/Mac/CallBuildTool.sh -build -log -dotnet=8 -arch=ARM64 -platform=iOS -configuration=Release -buildtargets=FlaxGame
|
./Development/Scripts/Mac/CallBuildTool.sh -build -log -dotnet=9 -arch=ARM64 -platform=iOS -configuration=Release -buildtargets=FlaxGame
|
||||||
|
|||||||
3
.github/workflows/build_linux.yml
vendored
3
.github/workflows/build_linux.yml
vendored
@@ -16,7 +16,8 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev libwayland-dev
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y --fix-missing libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev libwayland-dev
|
||||||
- name: Setup Vulkan
|
- name: Setup Vulkan
|
||||||
uses: ./.github/actions/vulkan
|
uses: ./.github/actions/vulkan
|
||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
|
|||||||
6
.github/workflows/cd.yml
vendored
6
.github/workflows/cd.yml
vendored
@@ -87,7 +87,8 @@ jobs:
|
|||||||
git ${{ env.GIT_LFS_PULL_OPTIONS }} lfs pull
|
git ${{ env.GIT_LFS_PULL_OPTIONS }} lfs pull
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
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 update
|
||||||
|
sudo apt-get install -y --fix-missing libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev
|
||||||
- name: Setup Vulkan
|
- name: Setup Vulkan
|
||||||
uses: ./.github/actions/vulkan
|
uses: ./.github/actions/vulkan
|
||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
@@ -118,7 +119,8 @@ jobs:
|
|||||||
git ${{ env.GIT_LFS_PULL_OPTIONS }} lfs pull
|
git ${{ env.GIT_LFS_PULL_OPTIONS }} lfs pull
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
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 update
|
||||||
|
sudo apt-get install -y --fix-missing libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev
|
||||||
- name: Setup Vulkan
|
- name: Setup Vulkan
|
||||||
uses: ./.github/actions/vulkan
|
uses: ./.github/actions/vulkan
|
||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
|
|||||||
3
.github/workflows/tests.yml
vendored
3
.github/workflows/tests.yml
vendored
@@ -28,7 +28,8 @@ jobs:
|
|||||||
git lfs pull
|
git lfs pull
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
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 libwayland-dev
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y --fix-missing libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev libwayland-dev
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
./GenerateProjectFiles.sh -vs2022 -log -verbose -printSDKs -dotnet=8
|
./GenerateProjectFiles.sh -vs2022 -log -verbose -printSDKs -dotnet=8
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Redirect to our own Git LFS server
|
# Redirect to our own Git LFS server
|
||||||
[lfs]
|
[lfs]
|
||||||
url="https://gitlab.flaxengine.com/flax/flaxengine.git/info/lfs"
|
#url="https://gitlab.flaxengine.com/flax/flaxengine.git/info/lfs"
|
||||||
locksverify = false
|
locksverify = false
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -6,6 +6,7 @@
|
|||||||
@3
|
@3
|
||||||
|
|
||||||
#include "./Flax/Common.hlsl"
|
#include "./Flax/Common.hlsl"
|
||||||
|
#include "./Flax/Stencil.hlsl"
|
||||||
#include "./Flax/MaterialCommon.hlsl"
|
#include "./Flax/MaterialCommon.hlsl"
|
||||||
#include "./Flax/GBufferCommon.hlsl"
|
#include "./Flax/GBufferCommon.hlsl"
|
||||||
@7
|
@7
|
||||||
@@ -14,10 +15,13 @@ META_CB_BEGIN(0, Data)
|
|||||||
float4x4 WorldMatrix;
|
float4x4 WorldMatrix;
|
||||||
float4x4 InvWorld;
|
float4x4 InvWorld;
|
||||||
float4x4 SvPositionToWorld;
|
float4x4 SvPositionToWorld;
|
||||||
|
float3 Padding0;
|
||||||
|
uint RenderLayersMask;
|
||||||
@1META_CB_END
|
@1META_CB_END
|
||||||
|
|
||||||
// Use depth buffer for per-pixel decal layering
|
// Use depth buffer for per-pixel decal layering
|
||||||
Texture2D DepthBuffer : register(t0);
|
Texture2D DepthBuffer : register(t0);
|
||||||
|
Texture2D<uint2> StencilBuffer : register(t1);
|
||||||
|
|
||||||
// Material shader resources
|
// Material shader resources
|
||||||
@2
|
@2
|
||||||
@@ -200,6 +204,14 @@ void PS_Decal(
|
|||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
// Stencil masking
|
||||||
|
uint stencilObjectLayer = STENCIL_BUFFER_OBJECT_LAYER(STENCIL_BUFFER_LOAD(StencilBuffer, SvPosition.xy));
|
||||||
|
if ((RenderLayersMask & (1 << stencilObjectLayer)) == 0)
|
||||||
|
{
|
||||||
|
clip(-1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
float2 screenUV = SvPosition.xy * ScreenSize.zw;
|
float2 screenUV = SvPosition.xy * ScreenSize.zw;
|
||||||
SvPosition.z = SAMPLE_RT(DepthBuffer, screenUV).r;
|
SvPosition.z = SAMPLE_RT(DepthBuffer, screenUV).r;
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
#define MAX_LOCAL_LIGHTS 4
|
#define MAX_LOCAL_LIGHTS 4
|
||||||
@1// Forward Shading: Includes
|
@1// Forward Shading: Includes
|
||||||
#include "./Flax/LightingCommon.hlsl"
|
#include "./Flax/LightingCommon.hlsl"
|
||||||
#if USE_REFLECTIONS
|
|
||||||
#include "./Flax/ReflectionsCommon.hlsl"
|
#include "./Flax/ReflectionsCommon.hlsl"
|
||||||
|
#if USE_REFLECTIONS
|
||||||
#define MATERIAL_REFLECTIONS_SSR 1
|
#define MATERIAL_REFLECTIONS_SSR 1
|
||||||
#if MATERIAL_REFLECTIONS == MATERIAL_REFLECTIONS_SSR
|
#if MATERIAL_REFLECTIONS == MATERIAL_REFLECTIONS_SSR
|
||||||
#include "./Flax/SSR.hlsl"
|
#include "./Flax/SSR.hlsl"
|
||||||
@@ -14,11 +14,13 @@
|
|||||||
#include "./Flax/Lighting.hlsl"
|
#include "./Flax/Lighting.hlsl"
|
||||||
#include "./Flax/ShadowsSampling.hlsl"
|
#include "./Flax/ShadowsSampling.hlsl"
|
||||||
#include "./Flax/ExponentialHeightFog.hlsl"
|
#include "./Flax/ExponentialHeightFog.hlsl"
|
||||||
|
#include "./Flax/VolumetricFog.hlsl"
|
||||||
@2// Forward Shading: Constants
|
@2// Forward Shading: Constants
|
||||||
LightData DirectionalLight;
|
LightData DirectionalLight;
|
||||||
LightData SkyLight;
|
LightData SkyLight;
|
||||||
ProbeData EnvironmentProbe;
|
EnvProbeData EnvironmentProbe;
|
||||||
ExponentialHeightFogData ExponentialHeightFog;
|
ExponentialHeightFogData ExponentialHeightFog;
|
||||||
|
VolumetricFogData VolumetricFog;
|
||||||
float3 Dummy2;
|
float3 Dummy2;
|
||||||
uint LocalLightsCount;
|
uint LocalLightsCount;
|
||||||
LightData LocalLights[MAX_LOCAL_LIGHTS];
|
LightData LocalLights[MAX_LOCAL_LIGHTS];
|
||||||
@@ -27,12 +29,15 @@ TextureCube EnvProbe : register(t__SRV__);
|
|||||||
TextureCube SkyLightTexture : register(t__SRV__);
|
TextureCube SkyLightTexture : register(t__SRV__);
|
||||||
Buffer<float4> ShadowsBuffer : register(t__SRV__);
|
Buffer<float4> ShadowsBuffer : register(t__SRV__);
|
||||||
Texture2D<float> ShadowMap : register(t__SRV__);
|
Texture2D<float> ShadowMap : register(t__SRV__);
|
||||||
|
Texture3D VolumetricFogTexture : register(t__SRV__);
|
||||||
|
Texture2D PreIntegratedGF : register(t__SRV__);
|
||||||
@4// Forward Shading: Utilities
|
@4// Forward Shading: Utilities
|
||||||
// Public accessors for lighting data, use them as data binding might change but those methods will remain.
|
// Public accessors for lighting data, use them as data binding might change but those methods will remain.
|
||||||
LightData GetDirectionalLight() { return DirectionalLight; }
|
LightData GetDirectionalLight() { return DirectionalLight; }
|
||||||
LightData GetSkyLight() { return SkyLight; }
|
LightData GetSkyLight() { return SkyLight; }
|
||||||
ProbeData GetEnvironmentProbe() { return EnvironmentProbe; }
|
EnvProbeData GetEnvironmentProbe() { return EnvironmentProbe; }
|
||||||
ExponentialHeightFogData GetExponentialHeightFog() { return ExponentialHeightFog; }
|
ExponentialHeightFogData GetExponentialHeightFog() { return ExponentialHeightFog; }
|
||||||
|
VolumetricFogData GetVolumetricFog() { return VolumetricFog; }
|
||||||
uint GetLocalLightsCount() { return LocalLightsCount; }
|
uint GetLocalLightsCount() { return LocalLightsCount; }
|
||||||
LightData GetLocalLight(uint i) { return LocalLights[i]; }
|
LightData GetLocalLight(uint i) { return LocalLights[i]; }
|
||||||
@5// Forward Shading: Shaders
|
@5// Forward Shading: Shaders
|
||||||
@@ -107,7 +112,8 @@ void PS_Forward(
|
|||||||
|
|
||||||
// Calculate reflections
|
// Calculate reflections
|
||||||
#if USE_REFLECTIONS
|
#if USE_REFLECTIONS
|
||||||
float3 reflections = SampleReflectionProbe(ViewPos, EnvProbe, EnvironmentProbe, gBuffer.WorldPos, gBuffer.Normal, gBuffer.Roughness).rgb;
|
float4 reflections = SampleReflectionProbe(ViewPos, EnvProbe, EnvironmentProbe, gBuffer.WorldPos, gBuffer.Normal, gBuffer.Roughness);
|
||||||
|
reflections.rgb *= reflections.a;
|
||||||
|
|
||||||
#if MATERIAL_REFLECTIONS == MATERIAL_REFLECTIONS_SSR
|
#if MATERIAL_REFLECTIONS == MATERIAL_REFLECTIONS_SSR
|
||||||
// Screen Space Reflections
|
// Screen Space Reflections
|
||||||
@@ -115,7 +121,7 @@ void PS_Forward(
|
|||||||
Texture2D sceneColorTexture = MATERIAL_REFLECTIONS_SSR_COLOR;
|
Texture2D sceneColorTexture = MATERIAL_REFLECTIONS_SSR_COLOR;
|
||||||
float2 screenUV = materialInput.SvPosition.xy * ScreenSize.zw;
|
float2 screenUV = materialInput.SvPosition.xy * ScreenSize.zw;
|
||||||
float stepSize = ScreenSize.z; // 1 / screenWidth
|
float stepSize = ScreenSize.z; // 1 / screenWidth
|
||||||
float maxSamples = 48;
|
float maxSamples = 50;
|
||||||
float worldAntiSelfOcclusionBias = 0.1f;
|
float worldAntiSelfOcclusionBias = 0.1f;
|
||||||
float brdfBias = 0.82f;
|
float brdfBias = 0.82f;
|
||||||
float drawDistance = 5000.0f;
|
float drawDistance = 5000.0f;
|
||||||
@@ -123,7 +129,7 @@ void PS_Forward(
|
|||||||
if (hit.z > 0)
|
if (hit.z > 0)
|
||||||
{
|
{
|
||||||
float3 screenColor = sceneColorTexture.SampleLevel(SamplerPointClamp, hit.xy, 0).rgb;
|
float3 screenColor = sceneColorTexture.SampleLevel(SamplerPointClamp, hit.xy, 0).rgb;
|
||||||
reflections = lerp(reflections, screenColor, hit.z);
|
reflections.rgb = lerp(reflections.rgb, screenColor, hit.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fallback to software tracing if possible
|
// Fallback to software tracing if possible
|
||||||
@@ -135,23 +141,37 @@ void PS_Forward(
|
|||||||
if (TraceSDFSoftwareReflections(gBuffer, reflectWS, surfaceAtlas))
|
if (TraceSDFSoftwareReflections(gBuffer, reflectWS, surfaceAtlas))
|
||||||
{
|
{
|
||||||
float3 screenColor = sceneColorTexture.SampleLevel(SamplerPointClamp, hit.xy, 0).rgb;
|
float3 screenColor = sceneColorTexture.SampleLevel(SamplerPointClamp, hit.xy, 0).rgb;
|
||||||
reflections = lerp(surfaceAtlas, float4(screenColor, 1), hit.z);
|
reflections.rgb = lerp(surfaceAtlas, float4(screenColor, 1), hit.z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
light.rgb += reflections * GetReflectionSpecularLighting(ViewPos, gBuffer) * light.a;
|
light.rgb += reflections.rgb * GetReflectionSpecularLighting(PreIntegratedGF, ViewPos, gBuffer);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Add lighting (apply ambient occlusion)
|
// Add lighting
|
||||||
output.rgb += light.rgb * gBuffer.AO;
|
output.rgb += light.rgb;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if USE_FOG && MATERIAL_SHADING_MODEL != SHADING_MODEL_UNLIT
|
#if USE_FOG && MATERIAL_SHADING_MODEL != SHADING_MODEL_UNLIT
|
||||||
// Calculate exponential height fog
|
// Calculate exponential height fog
|
||||||
float4 fog = GetExponentialHeightFog(ExponentialHeightFog, materialInput.WorldPosition, ViewPos, 0, gBuffer.ViewPos.z);
|
#if DIRECTX && FEATURE_LEVEL < FEATURE_LEVEL_SM6
|
||||||
|
// TODO: fix D3D11/D3D10 bug with incorrect distance
|
||||||
|
float fogSceneDistance = distance(materialInput.WorldPosition, ViewPos);
|
||||||
|
#else
|
||||||
|
float fogSceneDistance = gBuffer.ViewPos.z;
|
||||||
|
#endif
|
||||||
|
float fogSkipDistance = max(ExponentialHeightFog.VolumetricFogMaxDistance - 100, 0);
|
||||||
|
float4 fog = GetExponentialHeightFog(ExponentialHeightFog, materialInput.WorldPosition, ViewPos, fogSkipDistance, fogSceneDistance);
|
||||||
|
if (ExponentialHeightFog.VolumetricFogMaxDistance > 0)
|
||||||
|
{
|
||||||
|
// Sample volumetric fog and mix it in
|
||||||
|
float2 screenUV = materialInput.SvPosition.xy * ScreenSize.zw;
|
||||||
|
float4 volumetricFog = SampleVolumetricFog(VolumetricFogTexture, VolumetricFog, materialInput.WorldPosition - ViewPos, screenUV, TemporalAAJitter);
|
||||||
|
fog = CombineVolumetricFog(fog, volumetricFog);
|
||||||
|
}
|
||||||
|
|
||||||
// Apply fog to the output color
|
// Apply fog to the output color
|
||||||
#if MATERIAL_BLEND == MATERIAL_BLEND_OPAQUE
|
#if MATERIAL_BLEND == MATERIAL_BLEND_OPAQUE
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ float4 ViewInfo;
|
|||||||
float4 ScreenSize;
|
float4 ScreenSize;
|
||||||
float4 ViewSize;
|
float4 ViewSize;
|
||||||
float3 ViewPadding0;
|
float3 ViewPadding0;
|
||||||
float UnscaledTimeParam;
|
float ScaledTimeParam;
|
||||||
@1META_CB_END
|
@1META_CB_END
|
||||||
|
|
||||||
// Shader resources
|
// Shader resources
|
||||||
@@ -38,6 +38,7 @@ struct VertexOutput
|
|||||||
#endif
|
#endif
|
||||||
float4 ClipExtents : TEXCOORD3;
|
float4 ClipExtents : TEXCOORD3;
|
||||||
float2 ClipOrigin : TEXCOORD4;
|
float2 ClipOrigin : TEXCOORD4;
|
||||||
|
float2 CustomData : TEXCOORD5; // x-per-geometry type, y-features mask
|
||||||
#if USE_CUSTOM_VERTEX_INTERPOLATORS
|
#if USE_CUSTOM_VERTEX_INTERPOLATORS
|
||||||
float4 CustomVSToPS[CUSTOM_VERTEX_INTERPOLATORS_COUNT] : TEXCOORD9;
|
float4 CustomVSToPS[CUSTOM_VERTEX_INTERPOLATORS_COUNT] : TEXCOORD9;
|
||||||
#endif
|
#endif
|
||||||
@@ -55,6 +56,7 @@ struct PixelInput
|
|||||||
#endif
|
#endif
|
||||||
float4 ClipExtents : TEXCOORD3;
|
float4 ClipExtents : TEXCOORD3;
|
||||||
float2 ClipOrigin : TEXCOORD4;
|
float2 ClipOrigin : TEXCOORD4;
|
||||||
|
float2 CustomData : TEXCOORD5; // x-per-geometry type, y-features mask
|
||||||
#if USE_CUSTOM_VERTEX_INTERPOLATORS
|
#if USE_CUSTOM_VERTEX_INTERPOLATORS
|
||||||
float4 CustomVSToPS[CUSTOM_VERTEX_INTERPOLATORS_COUNT] : TEXCOORD9;
|
float4 CustomVSToPS[CUSTOM_VERTEX_INTERPOLATORS_COUNT] : TEXCOORD9;
|
||||||
#endif
|
#endif
|
||||||
@@ -67,6 +69,7 @@ struct MaterialInput
|
|||||||
float3 WorldPosition;
|
float3 WorldPosition;
|
||||||
float TwoSidedSign;
|
float TwoSidedSign;
|
||||||
float2 TexCoord;
|
float2 TexCoord;
|
||||||
|
float2 CustomData; // x-per-geometry type, y-features mask
|
||||||
#if USE_VERTEX_COLOR
|
#if USE_VERTEX_COLOR
|
||||||
half4 VertexColor;
|
half4 VertexColor;
|
||||||
#endif
|
#endif
|
||||||
@@ -84,6 +87,7 @@ MaterialInput GetMaterialInput(Render2DVertex input, VertexOutput output)
|
|||||||
MaterialInput result;
|
MaterialInput result;
|
||||||
result.WorldPosition = output.WorldPosition;
|
result.WorldPosition = output.WorldPosition;
|
||||||
result.TexCoord = output.TexCoord;
|
result.TexCoord = output.TexCoord;
|
||||||
|
result.CustomData = input.CustomDataAndClipOrigin.xy;
|
||||||
#if USE_VERTEX_COLOR
|
#if USE_VERTEX_COLOR
|
||||||
result.VertexColor = output.VertexColor;
|
result.VertexColor = output.VertexColor;
|
||||||
#endif
|
#endif
|
||||||
@@ -103,6 +107,7 @@ MaterialInput GetMaterialInput(PixelInput input)
|
|||||||
MaterialInput result;
|
MaterialInput result;
|
||||||
result.WorldPosition = input.WorldPosition;
|
result.WorldPosition = input.WorldPosition;
|
||||||
result.TexCoord = input.TexCoord;
|
result.TexCoord = input.TexCoord;
|
||||||
|
result.CustomData = input.CustomData;
|
||||||
#if USE_VERTEX_COLOR
|
#if USE_VERTEX_COLOR
|
||||||
result.VertexColor = input.VertexColor;
|
result.VertexColor = input.VertexColor;
|
||||||
#endif
|
#endif
|
||||||
@@ -229,6 +234,7 @@ VertexOutput VS_GUI(Render2DVertex input)
|
|||||||
#if USE_VERTEX_COLOR
|
#if USE_VERTEX_COLOR
|
||||||
output.VertexColor = input.Color;
|
output.VertexColor = input.Color;
|
||||||
#endif
|
#endif
|
||||||
|
output.CustomData = input.CustomDataAndClipOrigin.xy;
|
||||||
output.ClipOrigin = input.CustomDataAndClipOrigin.zw;
|
output.ClipOrigin = input.CustomDataAndClipOrigin.zw;
|
||||||
output.ClipExtents = input.ClipExtents;
|
output.ClipExtents = input.ClipExtents;
|
||||||
|
|
||||||
|
|||||||
@@ -645,7 +645,7 @@ VertexOutput VS_Ribbon(RibbonInput input, uint vertexIndex : SV_VertexID)
|
|||||||
materialInput.TBN = output.TBN;
|
materialInput.TBN = output.TBN;
|
||||||
materialInput.TwoSidedSign = 1;
|
materialInput.TwoSidedSign = 1;
|
||||||
materialInput.SvPosition = output.Position;
|
materialInput.SvPosition = output.Position;
|
||||||
materialInput.PreSkinnedPosition = Position;
|
materialInput.PreSkinnedPosition = position;
|
||||||
materialInput.PreSkinnedNormal = tangentToLocal[2].xyz;
|
materialInput.PreSkinnedNormal = tangentToLocal[2].xyz;
|
||||||
materialInput.InstanceOrigin = output.InstanceOrigin;
|
materialInput.InstanceOrigin = output.InstanceOrigin;
|
||||||
materialInput.InstanceParams = output.InstanceParams;
|
materialInput.InstanceParams = output.InstanceParams;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ float4 ScreenSize;
|
|||||||
float4 TemporalAAJitter;
|
float4 TemporalAAJitter;
|
||||||
float4x4 InverseViewProjectionMatrix;
|
float4x4 InverseViewProjectionMatrix;
|
||||||
float3 ViewPadding0;
|
float3 ViewPadding0;
|
||||||
float UnscaledTimeParam;
|
float ScaledTimeParam;
|
||||||
@1META_CB_END
|
@1META_CB_END
|
||||||
|
|
||||||
// Shader resources
|
// Shader resources
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "./Flax/Common.hlsl"
|
#include "./Flax/Common.hlsl"
|
||||||
#include "./Flax/MaterialCommon.hlsl"
|
#include "./Flax/MaterialCommon.hlsl"
|
||||||
#include "./Flax/GBufferCommon.hlsl"
|
#include "./Flax/GBufferCommon.hlsl"
|
||||||
|
#include "./Flax/VolumetricFog.hlsl"
|
||||||
@7
|
@7
|
||||||
|
|
||||||
// Primary constant buffer (with additional material parameters)
|
// Primary constant buffer (with additional material parameters)
|
||||||
@@ -21,6 +22,7 @@ float Dummy0;
|
|||||||
float VolumetricFogMaxDistance;
|
float VolumetricFogMaxDistance;
|
||||||
int ParticleStride;
|
int ParticleStride;
|
||||||
int ParticleIndex;
|
int ParticleIndex;
|
||||||
|
float4 GridSliceParameters;
|
||||||
@1META_CB_END
|
@1META_CB_END
|
||||||
|
|
||||||
// Particles attributes buffer
|
// Particles attributes buffer
|
||||||
@@ -202,19 +204,19 @@ Material GetMaterialPS(MaterialInput input)
|
|||||||
META_PS(true, FEATURE_LEVEL_SM5)
|
META_PS(true, FEATURE_LEVEL_SM5)
|
||||||
void PS_VolumetricFog(Quad_GS2PS input, out float4 VBufferA : SV_Target0, out float4 VBufferB : SV_Target1)
|
void PS_VolumetricFog(Quad_GS2PS input, out float4 VBufferA : SV_Target0, out float4 VBufferB : SV_Target1)
|
||||||
{
|
{
|
||||||
|
// Reproject grid position back to the screen and world space
|
||||||
uint3 gridCoordinate = uint3(input.Vertex.Position.xy, input.LayerIndex);
|
uint3 gridCoordinate = uint3(input.Vertex.Position.xy, input.LayerIndex);
|
||||||
float3 cellOffset = 0.5f;
|
float3 cellOffset = 0.5f;
|
||||||
float2 volumeUV = (gridCoordinate.xy + cellOffset.xy) / GridSize.xy;
|
float2 volumeUV = (gridCoordinate.xy + cellOffset.xy) / GridSize.xy;
|
||||||
float zSlice = gridCoordinate.z + cellOffset.z;
|
float sceneDepth = GetDepthFromSlice(GridSliceParameters, gridCoordinate.z + cellOffset.z) / ViewFar;
|
||||||
float sceneDepth = (zSlice / GridSize.z) * VolumetricFogMaxDistance / ViewFar;
|
|
||||||
float deviceDepth = (ViewInfo.w / sceneDepth) + ViewInfo.z;
|
float deviceDepth = (ViewInfo.w / sceneDepth) + ViewInfo.z;
|
||||||
float4 clipPos = float4(volumeUV * float2(2.0, -2.0) + float2(-1.0, 1.0), deviceDepth, 1.0);
|
float4 clipPos = float4(volumeUV * float2(2.0, -2.0) + float2(-1.0, 1.0), deviceDepth, 1.0);
|
||||||
float4 wsPos = mul(clipPos, InverseViewProjectionMatrix);
|
float4 wsPos = mul(clipPos, InverseViewProjectionMatrix);
|
||||||
float3 positionWS = wsPos.xyz / wsPos.w;
|
wsPos.xyz /= wsPos.w;
|
||||||
|
|
||||||
// Get material parameters
|
// Get material parameters
|
||||||
MaterialInput materialInput = (MaterialInput)0;
|
MaterialInput materialInput = (MaterialInput)0;
|
||||||
materialInput.WorldPosition = positionWS;
|
materialInput.WorldPosition = wsPos.xyz;
|
||||||
materialInput.TexCoord = input.Vertex.TexCoord;
|
materialInput.TexCoord = input.Vertex.TexCoord;
|
||||||
materialInput.ParticleIndex = ParticleIndex;
|
materialInput.ParticleIndex = ParticleIndex;
|
||||||
materialInput.TBN = float3x3(float3(1, 0, 0), float3(0, 1, 0), float3(0, 0, 1));
|
materialInput.TBN = float3x3(float3(1, 0, 0), float3(0, 1, 0), float3(0, 0, 1));
|
||||||
@@ -225,9 +227,10 @@ void PS_VolumetricFog(Quad_GS2PS input, out float4 VBufferA : SV_Target0, out fl
|
|||||||
Material material = GetMaterialPS(materialInput);
|
Material material = GetMaterialPS(materialInput);
|
||||||
|
|
||||||
// Compute fog properties
|
// Compute fog properties
|
||||||
|
material.Opacity *= material.Mask;
|
||||||
float3 albedo = material.Color;
|
float3 albedo = material.Color;
|
||||||
float extinction = material.Opacity * material.Mask * 0.001f;
|
float extinction = material.Opacity * 0.001f;
|
||||||
float3 emission = material.Emissive;
|
float3 emission = material.Emissive * material.Opacity;
|
||||||
float3 scattering = albedo * extinction;
|
float3 scattering = albedo * extinction;
|
||||||
float absorption = max(0.0f, extinction - Luminance(scattering));
|
float absorption = max(0.0f, extinction - Luminance(scattering));
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/Shaders/Fog.flax
LFS
BIN
Content/Shaders/Fog.flax
LFS
Binary file not shown.
BIN
Content/Shaders/GI/DDGI.flax
LFS
BIN
Content/Shaders/GI/DDGI.flax
LFS
Binary file not shown.
Binary file not shown.
BIN
Content/Shaders/GUI.flax
LFS
BIN
Content/Shaders/GUI.flax
LFS
Binary file not shown.
Binary file not shown.
BIN
Content/Shaders/Histogram.flax
LFS
BIN
Content/Shaders/Histogram.flax
LFS
Binary file not shown.
BIN
Content/Shaders/Lights.flax
LFS
BIN
Content/Shaders/Lights.flax
LFS
Binary file not shown.
BIN
Content/Shaders/MotionBlur.flax
LFS
BIN
Content/Shaders/MotionBlur.flax
LFS
Binary file not shown.
BIN
Content/Shaders/MultiScaler.flax
LFS
BIN
Content/Shaders/MultiScaler.flax
LFS
Binary file not shown.
Binary file not shown.
BIN
Content/Shaders/Reflections.flax
LFS
BIN
Content/Shaders/Reflections.flax
LFS
Binary file not shown.
BIN
Content/Shaders/SDF.flax
LFS
BIN
Content/Shaders/SDF.flax
LFS
Binary file not shown.
BIN
Content/Shaders/SSAO.flax
LFS
BIN
Content/Shaders/SSAO.flax
LFS
Binary file not shown.
BIN
Content/Shaders/SSR.flax
LFS
BIN
Content/Shaders/SSR.flax
LFS
Binary file not shown.
BIN
Content/Shaders/Sky.flax
LFS
BIN
Content/Shaders/Sky.flax
LFS
Binary file not shown.
BIN
Content/Shaders/TAA.flax
LFS
BIN
Content/Shaders/TAA.flax
LFS
Binary file not shown.
Binary file not shown.
@@ -2,12 +2,12 @@
|
|||||||
"Name": "Flax",
|
"Name": "Flax",
|
||||||
"Version": {
|
"Version": {
|
||||||
"Major": 1,
|
"Major": 1,
|
||||||
"Minor": 11,
|
"Minor": 12,
|
||||||
"Revision": 0,
|
"Revision": 0,
|
||||||
"Build": 6800
|
"Build": 6905
|
||||||
},
|
},
|
||||||
"Company": "Flax",
|
"Company": "Flax",
|
||||||
"Copyright": "Copyright (c) 2012-2025 Wojciech Figat. All rights reserved.",
|
"Copyright": "Copyright (c) 2012-2026 Wojciech Figat. All rights reserved.",
|
||||||
"GameTarget": "FlaxGame",
|
"GameTarget": "FlaxGame",
|
||||||
"EditorTarget": "FlaxEditor",
|
"EditorTarget": "FlaxEditor",
|
||||||
"Configuration": {
|
"Configuration": {
|
||||||
|
|||||||
@@ -188,7 +188,7 @@
|
|||||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_FIELD_ATTRIBUTE_ON_SAME_LINE/@EntryValue">False</s:Boolean>
|
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_FIELD_ATTRIBUTE_ON_SAME_LINE/@EntryValue">False</s:Boolean>
|
||||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_FIELD_ATTRIBUTE_ON_SAME_LINE_EX/@EntryValue">NEVER</s:String>
|
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_FIELD_ATTRIBUTE_ON_SAME_LINE_EX/@EntryValue">NEVER</s:String>
|
||||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_SIMPLE_ACCESSOR_ATTRIBUTE_ON_SAME_LINE/@EntryValue">False</s:Boolean>
|
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_SIMPLE_ACCESSOR_ATTRIBUTE_ON_SAME_LINE/@EntryValue">False</s:Boolean>
|
||||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_SIMPLE_CASE_STATEMENT_ON_SAME_LINE/@EntryValue">ALWAYS</s:String>
|
|
||||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_SIMPLE_EMBEDDED_STATEMENT_ON_SAME_LINE/@EntryValue">NEVER</s:String>
|
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_SIMPLE_EMBEDDED_STATEMENT_ON_SAME_LINE/@EntryValue">NEVER</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SIMPLE_CASE_STATEMENT_STYLE/@EntryValue">ON_SINGLE_LINE</s:String>
|
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SIMPLE_CASE_STATEMENT_STYLE/@EntryValue">ON_SINGLE_LINE</s:String>
|
||||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AFTER_TYPECAST_PARENTHESES/@EntryValue">False</s:Boolean>
|
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AFTER_TYPECAST_PARENTHESES/@EntryValue">False</s:Boolean>
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
<!-- Please search existing issues for potential duplicates before filing yours:
|
|
||||||
https://github.com/flaxengine/FlaxEngine/issues?q=is%3Aissue
|
|
||||||
-->
|
|
||||||
|
|
||||||
**Issue description:**
|
|
||||||
<!-- What happened, and what was expected. -->
|
|
||||||
<!-- Log file, can be found in the project directory's `Logs` folder (optional) -->
|
|
||||||
|
|
||||||
**Steps to reproduce:**
|
|
||||||
<!-- Enter minimal reproduction steps if available. -->
|
|
||||||
|
|
||||||
|
|
||||||
**Minimal reproduction project:**
|
|
||||||
<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->
|
|
||||||
|
|
||||||
|
|
||||||
**Flax version:**
|
|
||||||
<!-- Specify version number. -->
|
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ Follow the instructions below to compile and run the engine from source.
|
|||||||
* Fedora: `sudo dnf install dotnet-sdk-8.0`
|
* Fedora: `sudo dnf install dotnet-sdk-8.0`
|
||||||
* Arch: `sudo pacman -S dotnet-sdk-8.0 dotnet-runtime-8.0 dotnet-targeting-pack-8.0 dotnet-host`
|
* 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/))
|
* Install Vulkan SDK ([https://vulkan.lunarg.com/](https://vulkan.lunarg.com/))
|
||||||
* Ubuntu: `sudo apt install vulkan-sdk`
|
* Ubuntu: `sudo apt install vulkan-sdk` (deprecated, follow official docs)
|
||||||
* Fedora: `sudo dnf install vulkan-headers vulkan-tools vulkan-validation-layers`
|
* Fedora: `sudo dnf install vulkan-headers vulkan-tools vulkan-validation-layers`
|
||||||
* Arch: `sudo pacman -S vulkan-headers vulkan-tools vulkan-validation-layers`
|
* Arch: `sudo pacman -S vulkan-headers vulkan-tools vulkan-validation-layers`
|
||||||
* Install Git with LFS
|
* Install Git with LFS
|
||||||
@@ -60,7 +60,7 @@ Follow the instructions below to compile and run the engine from source.
|
|||||||
* Ubuntu: `sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev zlib1g-dev`
|
* Ubuntu: `sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev zlib1g-dev`
|
||||||
* Fedora: `sudo dnf install libX11-devel libXcursor-devel libXinerama-devel ghc-zlib-devel`
|
* Fedora: `sudo dnf install libX11-devel libXcursor-devel libXinerama-devel ghc-zlib-devel`
|
||||||
* Arch: `sudo pacman -S base-devel libx11 libxcursor libxinerama zlib`
|
* Arch: `sudo pacman -S base-devel libx11 libxcursor libxinerama zlib`
|
||||||
* Install Clang compiler (version 6 or later):
|
* Install Clang compiler (version 14 or later):
|
||||||
* Ubuntu: `sudo apt-get install clang lldb lld`
|
* Ubuntu: `sudo apt-get install clang lldb lld`
|
||||||
* Fedora: `sudo dnf install clang llvm lldb lld`
|
* Fedora: `sudo dnf install clang llvm lldb lld`
|
||||||
* Arch: `sudo pacman -S clang lldb lld`
|
* Arch: `sudo pacman -S clang lldb lld`
|
||||||
|
|||||||
@@ -117,7 +117,8 @@ namespace FlaxEditor.Content.Create
|
|||||||
|
|
||||||
private static bool IsValid(Type type)
|
private static bool IsValid(Type type)
|
||||||
{
|
{
|
||||||
return (type.IsPublic || type.IsNestedPublic) && !type.IsAbstract && !type.IsGenericType;
|
var controlTypes = Editor.Instance.CodeEditing.Controls.Get();
|
||||||
|
return (type.IsPublic || type.IsNestedPublic) && !type.IsAbstract && !type.IsGenericType && controlTypes.Contains(new ScriptType(type));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -187,6 +187,11 @@ namespace FlaxEditor.Content.Import
|
|||||||
// Glossiness, metalness, ambient occlusion, displacement, height, cavity or specular
|
// Glossiness, metalness, ambient occlusion, displacement, height, cavity or specular
|
||||||
_settings.Settings.Type = TextureFormatType.GrayScale;
|
_settings.Settings.Type = TextureFormatType.GrayScale;
|
||||||
}
|
}
|
||||||
|
else if (_settings.Settings.Type == TextureFormatType.ColorRGB)
|
||||||
|
{
|
||||||
|
// Blind guess that common color texture is sRGB
|
||||||
|
_settings.Settings.sRGB = true;
|
||||||
|
}
|
||||||
|
|
||||||
// Try to restore target asset texture import options (useful for fast reimport)
|
// Try to restore target asset texture import options (useful for fast reimport)
|
||||||
Editor.TryRestoreImportOptions(ref _settings.Settings, ResultUrl);
|
Editor.TryRestoreImportOptions(ref _settings.Settings, ResultUrl);
|
||||||
|
|||||||
@@ -281,6 +281,13 @@ namespace FlaxEditor.Content
|
|||||||
|
|
||||||
private void CacheData()
|
private void CacheData()
|
||||||
{
|
{
|
||||||
|
if (!_asset)
|
||||||
|
{
|
||||||
|
_parameters = Utils.GetEmptyArray<ScriptMemberInfo>();
|
||||||
|
_methods = Utils.GetEmptyArray<ScriptMemberInfo>();
|
||||||
|
_attributes = Utils.GetEmptyArray<Attribute>();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (_parameters != null)
|
if (_parameters != null)
|
||||||
return;
|
return;
|
||||||
if (_asset.WaitForLoaded())
|
if (_asset.WaitForLoaded())
|
||||||
@@ -344,13 +351,13 @@ namespace FlaxEditor.Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public string Name => Path.GetFileNameWithoutExtension(_asset.Path);
|
public string Name => _asset ? Path.GetFileNameWithoutExtension(_asset.Path) : null;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public string Namespace => string.Empty;
|
public string Namespace => string.Empty;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public string TypeName => JsonSerializer.GetStringID(_asset.ID);
|
public string TypeName => _asset ? JsonSerializer.GetStringID(_asset.ID) : null;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public bool IsPublic => true;
|
public bool IsPublic => true;
|
||||||
|
|||||||
@@ -130,6 +130,11 @@ namespace FlaxEditor.Content
|
|||||||
eyeAdaptation.Mode = EyeAdaptationMode.None;
|
eyeAdaptation.Mode = EyeAdaptationMode.None;
|
||||||
eyeAdaptation.OverrideFlags |= EyeAdaptationSettingsOverride.Mode;
|
eyeAdaptation.OverrideFlags |= EyeAdaptationSettingsOverride.Mode;
|
||||||
preview.PostFxVolume.EyeAdaptation = eyeAdaptation;
|
preview.PostFxVolume.EyeAdaptation = eyeAdaptation;
|
||||||
|
|
||||||
|
var antiAliasing = preview.PostFxVolume.AntiAliasing;
|
||||||
|
antiAliasing.Mode = AntialiasingMode.FastApproximateAntialiasing;
|
||||||
|
antiAliasing.OverrideFlags |= AntiAliasingSettingsOverride.Mode;
|
||||||
|
preview.PostFxVolume.AntiAliasing = antiAliasing;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,6 +141,11 @@ API_ENUM() enum class BuildPlatform
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
API_ENUM(Attributes="EditorDisplay(null, \"Windows ARM64\")")
|
API_ENUM(Attributes="EditorDisplay(null, \"Windows ARM64\")")
|
||||||
WindowsARM64 = 15,
|
WindowsARM64 = 15,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Web
|
||||||
|
/// </summary>
|
||||||
|
Web = 16,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -188,6 +193,11 @@ enum class DotNetAOTModes
|
|||||||
/// Use Mono AOT to cross-compile all used C# assemblies into native platform static libraries which can be linked into a single shared library.
|
/// Use Mono AOT to cross-compile all used C# assemblies into native platform static libraries which can be linked into a single shared library.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
MonoAOTStatic,
|
MonoAOTStatic,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Target platform doesn't support .NET or it has been disabled.
|
||||||
|
/// </summary>
|
||||||
|
NoDotnet,
|
||||||
};
|
};
|
||||||
|
|
||||||
extern FLAXENGINE_API const Char* ToString(const BuildPlatform platform);
|
extern FLAXENGINE_API const Char* ToString(const BuildPlatform platform);
|
||||||
|
|||||||
@@ -69,6 +69,10 @@
|
|||||||
#include "Platform/iOS/iOSPlatformTools.h"
|
#include "Platform/iOS/iOSPlatformTools.h"
|
||||||
#include "Engine/Platform/iOS/iOSPlatformSettings.h"
|
#include "Engine/Platform/iOS/iOSPlatformSettings.h"
|
||||||
#endif
|
#endif
|
||||||
|
#if PLATFORM_TOOLS_WEB
|
||||||
|
#include "Platform/Web/WebPlatformTools.h"
|
||||||
|
#include "Engine/Platform/Web/WebPlatformSettings.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace GameCookerImpl
|
namespace GameCookerImpl
|
||||||
{
|
{
|
||||||
@@ -151,6 +155,8 @@ const Char* ToString(const BuildPlatform platform)
|
|||||||
return TEXT("iOS ARM64");
|
return TEXT("iOS ARM64");
|
||||||
case BuildPlatform::WindowsARM64:
|
case BuildPlatform::WindowsARM64:
|
||||||
return TEXT("Windows ARM64");
|
return TEXT("Windows ARM64");
|
||||||
|
case BuildPlatform::Web:
|
||||||
|
return TEXT("Web");
|
||||||
default:
|
default:
|
||||||
return TEXT("");
|
return TEXT("");
|
||||||
}
|
}
|
||||||
@@ -183,6 +189,8 @@ const Char* ToString(const DotNetAOTModes mode)
|
|||||||
return TEXT("MonoAOTDynamic");
|
return TEXT("MonoAOTDynamic");
|
||||||
case DotNetAOTModes::MonoAOTStatic:
|
case DotNetAOTModes::MonoAOTStatic:
|
||||||
return TEXT("MonoAOTStatic");
|
return TEXT("MonoAOTStatic");
|
||||||
|
case DotNetAOTModes::NoDotnet:
|
||||||
|
return TEXT("NoDotnet");
|
||||||
default:
|
default:
|
||||||
return TEXT("");
|
return TEXT("");
|
||||||
}
|
}
|
||||||
@@ -307,6 +315,10 @@ void CookingData::GetBuildPlatformName(const Char*& platform, const Char*& archi
|
|||||||
platform = TEXT("Windows");
|
platform = TEXT("Windows");
|
||||||
architecture = TEXT("ARM64");
|
architecture = TEXT("ARM64");
|
||||||
break;
|
break;
|
||||||
|
case BuildPlatform::Web:
|
||||||
|
platform = TEXT("Web");
|
||||||
|
architecture = TEXT("x86");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
LOG(Fatal, "Unknown or unsupported build platform.");
|
LOG(Fatal, "Unknown or unsupported build platform.");
|
||||||
}
|
}
|
||||||
@@ -461,6 +473,11 @@ PlatformTools* GameCooker::GetTools(BuildPlatform platform)
|
|||||||
case BuildPlatform::iOSARM64:
|
case BuildPlatform::iOSARM64:
|
||||||
result = New<iOSPlatformTools>();
|
result = New<iOSPlatformTools>();
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
#if PLATFORM_TOOLS_WEB
|
||||||
|
case BuildPlatform::Web:
|
||||||
|
result = New<WebPlatformTools>();
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
Tools.Add(platform, result);
|
Tools.Add(platform, result);
|
||||||
@@ -604,6 +621,9 @@ void GameCooker::GetCurrentPlatform(PlatformType& platform, BuildPlatform& build
|
|||||||
case PlatformType::iOS:
|
case PlatformType::iOS:
|
||||||
buildPlatform = BuildPlatform::iOSARM64;
|
buildPlatform = BuildPlatform::iOSARM64;
|
||||||
break;
|
break;
|
||||||
|
case PlatformType::Web:
|
||||||
|
buildPlatform = BuildPlatform::Web;
|
||||||
|
break;
|
||||||
default: ;
|
default: ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ namespace FlaxEditor
|
|||||||
case BuildPlatform.MacOSARM64:
|
case BuildPlatform.MacOSARM64:
|
||||||
case BuildPlatform.MacOSx64: return PlatformType.Mac;
|
case BuildPlatform.MacOSx64: return PlatformType.Mac;
|
||||||
case BuildPlatform.iOSARM64: return PlatformType.iOS;
|
case BuildPlatform.iOSARM64: return PlatformType.iOS;
|
||||||
|
case BuildPlatform.Web: return PlatformType.Web;
|
||||||
default: throw new ArgumentOutOfRangeException(nameof(buildPlatform), buildPlatform, null);
|
default: throw new ArgumentOutOfRangeException(nameof(buildPlatform), buildPlatform, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,6 +138,7 @@ Array<byte> AndroidPlatformTools::SaveCache(CookingData& data, IBuildCache* cach
|
|||||||
result.Add((const byte*)&platformCache, sizeof(platformCache));
|
result.Add((const byte*)&platformCache, sizeof(platformCache));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AndroidPlatformTools::OnBuildStarted(CookingData& data)
|
void AndroidPlatformTools::OnBuildStarted(CookingData& data)
|
||||||
{
|
{
|
||||||
// Adjust the cooking output folder to be located inside the Gradle assets directory
|
// Adjust the cooking output folder to be located inside the Gradle assets directory
|
||||||
@@ -411,7 +412,6 @@ bool AndroidPlatformTools::OnPostProcess(CookingData& data)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
LOG(Info, "Output Android APK application package: {0} (size: {1} MB)", outputApk, FileSystem::GetFileSize(outputApk) / 1024 / 1024);
|
LOG(Info, "Output Android APK application package: {0} (size: {1} MB)", outputApk, FileSystem::GetFileSize(outputApk) / 1024 / 1024);
|
||||||
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,26 +15,32 @@
|
|||||||
#include "Editor/ProjectInfo.h"
|
#include "Editor/ProjectInfo.h"
|
||||||
#include "Editor/Utilities/EditorUtilities.h"
|
#include "Editor/Utilities/EditorUtilities.h"
|
||||||
|
|
||||||
GDKPlatformTools::GDKPlatformTools()
|
String GetGDK()
|
||||||
{
|
{
|
||||||
// Find GDK
|
String gdk;
|
||||||
Platform::GetEnvironmentVariable(TEXT("GameDKLatest"), _gdkPath);
|
Platform::GetEnvironmentVariable(TEXT("GameDKLatest"), gdk);
|
||||||
if (_gdkPath.IsEmpty() || !FileSystem::DirectoryExists(_gdkPath))
|
if (gdk.IsEmpty() || !FileSystem::DirectoryExists(gdk))
|
||||||
{
|
{
|
||||||
_gdkPath.Clear();
|
gdk.Clear();
|
||||||
Platform::GetEnvironmentVariable(TEXT("GRDKLatest"), _gdkPath);
|
Platform::GetEnvironmentVariable(TEXT("GRDKLatest"), gdk);
|
||||||
if (_gdkPath.IsEmpty() || !FileSystem::DirectoryExists(_gdkPath))
|
if (gdk.IsEmpty() || !FileSystem::DirectoryExists(gdk))
|
||||||
{
|
{
|
||||||
_gdkPath.Clear();
|
gdk.Clear();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (_gdkPath.EndsWith(TEXT("GRDK\\")))
|
if (gdk.EndsWith(TEXT("GRDK\\")))
|
||||||
_gdkPath.Remove(_gdkPath.Length() - 6);
|
gdk.Remove(gdk.Length() - 6);
|
||||||
else if (_gdkPath.EndsWith(TEXT("GRDK")))
|
else if (gdk.EndsWith(TEXT("GRDK")))
|
||||||
_gdkPath.Remove(_gdkPath.Length() - 5);
|
gdk.Remove(gdk.Length() - 5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return gdk;
|
||||||
|
}
|
||||||
|
|
||||||
|
GDKPlatformTools::GDKPlatformTools()
|
||||||
|
{
|
||||||
|
_gdkPath = GetGDK();
|
||||||
}
|
}
|
||||||
|
|
||||||
DotNetAOTModes GDKPlatformTools::UseAOT() const
|
DotNetAOTModes GDKPlatformTools::UseAOT() const
|
||||||
@@ -121,7 +127,7 @@ bool GDKPlatformTools::OnPostProcess(CookingData& data, GDKPlatformSettings* pla
|
|||||||
validName.Add('\0');
|
validName.Add('\0');
|
||||||
|
|
||||||
sb.Append(TEXT("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"));
|
sb.Append(TEXT("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"));
|
||||||
sb.Append(TEXT("<Game configVersion=\"0\">\n"));
|
sb.Append(TEXT("<Game configVersion=\"1\">\n"));
|
||||||
sb.AppendFormat(TEXT(" <Identity Name=\"{0}\" Publisher=\"{1}\" Version=\"{2}\"/>\n"),
|
sb.AppendFormat(TEXT(" <Identity Name=\"{0}\" Publisher=\"{1}\" Version=\"{2}\"/>\n"),
|
||||||
validName.Get(),
|
validName.Get(),
|
||||||
platformSettings->PublisherName.HasChars() ? platformSettings->PublisherName : TEXT("CN=") + gameSettings->CompanyName,
|
platformSettings->PublisherName.HasChars() ? platformSettings->PublisherName : TEXT("CN=") + gameSettings->CompanyName,
|
||||||
|
|||||||
157
Source/Editor/Cooker/Platform/Web/WebPlatformTools.cpp
Normal file
157
Source/Editor/Cooker/Platform/Web/WebPlatformTools.cpp
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
// Copyright (c) Wojciech Figat. All rights reserved.
|
||||||
|
|
||||||
|
#if PLATFORM_TOOLS_WEB
|
||||||
|
|
||||||
|
#include "WebPlatformTools.h"
|
||||||
|
#include "Engine/Platform/File.h"
|
||||||
|
#include "Engine/Platform/FileSystem.h"
|
||||||
|
#include "Engine/Platform/CreateProcessSettings.h"
|
||||||
|
#include "Engine/Platform/Web/WebPlatformSettings.h"
|
||||||
|
#include "Engine/Core/Config/GameSettings.h"
|
||||||
|
#include "Engine/Core/Config/BuildSettings.h"
|
||||||
|
#include "Engine/Content/Content.h"
|
||||||
|
#include "Engine/Content/JsonAsset.h"
|
||||||
|
#include "Engine/Graphics/PixelFormatExtensions.h"
|
||||||
|
#include "Editor/Cooker/GameCooker.h"
|
||||||
|
|
||||||
|
IMPLEMENT_SETTINGS_GETTER(WebPlatformSettings, WebPlatform);
|
||||||
|
|
||||||
|
const Char* WebPlatformTools::GetDisplayName() const
|
||||||
|
{
|
||||||
|
return TEXT("Web");
|
||||||
|
}
|
||||||
|
|
||||||
|
const Char* WebPlatformTools::GetName() const
|
||||||
|
{
|
||||||
|
return TEXT("Web");
|
||||||
|
}
|
||||||
|
|
||||||
|
PlatformType WebPlatformTools::GetPlatform() const
|
||||||
|
{
|
||||||
|
return PlatformType::Web;
|
||||||
|
}
|
||||||
|
|
||||||
|
ArchitectureType WebPlatformTools::GetArchitecture() const
|
||||||
|
{
|
||||||
|
return ArchitectureType::x86;
|
||||||
|
}
|
||||||
|
|
||||||
|
DotNetAOTModes WebPlatformTools::UseAOT() const
|
||||||
|
{
|
||||||
|
return DotNetAOTModes::NoDotnet;
|
||||||
|
}
|
||||||
|
|
||||||
|
PixelFormat WebPlatformTools::GetTextureFormat(CookingData& data, TextureBase* texture, PixelFormat format)
|
||||||
|
{
|
||||||
|
// TODO: texture compression for Web (eg. ASTC for mobile and BC for others?)
|
||||||
|
return PixelFormatExtensions::FindUncompressedFormat(format);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool WebPlatformTools::IsNativeCodeFile(CookingData& data, const String& file)
|
||||||
|
{
|
||||||
|
String extension = FileSystem::GetExtension(file);
|
||||||
|
return extension.IsEmpty() || extension == TEXT("html") || extension == TEXT("js") || extension == TEXT("wasm");
|
||||||
|
}
|
||||||
|
|
||||||
|
void WebPlatformTools::OnBuildStarted(CookingData& data)
|
||||||
|
{
|
||||||
|
// Adjust the cooking output folder for the data files so file_packager tool can build the and output final data inside the cooker output folder
|
||||||
|
data.DataOutputPath = data.CacheDirectory / TEXT("Files");
|
||||||
|
}
|
||||||
|
|
||||||
|
bool WebPlatformTools::OnPostProcess(CookingData& data)
|
||||||
|
{
|
||||||
|
const auto gameSettings = GameSettings::Get();
|
||||||
|
const auto platformSettings = WebPlatformSettings::Get();
|
||||||
|
const auto platformDataPath = data.GetPlatformBinariesRoot();
|
||||||
|
|
||||||
|
// Get name of the output binary (JavaScript and WebAssembly files match)
|
||||||
|
String gameJs;
|
||||||
|
{
|
||||||
|
Array<String> files;
|
||||||
|
FileSystem::DirectoryGetFiles(files, data.OriginalOutputPath, TEXT("*"), DirectorySearchOption::TopDirectoryOnly);
|
||||||
|
for (String& file : files)
|
||||||
|
{
|
||||||
|
if (file.EndsWith(TEXT(".js")))
|
||||||
|
{
|
||||||
|
String outputWasm = String(StringUtils::GetPathWithoutExtension(file)) + TEXT(".wasm");
|
||||||
|
if (files.Contains(outputWasm))
|
||||||
|
{
|
||||||
|
gameJs = file;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (gameJs.IsEmpty())
|
||||||
|
{
|
||||||
|
data.Error(TEXT("Failed to find the main JavaScript for the output game"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pack data files into a single file using Emscripten's file_packager tool
|
||||||
|
{
|
||||||
|
CreateProcessSettings procSettings;
|
||||||
|
String emscriptenSdk = TEXT("EMSDK");
|
||||||
|
Platform::GetEnvironmentVariable(emscriptenSdk, emscriptenSdk);
|
||||||
|
procSettings.FileName = emscriptenSdk / TEXT("upstream/emscripten/tools/file_packager");
|
||||||
|
#if PLATFORM_WIN32
|
||||||
|
procSettings.FileName += TEXT(".bat");
|
||||||
|
#endif
|
||||||
|
procSettings.Arguments = String::Format(TEXT("files.data --preload \"{}@/\" --lz4 --js-output=files.js"), data.DataOutputPath);
|
||||||
|
procSettings.WorkingDirectory = data.OriginalOutputPath;
|
||||||
|
const int32 result = Platform::CreateProcess(procSettings);
|
||||||
|
if (result != 0)
|
||||||
|
{
|
||||||
|
if (!FileSystem::FileExists(procSettings.FileName))
|
||||||
|
data.Error(TEXT("Missing file_packager.bat. Ensure Emscripten SDK installation is valid and 'EMSDK' environment variable points to it."));
|
||||||
|
data.Error(String::Format(TEXT("Failed to package project files (result code: {0}). See log for more info."), result));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: customizable HTML templates
|
||||||
|
|
||||||
|
// Insert packaged file system with game data
|
||||||
|
{
|
||||||
|
String gameJsText;
|
||||||
|
if (File::ReadAllText(gameJs, gameJsText))
|
||||||
|
{
|
||||||
|
data.Error(String::Format(TEXT("Failed to load file '{}'"), gameJs));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
const String filesIncludeBegin = TEXT("// include: files.js");
|
||||||
|
const String filesIncludeEnd = TEXT("// end include: files.js");
|
||||||
|
if (!gameJsText.Contains(filesIncludeBegin))
|
||||||
|
{
|
||||||
|
// Insert generated files.js into the main game file after the minimum_runtime_check.js include
|
||||||
|
String fileJsText;
|
||||||
|
String fileJs = data.OriginalOutputPath / TEXT("files.js");
|
||||||
|
if (File::ReadAllText(fileJs, fileJsText))
|
||||||
|
{
|
||||||
|
data.Error(String::Format(TEXT("Failed to load file '{}'"), fileJs));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
const String insertPrefixLocation = TEXT("// end include: minimum_runtime_check.js");
|
||||||
|
int32 location = gameJsText.Find(insertPrefixLocation);
|
||||||
|
CHECK_RETURN(location != -1, true);
|
||||||
|
location += insertPrefixLocation.Length() + 1;
|
||||||
|
fileJsText = filesIncludeBegin + TEXT("\n") + fileJsText + TEXT("\n") + filesIncludeEnd + TEXT("\n");
|
||||||
|
gameJsText.Insert(location, fileJsText);
|
||||||
|
File::WriteAllText(gameJs, gameJsText, Encoding::UTF8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const auto buildSettings = BuildSettings::Get();
|
||||||
|
if (buildSettings->SkipPackaging)
|
||||||
|
return false;
|
||||||
|
GameCooker::PackageFiles();
|
||||||
|
|
||||||
|
// TODO: minify/compress output JS files (in Release builds)
|
||||||
|
|
||||||
|
LOG(Info, "Output website size: {0} MB", FileSystem::GetDirectorySize(data.OriginalOutputPath) / 1024 / 1024);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
27
Source/Editor/Cooker/Platform/Web/WebPlatformTools.h
Normal file
27
Source/Editor/Cooker/Platform/Web/WebPlatformTools.h
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
// Copyright (c) Wojciech Figat. All rights reserved.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#if PLATFORM_TOOLS_WEB
|
||||||
|
|
||||||
|
#include "../../PlatformTools.h"
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Web platform support tools.
|
||||||
|
/// </summary>
|
||||||
|
class WebPlatformTools : public PlatformTools
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// [PlatformTools]
|
||||||
|
const Char* GetDisplayName() const override;
|
||||||
|
const Char* GetName() const override;
|
||||||
|
PlatformType GetPlatform() const override;
|
||||||
|
ArchitectureType GetArchitecture() const override;
|
||||||
|
DotNetAOTModes UseAOT() const override;
|
||||||
|
PixelFormat GetTextureFormat(CookingData& data, TextureBase* texture, PixelFormat format) override;
|
||||||
|
bool IsNativeCodeFile(CookingData& data, const String& file) override;
|
||||||
|
void OnBuildStarted(CookingData& data) override;
|
||||||
|
bool OnPostProcess(CookingData& data) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -10,9 +10,10 @@
|
|||||||
#include "Engine/Serialization/JsonTools.h"
|
#include "Engine/Serialization/JsonTools.h"
|
||||||
#include "Engine/Serialization/JsonWriters.h"
|
#include "Engine/Serialization/JsonWriters.h"
|
||||||
#include "Editor/Cooker/PlatformTools.h"
|
#include "Editor/Cooker/PlatformTools.h"
|
||||||
|
#include "Engine/Engine/Globals.h"
|
||||||
#include "Editor/Editor.h"
|
#include "Editor/Editor.h"
|
||||||
#include "Editor/ProjectInfo.h"
|
#include "Editor/ProjectInfo.h"
|
||||||
#include "Engine/Engine/Globals.h"
|
#include "Editor/Utilities/EditorUtilities.h"
|
||||||
#if PLATFORM_MAC
|
#if PLATFORM_MAC
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -127,7 +128,7 @@ bool CompileScriptsStep::DeployBinaries(CookingData& data, const String& path, c
|
|||||||
const String dst = dstPath / StringUtils::GetFileName(file);
|
const String dst = dstPath / StringUtils::GetFileName(file);
|
||||||
if (dst == file)
|
if (dst == file)
|
||||||
continue;
|
continue;
|
||||||
if (FileSystem::CopyFile(dst, file))
|
if (EditorUtilities::CopyFileIfNewer(dst, file))
|
||||||
{
|
{
|
||||||
data.Error(String::Format(TEXT("Failed to copy file from {0} to {1}."), file, dst));
|
data.Error(String::Format(TEXT("Failed to copy file from {0} to {1}."), file, dst));
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -526,6 +526,7 @@ bool ProcessShaderBase(CookAssetsStep::AssetCookData& data, ShaderAssetBase* ass
|
|||||||
#if PLATFORM_TOOLS_XBOX_SCARLETT
|
#if PLATFORM_TOOLS_XBOX_SCARLETT
|
||||||
case BuildPlatform::XboxScarlett:
|
case BuildPlatform::XboxScarlett:
|
||||||
{
|
{
|
||||||
|
options.Platform = PlatformType::XboxScarlett;
|
||||||
const char* platformDefineName = "PLATFORM_XBOX_SCARLETT";
|
const char* platformDefineName = "PLATFORM_XBOX_SCARLETT";
|
||||||
COMPILE_PROFILE(DirectX_SM6, SHADER_FILE_CHUNK_INTERNAL_D3D_SM6_CACHE);
|
COMPILE_PROFILE(DirectX_SM6, SHADER_FILE_CHUNK_INTERNAL_D3D_SM6_CACHE);
|
||||||
break;
|
break;
|
||||||
@@ -571,6 +572,14 @@ bool ProcessShaderBase(CookAssetsStep::AssetCookData& data, ShaderAssetBase* ass
|
|||||||
COMPILE_PROFILE(Vulkan_SM5, SHADER_FILE_CHUNK_INTERNAL_VULKAN_SM5_CACHE);
|
COMPILE_PROFILE(Vulkan_SM5, SHADER_FILE_CHUNK_INTERNAL_VULKAN_SM5_CACHE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
#if PLATFORM_TOOLS_WEB
|
||||||
|
case BuildPlatform::Web:
|
||||||
|
{
|
||||||
|
const char* platformDefineName = "PLATFORM_WEB";
|
||||||
|
// TODO: compile shaders for WebGPU
|
||||||
|
break;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
@@ -1367,7 +1376,10 @@ bool CookAssetsStep::Perform(CookingData& data)
|
|||||||
{
|
{
|
||||||
typeName = e.TypeName;
|
typeName = e.TypeName;
|
||||||
}
|
}
|
||||||
LOG(Info, "{0}: {1:>4} assets of total size {2}", typeName, e.Count, Utilities::BytesToText(e.ContentSize));
|
if (e.Count == 1)
|
||||||
|
LOG(Info, "{0}: 1 asset of total size {1}", typeName, Utilities::BytesToText(e.ContentSize));
|
||||||
|
else
|
||||||
|
LOG(Info, "{0}: {1:>4} assets of total size {2}", typeName, e.Count, Utilities::BytesToText(e.ContentSize));
|
||||||
}
|
}
|
||||||
LOG(Info, "");
|
LOG(Info, "");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,17 +39,23 @@ bool DeployDataStep::Perform(CookingData& data)
|
|||||||
}
|
}
|
||||||
String dstDotnet = data.DataOutputPath / TEXT("Dotnet");
|
String dstDotnet = data.DataOutputPath / TEXT("Dotnet");
|
||||||
const DotNetAOTModes aotMode = data.Tools->UseAOT();
|
const DotNetAOTModes aotMode = data.Tools->UseAOT();
|
||||||
const bool usAOT = aotMode != DotNetAOTModes::None;
|
const bool usAOT = aotMode != DotNetAOTModes::None && aotMode != DotNetAOTModes::NoDotnet;
|
||||||
if (usAOT)
|
if (usAOT)
|
||||||
{
|
{
|
||||||
// Deploy Dotnet files into intermediate cooking directory for AOT
|
// Deploy Dotnet files into intermediate cooking directory for AOT
|
||||||
FileSystem::DeleteDirectory(dstDotnet);
|
FileSystem::DeleteDirectory(dstDotnet);
|
||||||
dstDotnet = data.ManagedCodeOutputPath;
|
dstDotnet = data.ManagedCodeOutputPath;
|
||||||
}
|
}
|
||||||
if (buildSettings.SkipDotnetPackaging && data.Tools->UseSystemDotnet())
|
if (aotMode == DotNetAOTModes::NoDotnet)
|
||||||
|
{
|
||||||
|
// No .NET
|
||||||
|
FileSystem::DeleteDirectory(dstDotnet);
|
||||||
|
}
|
||||||
|
else if (buildSettings.SkipDotnetPackaging && data.Tools->UseSystemDotnet())
|
||||||
{
|
{
|
||||||
// Use system-installed .NET Runtime
|
// Use system-installed .NET Runtime
|
||||||
FileSystem::DeleteDirectory(dstDotnet);
|
FileSystem::DeleteDirectory(dstDotnet);
|
||||||
|
LOG(Info, "Not using .NET Runtime");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -265,7 +271,7 @@ bool DeployDataStep::Perform(CookingData& data)
|
|||||||
}
|
}
|
||||||
if (version.IsEmpty())
|
if (version.IsEmpty())
|
||||||
{
|
{
|
||||||
data.Error(String::Format(TEXT("Failed to find supported .NET {} version (min {}) for the current host platform."), maxVer, minVer));
|
data.Error(String::Format(TEXT("Failed to find supported .NET {} version (min {}) for {} platform."), maxVer, minVer, platformName));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,9 @@
|
|||||||
void PrecompileAssembliesStep::OnBuildStarted(CookingData& data)
|
void PrecompileAssembliesStep::OnBuildStarted(CookingData& data)
|
||||||
{
|
{
|
||||||
const DotNetAOTModes aotMode = data.Tools->UseAOT();
|
const DotNetAOTModes aotMode = data.Tools->UseAOT();
|
||||||
if (aotMode == DotNetAOTModes::None || EnumHasAllFlags(data.Options, BuildOptions::NoCook))
|
if (aotMode == DotNetAOTModes::None ||
|
||||||
|
aotMode == DotNetAOTModes::NoDotnet ||
|
||||||
|
EnumHasAllFlags(data.Options, BuildOptions::NoCook))
|
||||||
return;
|
return;
|
||||||
const auto& buildSettings = *BuildSettings::Get();
|
const auto& buildSettings = *BuildSettings::Get();
|
||||||
|
|
||||||
@@ -49,7 +51,8 @@ void PrecompileAssembliesStep::OnBuildStarted(CookingData& data)
|
|||||||
bool PrecompileAssembliesStep::Perform(CookingData& data)
|
bool PrecompileAssembliesStep::Perform(CookingData& data)
|
||||||
{
|
{
|
||||||
const DotNetAOTModes aotMode = data.Tools->UseAOT();
|
const DotNetAOTModes aotMode = data.Tools->UseAOT();
|
||||||
if (aotMode == DotNetAOTModes::None)
|
if (aotMode == DotNetAOTModes::None ||
|
||||||
|
aotMode == DotNetAOTModes::NoDotnet)
|
||||||
return false;
|
return false;
|
||||||
const auto& buildSettings = *BuildSettings::Get();
|
const auto& buildSettings = *BuildSettings::Get();
|
||||||
if (buildSettings.SkipDotnetPackaging && data.Tools->UseSystemDotnet())
|
if (buildSettings.SkipDotnetPackaging && data.Tools->UseSystemDotnet())
|
||||||
@@ -59,6 +62,7 @@ bool PrecompileAssembliesStep::Perform(CookingData& data)
|
|||||||
data.StepProgress(infoMsg, 0);
|
data.StepProgress(infoMsg, 0);
|
||||||
|
|
||||||
// Override Newtonsoft.Json with AOT-version (one that doesn't use System.Reflection.Emit)
|
// Override Newtonsoft.Json with AOT-version (one that doesn't use System.Reflection.Emit)
|
||||||
|
// TODO: remove it since EngineModule does properly reference AOT lib now
|
||||||
EditorUtilities::CopyFileIfNewer(data.ManagedCodeOutputPath / TEXT("Newtonsoft.Json.dll"), Globals::StartupFolder / TEXT("Source/Platforms/DotNet/AOT/Newtonsoft.Json.dll"));
|
EditorUtilities::CopyFileIfNewer(data.ManagedCodeOutputPath / TEXT("Newtonsoft.Json.dll"), Globals::StartupFolder / TEXT("Source/Platforms/DotNet/AOT/Newtonsoft.Json.dll"));
|
||||||
FileSystem::DeleteFile(data.ManagedCodeOutputPath / TEXT("Newtonsoft.Json.xml"));
|
FileSystem::DeleteFile(data.ManagedCodeOutputPath / TEXT("Newtonsoft.Json.xml"));
|
||||||
FileSystem::DeleteFile(data.ManagedCodeOutputPath / TEXT("Newtonsoft.Json.pdb"));
|
FileSystem::DeleteFile(data.ManagedCodeOutputPath / TEXT("Newtonsoft.Json.pdb"));
|
||||||
|
|||||||
@@ -87,8 +87,11 @@ namespace FlaxEditor.CustomEditors
|
|||||||
var targetTypeType = TypeUtils.GetType(targetType);
|
var targetTypeType = TypeUtils.GetType(targetType);
|
||||||
if (canUseRefPicker)
|
if (canUseRefPicker)
|
||||||
{
|
{
|
||||||
|
// TODO: add generic way of CustomEditor for ref pickers (use it on AssetRefEditor/GPUTextureEditor/...)
|
||||||
if (typeof(Asset).IsAssignableFrom(targetTypeType))
|
if (typeof(Asset).IsAssignableFrom(targetTypeType))
|
||||||
return new AssetRefEditor();
|
return new AssetRefEditor();
|
||||||
|
if (typeof(GPUTexture).IsAssignableFrom(targetTypeType))
|
||||||
|
return new GPUTextureEditor();
|
||||||
if (typeof(FlaxEngine.Object).IsAssignableFrom(targetTypeType))
|
if (typeof(FlaxEngine.Object).IsAssignableFrom(targetTypeType))
|
||||||
return new FlaxObjectRefEditor();
|
return new FlaxObjectRefEditor();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
|||||||
public class AudioSourceEditor : ActorEditor
|
public class AudioSourceEditor : ActorEditor
|
||||||
{
|
{
|
||||||
private Label _infoLabel;
|
private Label _infoLabel;
|
||||||
|
private Slider _slider;
|
||||||
|
private AudioSource.States _slideStartState;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override void Initialize(LayoutElementsContainer layout)
|
public override void Initialize(LayoutElementsContainer layout)
|
||||||
@@ -28,6 +30,13 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
|||||||
_infoLabel = playbackGroup.Label(string.Empty).Label;
|
_infoLabel = playbackGroup.Label(string.Empty).Label;
|
||||||
_infoLabel.AutoHeight = true;
|
_infoLabel.AutoHeight = true;
|
||||||
|
|
||||||
|
// Play back slider
|
||||||
|
var sliderElement = playbackGroup.CustomContainer<Slider>();
|
||||||
|
_slider = sliderElement.CustomControl;
|
||||||
|
_slider.ThumbSize = new Float2(_slider.ThumbSize.X * 0.5f, _slider.ThumbSize.Y);
|
||||||
|
_slider.SlidingStart += OnSlidingStart;
|
||||||
|
_slider.SlidingEnd += OnSlidingEnd;
|
||||||
|
|
||||||
var grid = playbackGroup.UniformGrid();
|
var grid = playbackGroup.UniformGrid();
|
||||||
var gridControl = grid.CustomControl;
|
var gridControl = grid.CustomControl;
|
||||||
gridControl.ClipChildren = false;
|
gridControl.ClipChildren = false;
|
||||||
@@ -40,6 +49,38 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnSlidingEnd()
|
||||||
|
{
|
||||||
|
foreach (var value in Values)
|
||||||
|
{
|
||||||
|
if (value is AudioSource audioSource && audioSource.Clip)
|
||||||
|
{
|
||||||
|
switch (_slideStartState)
|
||||||
|
{
|
||||||
|
case AudioSource.States.Playing:
|
||||||
|
audioSource.Play();
|
||||||
|
break;
|
||||||
|
case AudioSource.States.Paused:
|
||||||
|
case AudioSource.States.Stopped:
|
||||||
|
audioSource.Pause();
|
||||||
|
break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnSlidingStart()
|
||||||
|
{
|
||||||
|
foreach (var value in Values)
|
||||||
|
{
|
||||||
|
if (value is AudioSource audioSource && audioSource.Clip)
|
||||||
|
{
|
||||||
|
_slideStartState = audioSource.State;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override void Refresh()
|
public override void Refresh()
|
||||||
{
|
{
|
||||||
@@ -51,7 +92,29 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
|||||||
foreach (var value in Values)
|
foreach (var value in Values)
|
||||||
{
|
{
|
||||||
if (value is AudioSource audioSource && audioSource.Clip)
|
if (value is AudioSource audioSource && audioSource.Clip)
|
||||||
|
{
|
||||||
text += $"Time: {audioSource.Time:##0.0}s / {audioSource.Clip.Length:##0.0}s\n";
|
text += $"Time: {audioSource.Time:##0.0}s / {audioSource.Clip.Length:##0.0}s\n";
|
||||||
|
_slider.Maximum = audioSource.Clip.Length;
|
||||||
|
_slider.Minimum = 0;
|
||||||
|
if (_slider.IsSliding)
|
||||||
|
{
|
||||||
|
if (audioSource.State != AudioSource.States.Playing)
|
||||||
|
{
|
||||||
|
// Play to move slider correctly
|
||||||
|
audioSource.Play();
|
||||||
|
audioSource.Time = _slider.Value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
audioSource.Time = _slider.Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_slider.Value = audioSource.Time;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_infoLabel.Text = text;
|
_infoLabel.Text = text;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) Wojciech Figat. All rights reserved.
|
// Copyright (c) Wojciech Figat. All rights reserved.
|
||||||
|
|
||||||
using FlaxEngine;
|
using FlaxEngine;
|
||||||
|
using FlaxEngine.GUI;
|
||||||
|
|
||||||
namespace FlaxEditor.CustomEditors.Dedicated
|
namespace FlaxEditor.CustomEditors.Dedicated
|
||||||
{
|
{
|
||||||
@@ -11,7 +12,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
|||||||
[CustomEditor(typeof(EnvironmentProbe)), DefaultEditor]
|
[CustomEditor(typeof(EnvironmentProbe)), DefaultEditor]
|
||||||
public class EnvironmentProbeEditor : ActorEditor
|
public class EnvironmentProbeEditor : ActorEditor
|
||||||
{
|
{
|
||||||
private FlaxEngine.GUI.Button _bake;
|
private Button _bake;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override void Initialize(LayoutElementsContainer layout)
|
public override void Initialize(LayoutElementsContainer layout)
|
||||||
@@ -20,9 +21,12 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
|||||||
|
|
||||||
if (Values.HasDifferentTypes == false)
|
if (Values.HasDifferentTypes == false)
|
||||||
{
|
{
|
||||||
layout.Space(10);
|
var group = layout.Group("Probe");
|
||||||
_bake = layout.Button("Bake").Button;
|
group.Panel.ItemsMargin = new Margin(Utilities.Constants.UIMargin * 2);
|
||||||
|
_bake = group.Button("Bake").Button;
|
||||||
_bake.Clicked += BakeButtonClicked;
|
_bake.Clicked += BakeButtonClicked;
|
||||||
|
var view = group.Button("View", "Opens the probe texture viewer");
|
||||||
|
view.Button.Clicked += OnViewButtonClicked;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,5 +52,14 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnViewButtonClicked()
|
||||||
|
{
|
||||||
|
foreach (var value in Values)
|
||||||
|
{
|
||||||
|
if (value is EnvironmentProbe probe && probe.ProbeAsset)
|
||||||
|
Editor.Instance.ContentEditing.Open(probe.ProbeAsset);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
68
Source/Editor/CustomEditors/Dedicated/GPUTextureEditor.cs
Normal file
68
Source/Editor/CustomEditors/Dedicated/GPUTextureEditor.cs
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
// Copyright (c) Wojciech Figat. All rights reserved.
|
||||||
|
|
||||||
|
using FlaxEditor.GUI.ContextMenu;
|
||||||
|
using FlaxEngine;
|
||||||
|
using FlaxEngine.GUI;
|
||||||
|
|
||||||
|
namespace FlaxEditor.CustomEditors.Dedicated
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Basic editor/viewer for <see cref="GPUTexture"/>.
|
||||||
|
/// </summary>
|
||||||
|
[CustomEditor(typeof(GPUTexture)), DefaultEditor]
|
||||||
|
public class GPUTextureEditor : CustomEditor
|
||||||
|
{
|
||||||
|
private Image _image;
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override DisplayStyle Style => DisplayStyle.Inline;
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override void Initialize(LayoutElementsContainer layout)
|
||||||
|
{
|
||||||
|
_image = new Image
|
||||||
|
{
|
||||||
|
Brush = new GPUTextureBrush(),
|
||||||
|
Size = new Float2(200, 100),
|
||||||
|
Parent = layout.ContainerControl,
|
||||||
|
};
|
||||||
|
_image.Clicked += OnImageClicked;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnImageClicked(Image image, MouseButton button)
|
||||||
|
{
|
||||||
|
var texture = Values[0] as GPUTexture;
|
||||||
|
if (!texture || button != MouseButton.Right)
|
||||||
|
return;
|
||||||
|
var menu = new ContextMenu();
|
||||||
|
menu.AddButton("Save...", () => Screenshot.Capture(Values[0] as GPUTexture));
|
||||||
|
menu.AddButton("Enlarge", () => _image.Size *= 2);
|
||||||
|
menu.AddButton("Shrink", () => _image.Size /= 2).Enabled = _image.Height > 32;
|
||||||
|
var location = image.PointFromScreen(Input.MouseScreenPosition);
|
||||||
|
menu.Show(image, location);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override void Refresh()
|
||||||
|
{
|
||||||
|
base.Refresh();
|
||||||
|
|
||||||
|
var texture = Values[0] as GPUTexture;
|
||||||
|
((GPUTextureBrush)_image.Brush).Texture = texture;
|
||||||
|
if (texture)
|
||||||
|
{
|
||||||
|
var desc = texture.Description;
|
||||||
|
#if BUILD_RELEASE
|
||||||
|
var name = string.Empty;
|
||||||
|
#else
|
||||||
|
var name = texture.Name;
|
||||||
|
#endif
|
||||||
|
_image.TooltipText = $"{name}\nType: {texture.ResourceType}\nSize: {desc.Width}x{desc.Height}\nFormat: {desc.Format}\nMemory: {Utilities.Utils.FormatBytesCount(texture.MemoryUsage)}";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_image.TooltipText = "None";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -195,7 +195,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
|||||||
filesCount += files.Length;
|
filesCount += files.Length;
|
||||||
foreach (var file in files)
|
foreach (var file in files)
|
||||||
FindNewKeysCpp(file, newKeys, allKeys);
|
FindNewKeysCpp(file, newKeys, allKeys);
|
||||||
files = Directory.GetFiles(Globals.ProjectSourceFolder, "*.h", SearchOption.AllDirectories).Concat(Directory.GetFiles(Globals.ProjectSourceFolder, "*.hpp", SearchOption.AllDirectories)).ToArray();;
|
files = Directory.GetFiles(Globals.ProjectSourceFolder, "*.h", SearchOption.AllDirectories).Concat(Directory.GetFiles(Globals.ProjectSourceFolder, "*.hpp", SearchOption.AllDirectories)).ToArray();
|
||||||
filesCount += files.Length;
|
filesCount += files.Length;
|
||||||
foreach (var file in files)
|
foreach (var file in files)
|
||||||
FindNewKeysCpp(file, newKeys, allKeys);
|
FindNewKeysCpp(file, newKeys, allKeys);
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
// Copyright (c) Wojciech Figat. All rights reserved.
|
||||||
|
|
||||||
|
using FlaxEngine;
|
||||||
|
|
||||||
|
namespace FlaxEditor.CustomEditors.Dedicated
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Custom editor for <see cref="NavMeshBoundsVolume"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="ActorEditor" />
|
||||||
|
[CustomEditor(typeof(NavMeshBoundsVolume)), DefaultEditor]
|
||||||
|
internal class NavMeshBoundsVolumeEditor : ActorEditor
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override void Initialize(LayoutElementsContainer layout)
|
||||||
|
{
|
||||||
|
base.Initialize(layout);
|
||||||
|
|
||||||
|
if (Values.HasDifferentTypes == false)
|
||||||
|
{
|
||||||
|
var button = layout.Button("Build");
|
||||||
|
button.Button.Clicked += OnBuildClicked;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnBuildClicked()
|
||||||
|
{
|
||||||
|
foreach (var value in Values)
|
||||||
|
{
|
||||||
|
if (value is NavMeshBoundsVolume volume)
|
||||||
|
{
|
||||||
|
Navigation.BuildNavMesh(volume.Box, volume.Scene);
|
||||||
|
Editor.Instance.Scene.MarkSceneEdited(volume.Scene);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
// Copyright (c) Wojciech Figat. All rights reserved.
|
// Copyright (c) Wojciech Figat. All rights reserved.
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection.Emit;
|
|
||||||
using FlaxEditor.CustomEditors.GUI;
|
using FlaxEditor.CustomEditors.GUI;
|
||||||
using FlaxEngine;
|
using FlaxEngine;
|
||||||
using FlaxEngine.GUI;
|
using FlaxEngine.GUI;
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
|||||||
{
|
{
|
||||||
ScriptName = scriptName;
|
ScriptName = scriptName;
|
||||||
TooltipText = "Create a new script";
|
TooltipText = "Create a new script";
|
||||||
|
DrawHighlights = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,7 +71,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
|||||||
var buttonHeight = (textSize.Y < 18) ? 18 : textSize.Y + 4;
|
var buttonHeight = (textSize.Y < 18) ? 18 : textSize.Y + 4;
|
||||||
_addScriptsButton = new Button
|
_addScriptsButton = new Button
|
||||||
{
|
{
|
||||||
TooltipText = "Add new scripts to the actor",
|
TooltipText = "Add new scripts to the actor.",
|
||||||
AnchorPreset = AnchorPresets.MiddleCenter,
|
AnchorPreset = AnchorPresets.MiddleCenter,
|
||||||
Text = buttonText,
|
Text = buttonText,
|
||||||
Parent = this,
|
Parent = this,
|
||||||
@@ -114,7 +115,16 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
|||||||
cm.TextChanged += text =>
|
cm.TextChanged += text =>
|
||||||
{
|
{
|
||||||
if (!IsValidScriptName(text))
|
if (!IsValidScriptName(text))
|
||||||
|
{
|
||||||
|
// Remove NewScriptItems
|
||||||
|
List<Control> newScriptItems = cm.ItemsPanel.Children.FindAll(c => c is NewScriptItem);
|
||||||
|
foreach (var item in newScriptItems)
|
||||||
|
{
|
||||||
|
cm.ItemsPanel.RemoveChild(item);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
if (!cm.ItemsPanel.Children.Any(x => x.Visible && x is not NewScriptItem))
|
if (!cm.ItemsPanel.Children.Any(x => x.Visible && x is not NewScriptItem))
|
||||||
{
|
{
|
||||||
// If there are no visible items, that means the search failed so we can find the create script button or create one if it's the first time
|
// If there are no visible items, that means the search failed so we can find the create script button or create one if it's the first time
|
||||||
@@ -876,7 +886,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
|||||||
// Add drag button to the group
|
// Add drag button to the group
|
||||||
var scriptDrag = new DragImage
|
var scriptDrag = new DragImage
|
||||||
{
|
{
|
||||||
TooltipText = "Script reference",
|
TooltipText = "Script reference.",
|
||||||
AutoFocus = true,
|
AutoFocus = true,
|
||||||
IsScrollable = false,
|
IsScrollable = false,
|
||||||
Color = FlaxEngine.GUI.Style.Current.ForegroundGrey,
|
Color = FlaxEngine.GUI.Style.Current.ForegroundGrey,
|
||||||
@@ -899,14 +909,17 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
|||||||
settingsButton.Tag = script;
|
settingsButton.Tag = script;
|
||||||
settingsButton.Clicked += OnSettingsButtonClicked;
|
settingsButton.Clicked += OnSettingsButtonClicked;
|
||||||
|
|
||||||
group.Panel.HeaderTextMargin = new Margin(scriptDrag.Right - 12, 15, 2, 2);
|
// Adjust margin to not overlap with other ui elements in the header
|
||||||
|
group.Panel.HeaderTextMargin = group.Panel.HeaderTextMargin with { Left = scriptDrag.Right - 12, Right = settingsButton.Width + Utilities.Constants.UIMargin };
|
||||||
group.Object(values, editor);
|
group.Object(values, editor);
|
||||||
// Remove drop down arrows and containment lines if no objects in the group
|
// Remove drop down arrows and containment lines if no objects in the group
|
||||||
if (group.Children.Count == 0)
|
if (group.Children.Count == 0)
|
||||||
{
|
{
|
||||||
|
group.Panel.Close();
|
||||||
group.Panel.ArrowImageOpened = null;
|
group.Panel.ArrowImageOpened = null;
|
||||||
group.Panel.ArrowImageClosed = null;
|
group.Panel.ArrowImageClosed = null;
|
||||||
group.Panel.EnableContainmentLines = false;
|
group.Panel.EnableContainmentLines = false;
|
||||||
|
group.Panel.CanOpenClose = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scripts arrange bar
|
// Scripts arrange bar
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) Wojciech Figat. All rights reserved.
|
// Copyright (c) Wojciech Figat. All rights reserved.
|
||||||
|
|
||||||
using FlaxEngine;
|
using FlaxEngine;
|
||||||
|
using FlaxEngine.GUI;
|
||||||
|
|
||||||
namespace FlaxEditor.CustomEditors.Dedicated
|
namespace FlaxEditor.CustomEditors.Dedicated
|
||||||
{
|
{
|
||||||
@@ -19,8 +20,9 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
|||||||
if (Values.HasDifferentTypes == false)
|
if (Values.HasDifferentTypes == false)
|
||||||
{
|
{
|
||||||
// Add 'Bake' button
|
// Add 'Bake' button
|
||||||
layout.Space(10);
|
var group = layout.Group("Bake");
|
||||||
var button = layout.Button("Bake");
|
group.Panel.ItemsMargin = new Margin(Utilities.Constants.UIMargin * 2);
|
||||||
|
var button = group.Button("Bake");
|
||||||
button.Button.Clicked += BakeButtonClicked;
|
button.Button.Clicked += BakeButtonClicked;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,6 +123,8 @@ namespace FlaxEditor.CustomEditors.Editors
|
|||||||
{
|
{
|
||||||
base.Refresh();
|
base.Refresh();
|
||||||
|
|
||||||
|
if (Picker == null)
|
||||||
|
return;
|
||||||
var differentValues = HasDifferentValues;
|
var differentValues = HasDifferentValues;
|
||||||
Picker.DifferentValues = differentValues;
|
Picker.DifferentValues = differentValues;
|
||||||
if (!differentValues)
|
if (!differentValues)
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
|||||||
|
|
||||||
menu.AddButton("Copy", linkedEditor.Copy);
|
menu.AddButton("Copy", linkedEditor.Copy);
|
||||||
var b = menu.AddButton("Duplicate", () => Editor.Duplicate(Index));
|
var b = menu.AddButton("Duplicate", () => Editor.Duplicate(Index));
|
||||||
b.Enabled = linkedEditor.CanPaste && !Editor._readOnly;
|
b.Enabled = !Editor._readOnly && Editor._canResize;
|
||||||
b = menu.AddButton("Paste", linkedEditor.Paste);
|
b = menu.AddButton("Paste", linkedEditor.Paste);
|
||||||
b.Enabled = linkedEditor.CanPaste && !Editor._readOnly;
|
b.Enabled = linkedEditor.CanPaste && !Editor._readOnly;
|
||||||
|
|
||||||
@@ -407,7 +407,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
|||||||
|
|
||||||
menu.AddButton("Copy", linkedEditor.Copy);
|
menu.AddButton("Copy", linkedEditor.Copy);
|
||||||
var b = menu.AddButton("Duplicate", () => Editor.Duplicate(Index));
|
var b = menu.AddButton("Duplicate", () => Editor.Duplicate(Index));
|
||||||
b.Enabled = linkedEditor.CanPaste && !Editor._readOnly;
|
b.Enabled = !Editor._readOnly && Editor._canResize;
|
||||||
var paste = menu.AddButton("Paste", linkedEditor.Paste);
|
var paste = menu.AddButton("Paste", linkedEditor.Paste);
|
||||||
paste.Enabled = linkedEditor.CanPaste && !Editor._readOnly;
|
paste.Enabled = linkedEditor.CanPaste && !Editor._readOnly;
|
||||||
|
|
||||||
@@ -422,7 +422,8 @@ namespace FlaxEditor.CustomEditors.Editors
|
|||||||
moveDownButton.Enabled = Index + 1 < Editor.Count;
|
moveDownButton.Enabled = Index + 1 < Editor.Count;
|
||||||
}
|
}
|
||||||
|
|
||||||
menu.AddButton("Remove", OnRemoveClicked);
|
b = menu.AddButton("Remove", OnRemoveClicked);
|
||||||
|
b.Enabled = !Editor._readOnly && Editor._canResize;
|
||||||
|
|
||||||
menu.Show(panel, location);
|
menu.Show(panel, location);
|
||||||
}
|
}
|
||||||
@@ -449,6 +450,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
|||||||
protected bool NotNullItems;
|
protected bool NotNullItems;
|
||||||
|
|
||||||
private IntValueBox _sizeBox;
|
private IntValueBox _sizeBox;
|
||||||
|
private Label _label;
|
||||||
private Color _background;
|
private Color _background;
|
||||||
private int _elementsCount, _minCount, _maxCount;
|
private int _elementsCount, _minCount, _maxCount;
|
||||||
private bool _readOnly;
|
private bool _readOnly;
|
||||||
@@ -565,7 +567,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
|||||||
Parent = dropPanel,
|
Parent = dropPanel,
|
||||||
};
|
};
|
||||||
|
|
||||||
var label = new Label
|
_label = new Label
|
||||||
{
|
{
|
||||||
Text = "Size",
|
Text = "Size",
|
||||||
AnchorPreset = AnchorPresets.TopRight,
|
AnchorPreset = AnchorPresets.TopRight,
|
||||||
@@ -591,11 +593,12 @@ namespace FlaxEditor.CustomEditors.Editors
|
|||||||
panel.Panel.Offsets = new Margin(7, 7, 0, 0);
|
panel.Panel.Offsets = new Margin(7, 7, 0, 0);
|
||||||
panel.Panel.BackgroundColor = _background;
|
panel.Panel.BackgroundColor = _background;
|
||||||
var elementType = ElementType;
|
var elementType = ElementType;
|
||||||
|
var bindingAttr = System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public;
|
||||||
bool single = elementType.IsPrimitive ||
|
bool single = elementType.IsPrimitive ||
|
||||||
elementType.Equals(new ScriptType(typeof(string))) ||
|
elementType.Equals(new ScriptType(typeof(string))) ||
|
||||||
elementType.IsEnum ||
|
elementType.IsEnum ||
|
||||||
(elementType.GetFields().Length == 1 && elementType.GetProperties().Length == 0) ||
|
(elementType.GetFields(bindingAttr).Length == 1 && elementType.GetProperties(bindingAttr).Length == 0) ||
|
||||||
(elementType.GetProperties().Length == 1 && elementType.GetFields().Length == 0) ||
|
(elementType.GetProperties(bindingAttr).Length == 1 && elementType.GetFields(bindingAttr).Length == 0) ||
|
||||||
elementType.Equals(new ScriptType(typeof(JsonAsset))) ||
|
elementType.Equals(new ScriptType(typeof(JsonAsset))) ||
|
||||||
elementType.Equals(new ScriptType(typeof(SettingsBase)));
|
elementType.Equals(new ScriptType(typeof(SettingsBase)));
|
||||||
if (_cachedDropPanels == null)
|
if (_cachedDropPanels == null)
|
||||||
@@ -649,7 +652,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
|||||||
panel.Panel.Size = new Float2(0, 18);
|
panel.Panel.Size = new Float2(0, 18);
|
||||||
panel.Panel.Margin = new Margin(0, 0, Utilities.Constants.UIMargin, 0);
|
panel.Panel.Margin = new Margin(0, 0, Utilities.Constants.UIMargin, 0);
|
||||||
|
|
||||||
var removeButton = panel.Button("-", "Remove the last item");
|
var removeButton = panel.Button("-", "Remove the last item.");
|
||||||
removeButton.Button.Size = new Float2(16, 16);
|
removeButton.Button.Size = new Float2(16, 16);
|
||||||
removeButton.Button.Enabled = size > _minCount;
|
removeButton.Button.Enabled = size > _minCount;
|
||||||
removeButton.Button.AnchorPreset = AnchorPresets.TopRight;
|
removeButton.Button.AnchorPreset = AnchorPresets.TopRight;
|
||||||
@@ -660,7 +663,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
|||||||
Resize(Count - 1);
|
Resize(Count - 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
var addButton = panel.Button("+", "Add a new item");
|
var addButton = panel.Button("+", "Add a new item.");
|
||||||
addButton.Button.Size = new Float2(16, 16);
|
addButton.Button.Size = new Float2(16, 16);
|
||||||
addButton.Button.Enabled = (!NotNullItems || size > 0) && size < _maxCount;
|
addButton.Button.Enabled = (!NotNullItems || size > 0) && size < _maxCount;
|
||||||
addButton.Button.AnchorPreset = AnchorPresets.TopRight;
|
addButton.Button.AnchorPreset = AnchorPresets.TopRight;
|
||||||
@@ -671,8 +674,10 @@ namespace FlaxEditor.CustomEditors.Editors
|
|||||||
Resize(Count + 1);
|
Resize(Count + 1);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
Layout.ContainerControl.SizeChanged += OnLayoutSizeChanged;
|
||||||
|
}
|
||||||
|
|
||||||
private void OnSetupContextMenu(ContextMenu menu, DropPanel panel)
|
private void OnSetupContextMenu(ContextMenu menu, DropPanel panel)
|
||||||
{
|
{
|
||||||
if (menu.Items.Any(x => x is ContextMenuButton b && b.Text.Equals("Open All", StringComparison.Ordinal)))
|
if (menu.Items.Any(x => x is ContextMenuButton b && b.Text.Equals("Open All", StringComparison.Ordinal)))
|
||||||
@@ -695,10 +700,24 @@ namespace FlaxEditor.CustomEditors.Editors
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnLayoutSizeChanged(Control control)
|
||||||
|
{
|
||||||
|
if (Layout.ContainerControl is DropPanel dropPanel)
|
||||||
|
{
|
||||||
|
// Hide "Size" text when array editor title overlaps
|
||||||
|
var headerTextSize = dropPanel.HeaderTextFont.GetFont().MeasureText(dropPanel.HeaderText);
|
||||||
|
if (headerTextSize.X + DropPanel.DropDownIconSize >= _label.Left)
|
||||||
|
_label.TextColor = _label.TextColorHighlighted = Color.Transparent;
|
||||||
|
else
|
||||||
|
_label.TextColor = _label.TextColorHighlighted = FlaxEngine.GUI.Style.Current.Foreground;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Deinitialize()
|
protected override void Deinitialize()
|
||||||
{
|
{
|
||||||
_sizeBox = null;
|
_sizeBox = null;
|
||||||
|
Layout.ContainerControl.SizeChanged -= OnLayoutSizeChanged;
|
||||||
|
|
||||||
base.Deinitialize();
|
base.Deinitialize();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ namespace FlaxEditor.CustomEditors.Editors
|
|||||||
return inputEvent;
|
return inputEvent;
|
||||||
if (Values[0] is string str)
|
if (Values[0] is string str)
|
||||||
return str;
|
return str;
|
||||||
|
if (Values.Type.Type == typeof(InputEvent))
|
||||||
|
return new InputEvent();
|
||||||
if (Values.Type.Type == typeof(string))
|
if (Values.Type.Type == typeof(string))
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using FlaxEditor.GUI;
|
using FlaxEditor.GUI;
|
||||||
using FlaxEditor.Scripting;
|
using FlaxEditor.Scripting;
|
||||||
|
using FlaxEngine;
|
||||||
using FlaxEngine.Utilities;
|
using FlaxEngine.Utilities;
|
||||||
|
|
||||||
namespace FlaxEditor.CustomEditors.Editors
|
namespace FlaxEditor.CustomEditors.Editors
|
||||||
@@ -81,9 +82,13 @@ namespace FlaxEditor.CustomEditors.Editors
|
|||||||
|
|
||||||
private OptionType[] _options;
|
private OptionType[] _options;
|
||||||
private ScriptType _type;
|
private ScriptType _type;
|
||||||
|
private Elements.PropertiesListElement _typeItem;
|
||||||
|
|
||||||
private ScriptType Type => Values[0] == null ? Values.Type : TypeUtils.GetObjectType(Values[0]);
|
private ScriptType Type => Values[0] == null ? Values.Type : TypeUtils.GetObjectType(Values[0]);
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override bool RevertValueWithChildren => false; // Always revert value for a whole object
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override void Initialize(LayoutElementsContainer layout)
|
public override void Initialize(LayoutElementsContainer layout)
|
||||||
{
|
{
|
||||||
@@ -98,7 +103,8 @@ namespace FlaxEditor.CustomEditors.Editors
|
|||||||
_type = type;
|
_type = type;
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
var typeEditor = layout.ComboBox(TypeComboBoxName, "Type of the object value. Use it to change the object.");
|
_typeItem = layout.AddPropertyItem(TypeComboBoxName, "Type of the object value. Use it to change the object.");
|
||||||
|
var typeEditor = _typeItem.ComboBox();
|
||||||
for (int i = 0; i < _options.Length; i++)
|
for (int i = 0; i < _options.Length; i++)
|
||||||
{
|
{
|
||||||
typeEditor.ComboBox.AddItem(_options[i].Name);
|
typeEditor.ComboBox.AddItem(_options[i].Name);
|
||||||
@@ -126,6 +132,8 @@ namespace FlaxEditor.CustomEditors.Editors
|
|||||||
|
|
||||||
// Value
|
// Value
|
||||||
var values = new CustomValueContainer(type, (instance, index) => instance);
|
var values = new CustomValueContainer(type, (instance, index) => instance);
|
||||||
|
if (Values.HasReferenceValue)
|
||||||
|
values.SetReferenceValue(Values.ReferenceValue);
|
||||||
values.AddRange(Values);
|
values.AddRange(Values);
|
||||||
var editor = CustomEditorsUtil.CreateEditor(type);
|
var editor = CustomEditorsUtil.CreateEditor(type);
|
||||||
var style = editor.Style;
|
var style = editor.Style;
|
||||||
@@ -170,6 +178,12 @@ namespace FlaxEditor.CustomEditors.Editors
|
|||||||
{
|
{
|
||||||
base.Refresh();
|
base.Refresh();
|
||||||
|
|
||||||
|
// Show prefab diff when reference value type is different
|
||||||
|
var color = Color.Transparent;
|
||||||
|
if (Values.HasReferenceValue && CanRevertReferenceValue && Values[0]?.GetType() != Values.ReferenceValue?.GetType())
|
||||||
|
color = FlaxEngine.GUI.Style.Current.BackgroundSelected;
|
||||||
|
_typeItem.Labels[0].HighlightStripColor = color;
|
||||||
|
|
||||||
// Check if type has been modified outside the editor (eg. from code)
|
// Check if type has been modified outside the editor (eg. from code)
|
||||||
if (Type != _type)
|
if (Type != _type)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
|||||||
public event Action<TypePickerControl> TypePickerValueChanged;
|
public event Action<TypePickerControl> TypePickerValueChanged;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The custom callback for types validation. Cane be used to implement a rule for types to pick.
|
/// The custom callback for types validation. Can be used to implement a rule for types to pick.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Func<ScriptType, bool> CheckValid;
|
public Func<ScriptType, bool> CheckValid;
|
||||||
|
|
||||||
@@ -353,7 +353,13 @@ namespace FlaxEditor.CustomEditors.Editors
|
|||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(typeReference.CheckMethod))
|
if (!string.IsNullOrEmpty(typeReference.CheckMethod))
|
||||||
{
|
{
|
||||||
var parentType = ParentEditor.Values[0].GetType();
|
var parentEditor = ParentEditor;
|
||||||
|
// Find actual parent editor if parent editor is collection editor
|
||||||
|
while (parentEditor.GetType().IsAssignableTo(typeof(CollectionEditor)))
|
||||||
|
parentEditor = parentEditor.ParentEditor;
|
||||||
|
|
||||||
|
var parentType = parentEditor.Values[0].GetType();
|
||||||
|
|
||||||
var method = parentType.GetMethod(typeReference.CheckMethod, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
|
var method = parentType.GetMethod(typeReference.CheckMethod, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
|
||||||
if (method != null)
|
if (method != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -44,7 +44,8 @@ namespace FlaxEditor.CustomEditors.Elements
|
|||||||
{
|
{
|
||||||
var style = Style.Current;
|
var style = Style.Current;
|
||||||
var settingsButtonSize = Panel.HeaderHeight;
|
var settingsButtonSize = Panel.HeaderHeight;
|
||||||
return new Image
|
Panel.HeaderTextMargin = Panel.HeaderTextMargin with { Right = settingsButtonSize + Utilities.Constants.UIMargin };
|
||||||
|
; return new Image
|
||||||
{
|
{
|
||||||
TooltipText = "Settings",
|
TooltipText = "Settings",
|
||||||
AutoFocus = true,
|
AutoFocus = true,
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ public class Editor : EditorModule
|
|||||||
AddPlatformTools(options, platformToolsRoot, platformToolsRootExternal, "Android", "PLATFORM_TOOLS_ANDROID");
|
AddPlatformTools(options, platformToolsRoot, platformToolsRootExternal, "Android", "PLATFORM_TOOLS_ANDROID");
|
||||||
AddPlatformTools(options, platformToolsRoot, platformToolsRootExternal, "iOS", "PLATFORM_TOOLS_IOS");
|
AddPlatformTools(options, platformToolsRoot, platformToolsRootExternal, "iOS", "PLATFORM_TOOLS_IOS");
|
||||||
}
|
}
|
||||||
|
AddPlatformTools(options, platformToolsRoot, platformToolsRootExternal, "Web", "PLATFORM_TOOLS_WEB");
|
||||||
|
|
||||||
// Visual Studio integration
|
// Visual Studio integration
|
||||||
if (options.Platform.Target == TargetPlatform.Windows && Flax.Build.Platform.BuildTargetPlatform == TargetPlatform.Windows)
|
if (options.Platform.Target == TargetPlatform.Windows && Flax.Build.Platform.BuildTargetPlatform == TargetPlatform.Windows)
|
||||||
|
|||||||
@@ -268,8 +268,8 @@ bool Editor::CheckProjectUpgrade()
|
|||||||
// Check if last version was older
|
// Check if last version was older
|
||||||
else if (lastVersion.Major < FLAXENGINE_VERSION_MAJOR || (lastVersion.Major == FLAXENGINE_VERSION_MAJOR && lastVersion.Minor < FLAXENGINE_VERSION_MINOR))
|
else if (lastVersion.Major < FLAXENGINE_VERSION_MAJOR || (lastVersion.Major == FLAXENGINE_VERSION_MAJOR && lastVersion.Minor < FLAXENGINE_VERSION_MINOR))
|
||||||
{
|
{
|
||||||
LOG(Warning, "The project was opened with the older editor version last time");
|
LOG(Warning, "The project was last opened with an older editor version");
|
||||||
const auto result = MessageBox::Show(TEXT("The project was opened with the older editor version last time. Loading it may modify existing data so older editor version won't open it. Do you want to perform a backup before or cancel operation?"), TEXT("Project upgrade"), MessageBoxButtons::YesNoCancel, MessageBoxIcon::Question);
|
const auto result = MessageBox::Show(TEXT("The project was last opened with an older editor version.\nLoading it may modify existing data, which can result in older editor versions being unable to open it.\n\nDo you want to perform a backup before or cancel the operation?"), TEXT("Project upgrade"), MessageBoxButtons::YesNoCancel, MessageBoxIcon::Question);
|
||||||
if (result == DialogResult::Yes)
|
if (result == DialogResult::Yes)
|
||||||
{
|
{
|
||||||
if (BackupProject())
|
if (BackupProject())
|
||||||
@@ -291,8 +291,8 @@ bool Editor::CheckProjectUpgrade()
|
|||||||
// Check if last version was newer
|
// Check if last version was newer
|
||||||
else if (lastVersion.Major > FLAXENGINE_VERSION_MAJOR || (lastVersion.Major == FLAXENGINE_VERSION_MAJOR && lastVersion.Minor > FLAXENGINE_VERSION_MINOR))
|
else if (lastVersion.Major > FLAXENGINE_VERSION_MAJOR || (lastVersion.Major == FLAXENGINE_VERSION_MAJOR && lastVersion.Minor > FLAXENGINE_VERSION_MINOR))
|
||||||
{
|
{
|
||||||
LOG(Warning, "The project was opened with the newer editor version last time");
|
LOG(Warning, "The project was last opened with a newer editor version");
|
||||||
const auto result = MessageBox::Show(TEXT("The project was opened with the newer editor version last time. Loading it may fail and corrupt existing data. Do you want to perform a backup before or cancel operation?"), TEXT("Project upgrade"), MessageBoxButtons::YesNoCancel, MessageBoxIcon::Warning);
|
const auto result = MessageBox::Show(TEXT("The project was last opened with a newer editor version.\nLoading it may fail and corrupt existing data.\n\nDo you want to perform a backup before loading or cancel the operation?"), TEXT("Project upgrade"), MessageBoxButtons::YesNoCancel, MessageBoxIcon::Warning);
|
||||||
if (result == DialogResult::Yes)
|
if (result == DialogResult::Yes)
|
||||||
{
|
{
|
||||||
if (BackupProject())
|
if (BackupProject())
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user