Compare commits
1027 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c328d2b559 | |||
| 65747c9ddf | |||
| d4a4ae996e | |||
| e312485a34 | |||
| 7dfe709196 | |||
| 759845c37b | |||
| 5e3fe56aa7 | |||
| 4b506560e9 | |||
| 330c46b949 | |||
| b29d1f9902 | |||
| 15f60b33b1 | |||
| 1a54ea82b5 | |||
| 949bc67354 | |||
| d816af41b4 | |||
| a7880d73f3 | |||
| ac21c4d1e7 | |||
| ed8a10f276 | |||
| 8b8a83eb20 | |||
| 890ea38470 | |||
| 07d06c74b5 | |||
| ec18b01ef7 | |||
| 7a1817b099 | |||
| a2782515a2 | |||
| 9deb021a5e | |||
| 0bbb72e24d | |||
| 7656cf541d | |||
| d77ad33583 | |||
| 6f5605b7ca | |||
| 718ae78036 | |||
| f6eef82864 | |||
| 26d37103ba | |||
| d85c65bfc5 | |||
| 1943c64a33 | |||
| 9c1fa7c0ce | |||
| 14068307d1 | |||
| 670e48ec1c | |||
| e288104472 | |||
| 99b0cf71a8 | |||
| 2b7e6944e8 | |||
| 9e7ce69e9c | |||
| 8c97a645e9 | |||
| d194a06e59 | |||
| 783372c787 | |||
| 51016949b8 | |||
| 128cad49b9 | |||
| 65f9e9d0aa | |||
| 36df9757b1 | |||
| a0e1c7c37e | |||
| 847641f655 | |||
| cdca5b4a28 | |||
| 6609425880 | |||
| 6ac0d5d3f4 | |||
| bc46259286 | |||
| 50bccd52e7 | |||
| 84cca1ae98 | |||
| 71cf758ccf | |||
| edf98acae2 | |||
| a085531fda | |||
| 6b532d2fbc | |||
| 7862ff4670 | |||
| bc27890818 | |||
| 1c5754beff | |||
| 054def3d13 | |||
| e6d5d5330e | |||
| f430803ecc | |||
| fc762fdbdb | |||
| 6908aa4a8a | |||
| 6c70f2e14f | |||
| 3bc489a7b5 | |||
| d22380c7cf | |||
| c4102ba884 | |||
| baee3a60a6 | |||
| 5e2b4adff3 | |||
| 78d668c599 | |||
| e8b867430f | |||
| 1426b4ca49 | |||
| 9682ac4643 | |||
| d95cd24b76 | |||
| 25f48a3469 | |||
| 1b3c74c3eb | |||
| 425c23fea1 | |||
| 16654fa639 | |||
| 8c010a8a96 | |||
| bf2171ed74 | |||
| fae682e406 | |||
| c5b9654547 | |||
| a64d23b8ed | |||
| b4d879960f | |||
| 456a944482 | |||
| 23e94a259b | |||
| cb5c716fdb | |||
| 980aa860fc | |||
| 080b3b1136 | |||
| fc8c8b5c25 | |||
| 41b7897857 | |||
| 04c807aea5 | |||
| 1c9abef342 | |||
| 9464c509fa | |||
| 6ee6c8e0be | |||
| c9b87d9b76 | |||
| b5d2b39c3e | |||
| d4817a95d7 | |||
| 37cfe692f6 | |||
| 0e76bf22ed | |||
| f06054bc9d | |||
| 9012397593 | |||
| 429223c7e3 | |||
| 16c656cda2 | |||
| e1cac0b779 | |||
| 25487c17e3 | |||
| 563eecebda | |||
| c2de55f005 | |||
| 22551e9410 | |||
| c4a0b1c4d6 | |||
| e970d53787 | |||
| 752dc30cc5 | |||
| d8f555e8dc | |||
| 24782bdd2f | |||
| ee6ef85326 | |||
| 22d547e87b | |||
| ad7f5cf720 | |||
| 19da74f913 | |||
| 1f59c43b04 | |||
| f42d2b8a18 | |||
| 92b1e067b1 | |||
| 84f48e4a6f | |||
| fcd0841bc7 | |||
| 38249c362d | |||
| 5186cec942 | |||
| d505160444 | |||
| 3331753bcd | |||
| 0d9852be27 | |||
| 4c0435feef | |||
| efe898f151 | |||
| a713899a36 | |||
| 277e31c5dd | |||
| 2050429d6c | |||
| 6718b37ca1 | |||
| caaae8af78 | |||
| 135c0636bf | |||
| f49e20bdb5 | |||
| 9476a75f40 | |||
| 974fb528e9 | |||
| 9cde9b0743 | |||
| 91be427305 | |||
| 46a65f99fa | |||
| a7a7d816ac | |||
| 970456da91 | |||
| 1e6d4026da | |||
| e92bdf164c | |||
| 0bd41a748f | |||
| 6eea2cc675 | |||
| 2bf736e351 | |||
| 3a5c212985 | |||
| 383ea4d603 | |||
| b7a7bc891a | |||
| d26eabe2bf | |||
| 5a6853ba32 | |||
| 99eb3447ef | |||
| 36456bfe74 | |||
| cb21ff359b | |||
| 0794ab4ee5 | |||
| 88902bdb5d | |||
| 669b99f8e4 | |||
| 929bd2a8c8 | |||
| 5cbf091a7a | |||
| 09c7642819 | |||
| f7e47815ae | |||
| 3207d2a706 | |||
| 2c68c4f9f2 | |||
| fc31565f12 | |||
| 681c45dcbe | |||
| ba266f74ed | |||
| 36f6463028 | |||
| 4d136af7dd | |||
| dcd4a41f7d | |||
| 590ef32165 | |||
| cb59f2185c | |||
| 5f26fae19b | |||
| af1c683917 | |||
| 52ba7a7a08 | |||
| d0eed29f31 | |||
| 5852887e7d | |||
| 41a39d5088 | |||
| af8856188d | |||
| 8ae3c23ec8 | |||
| 73c283fdd4 | |||
| 2354bc9f4d | |||
| 4f03acb149 | |||
| 2711bfdc82 | |||
| fe2419cd11 | |||
| 27deeff079 | |||
| 50ffdcd9ca | |||
| 1062c0b3a0 | |||
| 6f8e18f5b3 | |||
| 42f05a5072 | |||
| 04c6ecc963 | |||
| 151b478a97 | |||
| 4fc55f4849 | |||
| 5b595eb056 | |||
| d7cca59315 | |||
| a7cb12f597 | |||
| 8b961f7239 | |||
| 8a66bd74cf | |||
| 7c96961e92 | |||
| dc935a1a32 | |||
| caeeae6a32 | |||
| e0be4e202a | |||
| 1ba84f55ae | |||
| 120ebbb59a | |||
| 0b9f33b4af | |||
| 1c03b21a43 | |||
| 38e2824415 | |||
| 16f7194f62 | |||
| ef163b80a7 | |||
| 121b08801a | |||
| 0a47477290 | |||
| 716b726589 | |||
| 27345e62a7 | |||
| 612d586e88 | |||
| a33b76f47f | |||
| 7d86aebf9c | |||
| 252b37ebfe | |||
| 1561eba6fb | |||
| 2783eb07b2 | |||
| c6e320b4aa | |||
| e95010b1b2 | |||
| 91cf85c50e | |||
| 8a003fbe99 | |||
| 0da56856e0 | |||
| 7fc3e65849 | |||
| 4fee75cf55 | |||
| a59429c954 | |||
| a928032f44 | |||
| 0515e41d89 | |||
| 8da7a17a66 | |||
| f052d788fe | |||
| 1eda04f695 | |||
| 929476a322 | |||
| e6ffcfb60d | |||
| d5db9dd00c | |||
| d86dfbb973 | |||
| 38bf3d87ed | |||
| 4765e1af12 | |||
| f5e5686853 | |||
| 446458d20c | |||
| 29be6b0068 | |||
| 254ce569fa | |||
| a3b3e6c799 | |||
| b149d91c35 | |||
| e62c76b0fb | |||
| 7e9f648a05 | |||
| f41e4c5fe1 | |||
| d1b7b2d26d | |||
| d7b47d7d05 | |||
| 6938821467 | |||
| afc5bb5731 | |||
| ec40a9ba75 | |||
| 3ae4a800cf | |||
| ecff38d58d | |||
| 2865cecca9 | |||
| d17a4af72e | |||
| 3cfdf8871f | |||
| 7985196155 | |||
| 6471f880ac | |||
| 6a2e833fca | |||
| e44bca597c | |||
| 248e35c121 | |||
| 9f9e5b49cc | |||
| bf67c62311 | |||
| a165b4aa79 | |||
| 9f9d946d69 | |||
| 1c012a202e | |||
| 43e5805e50 | |||
| 687fa325fa | |||
| 2585c02b68 | |||
| a84afc207e | |||
| 347bd7346a | |||
| a9acf733d9 | |||
| 44c4ab6580 | |||
| fe2e17e353 | |||
| c93c811375 | |||
| ba725f5456 | |||
| 2deac50c53 | |||
| d7332509f7 | |||
| e61ebaa71b | |||
| d9fe1b257f | |||
| 93838b4f25 | |||
| 98d29ff5dc | |||
| 85398cbf3d | |||
| 2556edb8d3 | |||
| b367be2b12 | |||
| 891961b03b | |||
| 22f4137703 | |||
| 18b35517aa | |||
| 57285ee3b5 | |||
| 404891fe01 | |||
| 7e8ebd758b | |||
| 18075bf34a | |||
| 15b14349f9 | |||
| 2f9147c36c | |||
| bfd50851f8 | |||
| e41139d1fa | |||
| 73c745b7fe | |||
| 63400247eb | |||
| 9e3d7cbbc9 | |||
| 36367c04af | |||
| 560d7153ae | |||
| e0a2904dbf | |||
| 419f8db538 | |||
| c4fc7b7e5d | |||
| 72599b18ce | |||
| ae58de44e3 | |||
| bdefa77226 | |||
| 2b891483a5 | |||
| a3dfb1c5d3 | |||
| add88a783b | |||
| 3c1fd427eb | |||
| 971449bef1 | |||
| ef831b8559 | |||
| 0c0a319499 | |||
| 2e7b1d588e | |||
| fca4f4ba40 | |||
| 742b73f774 | |||
| 95c86efd31 | |||
| a6ccbe3876 | |||
| 6aece4e388 | |||
| 25fe03f5a5 | |||
| c6a8488fe1 | |||
| d9aa9d1832 | |||
| 7692aaf547 | |||
| 3a722acc62 | |||
| 5234ae7a0d | |||
| 6772d447fa | |||
| 0f505f56ad | |||
| bf1a30c5c6 | |||
| bb75ee81d5 | |||
| 9d7bba04cb | |||
| 040c024dff | |||
| 94f50ce8cb | |||
| f5a6a18232 | |||
| 4681d8da56 | |||
| f582ca5051 | |||
| 41f0554484 | |||
| dc38a55218 | |||
| 47da355878 | |||
| a7f018a4da | |||
| 3b31fd7c71 | |||
| 2d88ed17d4 | |||
| f40bb309d5 | |||
| e0d41ab683 | |||
| 801e3c26d4 | |||
| 289515a78b | |||
| 4744fa05ef | |||
| 64501a8645 | |||
| 1fedad5dfe | |||
| b510e3fcc5 | |||
| 99012725dc | |||
| aa83af477a | |||
| 5ca2729a56 | |||
| f0cb979c5e | |||
| 30457d9af6 | |||
| 1237946a8d | |||
| c2590fc0d9 | |||
| 4de3d134c9 | |||
| e8348f2c7a | |||
| 1e08ed177b | |||
| 2068a58414 | |||
| d895789296 | |||
| 1dfcfb8aa9 | |||
| bf70a42d86 | |||
| d2d8a83461 | |||
| 2a73d18d14 | |||
| c91c8b66ce | |||
| 8816e4403d | |||
| a75e403b35 | |||
| f5cdb0abfd | |||
| 90105c421d | |||
| bbbcfb707d | |||
| e455ada90a | |||
| da0c8ffff9 | |||
| 428c43e707 | |||
| a8b0612a7f | |||
| e090d699ef | |||
| bb39e1d220 | |||
| aec071689a | |||
| 22c62439ee | |||
| 5ad222e896 | |||
| b225622eaa | |||
| 83e6319643 | |||
| 5408898e15 | |||
| 8e781ccf7b | |||
| 7e3b64b328 | |||
| 96089d5396 | |||
| eb6e3a7e8e | |||
| 63ef1e544a | |||
| 23709a1b11 | |||
| 4a92850d9a | |||
| 360f498e47 | |||
| d7e7dcc823 | |||
| 25c00a0d55 | |||
| 93cdb7ce8f | |||
| 47af31a8c4 | |||
| 41ad835d86 | |||
| b8ad4bdd2a | |||
| 544cb1ff6d | |||
| 07ad94de13 | |||
| 982b22b4b1 | |||
| e0b587251a | |||
| cdc85a1961 | |||
| 4cd31ce2b4 | |||
| 7c9e170a40 | |||
| 8f78ccf414 | |||
| 81fd026313 | |||
| 9c7378cf5b | |||
| 3a51320ea6 | |||
| dfa6f5c75f | |||
| 3d4309457b | |||
| 14bc9501c7 | |||
| 90d9f83f8c | |||
| 82a39e5d98 | |||
| 101e803ca6 | |||
| 907f289ea7 | |||
| 9fd62cf9aa | |||
| 05d095b35e | |||
| 5a710ccd7a | |||
| 4764ab17bf | |||
| ba7332f55c | |||
| c38b81d682 | |||
| 384172050d | |||
| f237d5d87d | |||
| 3c2b1a232c | |||
| a6ff0c3ed1 | |||
| 79b03f6b5c | |||
| 9614b7b014 | |||
| 484bc409d4 | |||
| 0ba4a0cabc | |||
| ebcf584117 | |||
| 2bc6ca089f | |||
| 39f50726a6 | |||
| 4c6fd783e1 | |||
| b300793009 | |||
| e0b5558399 | |||
| cfac2db5d2 | |||
| 9d9ecb3ba8 | |||
| ab55c145f1 | |||
| f7957be3e7 | |||
| 4b42e17372 | |||
| 36c4c3c86a | |||
| 3872d74bd2 | |||
| 39698c7694 | |||
| f4c8808d19 | |||
| fa1cd56a0d | |||
| cc47cb85e4 | |||
| 3c48484870 | |||
| 474add9d12 | |||
| f3652697ae | |||
| dfee74ad1f | |||
| 3a6b7ea80b | |||
| 9b55ffdf6c | |||
| e459707b0d | |||
| a1f985bc7d | |||
| 9629c48d99 | |||
| 46e7e6173a | |||
| 33b31f9155 | |||
| 398fc4be37 | |||
| d111b2ba03 | |||
| 0aa9c865ca | |||
| 0f01683c06 | |||
| bcca8c9291 | |||
| c30e338f0a | |||
| accbef6841 | |||
| c5405183c9 | |||
| 8a942922fe | |||
| 772172ed6b | |||
| 9b0b11f08f | |||
| 9618a57432 | |||
| f701e35c50 | |||
| 1789e879bf | |||
| a730c3b1af | |||
| 623299e59f | |||
| 6877e14b04 | |||
| 760b687b02 | |||
| 2c2c7744eb | |||
| 2c6f0be3cc | |||
| 4ffda55071 | |||
| 5e8da3ba5f | |||
| d436b71ef5 | |||
| 8eadd912f7 | |||
| a74f978f89 | |||
| d8cb1d15c7 | |||
| d2f339dba1 | |||
| 3c72abad37 | |||
| 2a3a15533c | |||
| 9c66ac4656 | |||
| 1bd109395a | |||
| 8a5f50dc49 | |||
| 4e65215b57 | |||
| 4a08ab11ad | |||
| 99c1b60493 | |||
| 97de7a627e | |||
| e06200926f | |||
| cc60814334 | |||
| c01a140077 | |||
| 23794c8875 | |||
| 97a5daf7e6 | |||
| 1e22d8e3f8 | |||
| 61af4c94bd | |||
| 6719e0b326 | |||
| ccef5f0d73 | |||
| 03014dcf08 | |||
| 241238d2d7 | |||
| e6074149e5 | |||
| 2bdebdb2ef | |||
| 44433bf3b4 | |||
| bf32034d91 | |||
| beb79f6107 | |||
| 518e248494 | |||
| b1572ecb91 | |||
| 845198ebe3 | |||
| e41dfe738b | |||
| 94ee82b58d | |||
| 77f9010b06 | |||
| 29860b838e | |||
| 969db604e5 | |||
| b9321a72b6 | |||
| a3f0f8ad8c | |||
| c327cba735 | |||
| a467c96e00 | |||
| b4860cee69 | |||
| 2abaa89907 | |||
| 96e0842d27 | |||
| 2db2d27f12 | |||
| a08e1576ce | |||
| d5a129cb1b | |||
| 9a9b97998c | |||
| 810623be61 | |||
| b3d9ec687d | |||
| 2a6f1df76e | |||
| 42dfc56bae | |||
| 2b7b9e4d5a | |||
| d1fbe42443 | |||
| a6ed117088 | |||
| 3031e3937c | |||
| 64a8408600 | |||
| bdab3b55bc | |||
| c33d4a9bfb | |||
| 2c7d62bb8e | |||
| 327ccec4cb | |||
| 3c939bbf40 | |||
| 2f12642405 | |||
| 1f3a86dca9 | |||
| ce3caede6c | |||
| 566756ecf2 | |||
| c78fb7995e | |||
| 198d9d9dd5 | |||
| 1a4277994b | |||
| c1f0fb750d | |||
| 4b67a24c66 | |||
| ba4979cfc2 | |||
| cd04007a71 | |||
| 5355e8c802 | |||
| d401f57080 | |||
| 6eb3bc0577 | |||
| 3a68e2891e | |||
| a9609c7993 | |||
| 94adc01f35 | |||
| b4533211a7 | |||
| 320a1a984e | |||
| 9e2867ed7d | |||
| 8ac8f9a6d1 | |||
| 8eb6fd2b6b | |||
| 316590ec59 | |||
| 62b47fa65b | |||
| 9fb2952996 | |||
| 66c1201786 | |||
| d7f03d2c7d | |||
| c01cd78225 | |||
| 5601be630e | |||
| 2293bd5fe0 | |||
| d3b920dfc1 | |||
| ec3972d511 | |||
| a69fa0b00d | |||
| 91672b55d8 | |||
| 09577d3021 | |||
| 9215ea4861 | |||
| b25ba6b229 | |||
| 3540e91cc4 | |||
| ce6fb185f4 | |||
| b925843baa | |||
| 9c2c401669 | |||
| 7f6f50cf29 | |||
| 7edf3e5b36 | |||
| 62cca0682c | |||
| 1a55e7c734 | |||
| d7e2ee986b | |||
| 3363f6ac0d | |||
| 3e3b0e7951 | |||
| 19bb7c2293 | |||
| 2eeefebcb2 | |||
| 4bb703e9bf | |||
| 1ec55ee088 | |||
| ead65f01ff | |||
| 7f6a6f9fff | |||
| 2e93a7fd08 | |||
| 9cba6bad6d | |||
| 5a7efe9019 | |||
| d0a75375f7 | |||
| 0a25b71437 | |||
| 267c5566d8 | |||
| 988d8bc2c5 | |||
| 33a53bd510 | |||
| ec806a2009 | |||
| ae970cf2c8 | |||
| fb7d2831cb | |||
| 224de66c49 | |||
| 7956ee1e2c | |||
| bd2af64a7e | |||
| 388ec655bf | |||
| 4392e07cd6 | |||
| 4b0967b45e | |||
| fd3d6abd61 | |||
| 3553d2f16b | |||
| 9a617c630b | |||
| 95a951a453 | |||
| 3599de7eb8 | |||
| b4a870933a | |||
| 5e401b6a78 | |||
| a89d5d1817 | |||
| 506df8c516 | |||
| d1b142db08 | |||
| c32add161b | |||
| dbb42e9805 | |||
| def45ce8bb | |||
| 82c9586846 | |||
| 6c93643f19 | |||
| 1adf14ca2b | |||
| 6232b8d557 | |||
| cc8e098183 | |||
| 78ee671607 | |||
| 46b1fd944e | |||
| fb7ef90fce | |||
| 8e31c49f1c | |||
| 8f1f88b3ba | |||
| 16e67780ad | |||
| 5745e4e522 | |||
| 67aa41afb1 | |||
| 12aa5f0b65 | |||
| 5f851d2433 | |||
| fbb9fa065a | |||
| 401bd1c125 | |||
| 2dff188eac | |||
| 303b9da684 | |||
| 42461f1b4a | |||
| f9b979f1c6 | |||
| 26dd1afd32 | |||
| 11704740fe | |||
| 443bd83b6f | |||
| 255255e45c | |||
| fdf6306060 | |||
| c95e5b0611 | |||
| 8dc9834f48 | |||
| 465cdae564 | |||
| 41447d4ba0 | |||
| 41905f9810 | |||
| 2065b949b0 | |||
| fd3553f668 | |||
| 13a6de8645 | |||
| 887b52c18a | |||
| d54efc73f1 | |||
| b2ecceab44 | |||
| fb5c45f474 | |||
| 899e749d2d | |||
| e00e9d1552 | |||
| 9a3884636b | |||
| e267583bad | |||
| 32806e8f4e | |||
| 389eee22e3 | |||
| 9fcac44faf | |||
| 03c95b5597 | |||
| 1f6fc02c24 | |||
| 94e0b3a747 | |||
| 94476783da | |||
| 480947e0a9 | |||
| a4a3074bb6 | |||
| 36d06ccaa3 | |||
| 0509f9710f | |||
| f71d58a081 | |||
| ba95ae5191 | |||
| 4c2465466c | |||
| 6db156513c | |||
| 6f55e01846 | |||
| 6343922b16 | |||
| 7d7ad06b80 | |||
| 90f06e74a8 | |||
| d302675d7e | |||
| 9195e37a23 | |||
| b6f33d1d45 | |||
| 0950ef1a20 | |||
| ac2e9cbcff | |||
| d8d514cec7 | |||
| c222838325 | |||
| 9a28e02fc6 | |||
| 4cb47251b3 | |||
| a8f0035b8b | |||
| 03cd86b4d7 | |||
| 166f7c2728 | |||
| 31a446cfab | |||
| 95c4004ad8 | |||
| 7506142dbb | |||
| 4764e7914d | |||
| 97338d61d2 | |||
| 78ed675eda | |||
| 954a11a1b0 | |||
| a5ec9d749b | |||
| ab3de4777c | |||
| 08ca326571 | |||
| ab5d789732 | |||
| cff8c57dba | |||
| 7ed39ef375 | |||
| c59b617106 | |||
| 98ca916197 | |||
| 74916dddfd | |||
| 0d6f81904d | |||
| 62394b4b1d | |||
| 9eaa6e622b | |||
| f9e1dc3ffb | |||
| 08a9a00330 | |||
| 62b095dde6 | |||
| 0a32e6bf7d | |||
| c8f8b33bd9 | |||
| 30624e7320 | |||
| 2c51f79c0a | |||
| e4de83f2ed | |||
| 17e3625e5d | |||
| aa7c467679 | |||
| f6137831ee | |||
| b57c0a9db1 | |||
| c4c1655f76 | |||
| 4e94c7c88c | |||
| c36d1a5680 | |||
| b984276bc6 | |||
| 28969a7de4 | |||
| 05c6a2214b | |||
| 71fc8c63fe | |||
| 543d1a3c0e | |||
| 1a261597c5 | |||
| 09671823e4 | |||
| fd595863dc | |||
| 05f919c50f | |||
| e2789214ae | |||
| 51e5dc0c00 | |||
| 7d9d6eb272 | |||
| 167f7e268d | |||
| c785f9106b | |||
| 0e75dba142 | |||
| 2f07b11bb6 | |||
| 346d0e3111 | |||
| 288bde7925 | |||
| f35902ed85 | |||
| 05ba9b8d45 | |||
| c996476a28 | |||
| eaa5716d6a | |||
| 2e5b89aa84 | |||
| d2ac0429d3 | |||
| c2afe0b6b2 | |||
| a9b5c5d32d | |||
| 238d0f42b1 | |||
| 4f97ae35bb | |||
| 4479035595 | |||
| c745e6f29b | |||
| f63849ed56 | |||
| 23d5a5e238 | |||
| 9b226926ed | |||
| 4ad8b8bb19 | |||
| cbea62ceb9 | |||
| cf799c2198 | |||
| f3be30a55e | |||
| c4fa30d39c | |||
| a02b5b8b57 | |||
| 6988333a8e | |||
| 3eef855c31 | |||
| d9f3915186 | |||
| 19941c3e88 | |||
| 877a6e6913 | |||
| 2051a724ae | |||
| 774c4b65fe | |||
| 3ef41e1e23 | |||
| b96f0efd9c | |||
| 801587ab6c | |||
| df1dfbec36 | |||
| 59af92bfc4 | |||
| 35f06bbf6e | |||
| 766a79af12 | |||
| 17467c81a4 | |||
| 5fc2f12139 | |||
| ae846debd4 | |||
| c01e5efe43 | |||
| 06be726a6f | |||
| bdde0af771 | |||
| c76f1f2432 | |||
| ed4eeee647 | |||
| 8c79c21e61 | |||
| ca56c5f9d0 | |||
| a22d5887bb | |||
| 2b41c8d24f | |||
| c519c00678 | |||
| 4c130bcba1 | |||
| 3fc7073046 | |||
| b73ff9aaf6 | |||
| 3c2c95d670 | |||
| 37ed8afb30 | |||
| 51a90dcd28 | |||
| 0b16490719 | |||
| d36a36d439 | |||
| ac33ba432d | |||
| 6e885ece34 | |||
| 826581cb77 | |||
| d533dc5f5e | |||
| 66fac52905 | |||
| c28215b93e | |||
| bbfd80dcb1 | |||
| 81efa49951 | |||
| dc62586314 | |||
| 6a1b4e547c | |||
| d3c974a838 | |||
| 8409f9d2d4 | |||
| d4a27f38ff | |||
| ace8295ab7 | |||
| c23d2ad2c4 | |||
| b5e19d95bd | |||
| af34bafc5a | |||
| aa07d3b2fa | |||
| f7837f99c2 | |||
| 04836f037d | |||
| 64b6b4ebc9 | |||
| 2f1aeb6897 | |||
| 7cfcacf0cd | |||
| 221c4f0648 | |||
| 52815a4ab0 | |||
| 203d1d79dc | |||
| 480783b7fa | |||
| 3781228dd2 | |||
| 983190b9a0 | |||
| 4e01d110a1 | |||
| b1ad70b6b2 | |||
| 6e9b5225d2 | |||
| e7f899309c | |||
| ed82787093 | |||
| acb4a10fd5 | |||
| 9927209293 | |||
| d5bc9b5e46 | |||
| 8aaa0a2d6b | |||
| ba8d506c14 | |||
| f1b82b788b | |||
| 029566b2ff | |||
| 35aaacd61b | |||
| eab3631c33 | |||
| cca8200794 | |||
| 0fb02a5aff | |||
| 7448383079 | |||
| e9215c1a9e | |||
| 69d3cb5b2b | |||
| e4d3989b71 | |||
| f9c6166b46 | |||
| ee691469b4 | |||
| 752e7e73bc | |||
| a9ec4566e7 | |||
| 653cdd8654 | |||
| 18901ba66f | |||
| 7bc0e3c14d | |||
| 7b2c034fba | |||
| 7dd2a8fac9 | |||
| 00cb802363 | |||
| 325433aaf8 | |||
| 7877f77242 | |||
| ac1eb8d58d | |||
| b2ae91e3b9 | |||
| 898a7002eb | |||
| 5d0da2c8c2 | |||
| 1e2a15d6c1 | |||
| c572d75d1d | |||
| f1bc3f58e2 | |||
| d774cb496a | |||
| ed1f0b8881 | |||
| cd707eb5a4 | |||
| c4af8ce0ca | |||
| 992f4b2303 | |||
| 8e7ff6f657 | |||
| 4e86f1c776 | |||
| 4b78551765 | |||
| 3579b86980 | |||
| 3f39212b7b | |||
| b0b6aeccd8 | |||
| 5b6a0a8d7f | |||
| 3bbeae15f2 | |||
| f6a6e298e0 | |||
| b4b41d6773 | |||
| 274dde0a7e | |||
| 7a5e5a63e1 | |||
| e55dd16b72 | |||
| 054b2cb9c7 | |||
| fed5805fcc | |||
| e9c5ffa736 | |||
| e912590bc6 | |||
| 9d3861ace2 | |||
| 0b1c1b3a8d | |||
| 4b22503ea2 | |||
| 54786a001a | |||
| 9cf6120b39 | |||
| 21f1930c2d | |||
| 053d55bf81 | |||
| 563ec32f06 | |||
| f8bc124752 | |||
| 529beaad08 | |||
| efbc7976b0 | |||
| 048612c65c | |||
| 866105631e | |||
| 6c4ca6c01a | |||
| a04d19d9f7 | |||
| f470a9aaf4 | |||
| 0bb1982bcd | |||
| d2cc4051ad | |||
| 224937cd09 | |||
| 8661c2af18 | |||
| 854b2492dd | |||
| 0f6e204c76 | |||
| 1e4c07f94c | |||
| 3185691077 | |||
| 42075f7b2a | |||
| a746e0c995 | |||
| ca0135724c | |||
| fa82555149 | |||
| 9a90b2fa42 | |||
| a3012d0b27 | |||
| 7f482330ca | |||
| 810691d540 | |||
| eb24c29f7e | |||
| 438135975f | |||
| 25a9dcad8a | |||
| 1243927ad0 | |||
| fee47a99b3 | |||
| 7c54bb0155 | |||
| 9a0e3a7b6c | |||
| ff4f1277e7 | |||
| 6fba1a4ab9 | |||
| f24cb34e3f | |||
| 772af752d2 | |||
| dff1374378 | |||
| 7e5fd8e384 | |||
| 95ba2e9bab | |||
| 41a873450e | |||
| 7f5869e257 | |||
| c8c215abfd | |||
| 2d6f8cc406 | |||
| 80fc3d82b0 | |||
| 1bb64fdf5d | |||
| c4dd5ef5c8 | |||
| 73e92e33fd | |||
| 3a5c3cabba | |||
| 0b4408bc78 | |||
| df6dc6b21f | |||
| df10d6560b | |||
| a2825eac87 | |||
| 51926f517e | |||
| 382a35aabf | |||
| 4f690c17fa | |||
| 7af125b453 | |||
| b0fe4e9945 | |||
| a6d488c4ef | |||
| e01a0585a8 | |||
| 3e1356ba2d | |||
| a83ee4014e | |||
| 4264a36dd0 | |||
| dd00c83f74 | |||
| 6ad8e8b133 | |||
| f17e347a15 | |||
| d95d3efe33 | |||
| d21ccac63e | |||
| 427541b488 | |||
| b27c832cb7 | |||
| 3162d4e770 | |||
| e21c9d24de | |||
| 2ce14b5e9c | |||
| 3f68a0576d | |||
| f216528f40 | |||
| 4562dde31f | |||
| 5ca717a231 | |||
| e2f9646b8f | |||
| b5e324673e | |||
| 20b65a08d9 | |||
| 40c537d114 | |||
| de02131d0a | |||
| b3887c0874 | |||
| d99aa3ef46 | |||
| a90b3bd7f6 | |||
| 77461e45c0 | |||
| 99135759e3 | |||
| 3fb0b56c10 | |||
| c930d32b2b | |||
| c7c339957b | |||
| 5afe51d1b4 | |||
| 082d56f89a | |||
| 6b7ca47f26 | |||
| 00d5a40443 | |||
| 87754f12ff | |||
| e7d99057ba | |||
| 339e5a5d91 | |||
| 2db1438ef4 | |||
| 42d31c0c65 | |||
| 64a5b01bd9 | |||
| ea7cdd00bd | |||
| 43e8a54e57 | |||
| 393595ea2d | |||
| b9f13804e0 | |||
| 1c511d112d | |||
| f86e22ba87 | |||
| c87feb69c4 | |||
| 75a02beda0 | |||
| 7106dc738b | |||
| 7525bf6435 | |||
| 8f653fa699 | |||
| 4072796e54 | |||
| e09f4eb6dc | |||
| f82117c6fb | |||
| 48ae338fb2 | |||
| cc201e198d |
@@ -8,15 +8,18 @@ jobs:
|
|||||||
name: Editor (Linux, Development x64)
|
name: Editor (Linux, Development x64)
|
||||||
runs-on: "ubuntu-20.04"
|
runs-on: "ubuntu-20.04"
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev
|
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Checkout LFS
|
- name: Checkout LFS
|
||||||
run: |
|
run: |
|
||||||
git lfs version
|
git lfs version
|
||||||
git lfs pull
|
git lfs pull
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo rm -f /etc/apt/sources.list.d/*
|
||||||
|
sudo cp -f .github/workflows/build_linux_sources.list /etc/apt/sources.list
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
./Development/Scripts/Linux/CallBuildTool.sh -build -log -arch=x64 -platform=Linux -configuration=Development -buildtargets=FlaxEditor
|
./Development/Scripts/Linux/CallBuildTool.sh -build -log -arch=x64 -platform=Linux -configuration=Development -buildtargets=FlaxEditor
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
|
||||||
|
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
|
||||||
|
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
|
||||||
|
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
name: Continuous Deployment
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '15 4 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
# Windows
|
||||||
|
package-windows-editor:
|
||||||
|
name: Editor (Windows)
|
||||||
|
runs-on: "windows-latest"
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Checkout LFS
|
||||||
|
run: |
|
||||||
|
git lfs version
|
||||||
|
git lfs pull
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
.\PackageEditor.bat -arch=x64 -platform=Windows -deployOutput=Output
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Windows-Editor
|
||||||
|
path: Output/Editor.zip
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Windows-EditorDebugSymbols
|
||||||
|
path: Output/EditorDebugSymbols.zip
|
||||||
|
package-windows-game:
|
||||||
|
name: Game (Windows)
|
||||||
|
runs-on: "windows-latest"
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Checkout LFS
|
||||||
|
run: |
|
||||||
|
git lfs version
|
||||||
|
git lfs pull
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
.\PackagePlatforms.bat -arch=x64 -platform=Windows -deployOutput=Output
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Windows-Game
|
||||||
|
path: Output/Windows.zip
|
||||||
|
|
||||||
|
# Linux
|
||||||
|
package-linux-editor:
|
||||||
|
name: Editor (Linux)
|
||||||
|
runs-on: "ubuntu-20.04"
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Checkout LFS
|
||||||
|
run: |
|
||||||
|
git lfs version
|
||||||
|
git lfs pull
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo rm -f /etc/apt/sources.list.d/*
|
||||||
|
sudo cp -f .github/workflows/build_linux_sources.list /etc/apt/sources.list
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
./PackageEditor.sh -arch=x64 -platform=Linux -deployOutput=Output
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Linux-Editor
|
||||||
|
path: Output/FlaxEditorLinux.zip
|
||||||
|
package-linux-game:
|
||||||
|
name: Game (Linux)
|
||||||
|
runs-on: "ubuntu-20.04"
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Checkout LFS
|
||||||
|
run: |
|
||||||
|
git lfs version
|
||||||
|
git lfs pull
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo rm -f /etc/apt/sources.list.d/*
|
||||||
|
sudo cp -f .github/workflows/build_linux_sources.list /etc/apt/sources.list
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
./PackagePlatforms.sh -arch=x64 -platform=Linux -deployOutput=Output
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Linux-Game
|
||||||
|
path: Output/Linux.zip
|
||||||
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.
@@ -194,16 +194,16 @@ void PS_Decal(
|
|||||||
Out2 = float4(material.Emissive, material.Opacity);
|
Out2 = float4(material.Emissive, material.Opacity);
|
||||||
#if USE_NORMAL
|
#if USE_NORMAL
|
||||||
// GBuffer1
|
// GBuffer1
|
||||||
Out3 = float4(material.WorldNormal * 0.5f + 0.5f, 1);
|
Out3 = float4(material.WorldNormal * 0.5f + 0.5f, material.Opacity);
|
||||||
#endif
|
#endif
|
||||||
#elif USE_NORMAL
|
#elif USE_NORMAL
|
||||||
// GBuffer1
|
// GBuffer1
|
||||||
Out2 = float4(material.WorldNormal * 0.5f + 0.5f, 1);
|
Out2 = float4(material.WorldNormal * 0.5f + 0.5f, material.Opacity);
|
||||||
#endif
|
#endif
|
||||||
#elif DECAL_BLEND_MODE == DECAL_BLEND_MODE_STAIN
|
#elif DECAL_BLEND_MODE == DECAL_BLEND_MODE_STAIN
|
||||||
Out0 = float4(material.Color, material.Opacity);
|
Out0 = float4(material.Color, material.Opacity);
|
||||||
#elif DECAL_BLEND_MODE == DECAL_BLEND_MODE_NORMAL
|
#elif DECAL_BLEND_MODE == DECAL_BLEND_MODE_NORMAL
|
||||||
Out0 = float4(material.WorldNormal * 0.5f + 0.5f, 1);
|
Out0 = float4(material.WorldNormal * 0.5f + 0.5f, material.Opacity);
|
||||||
#elif DECAL_BLEND_MODE == DECAL_BLEND_MODE_EMISSIVE
|
#elif DECAL_BLEND_MODE == DECAL_BLEND_MODE_EMISSIVE
|
||||||
Out0 = float4(material.Emissive * material.Opacity, material.Opacity);
|
Out0 = float4(material.Emissive * material.Opacity, material.Opacity);
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ MaterialInput GetGeometryMaterialInput(GeometryData geometry)
|
|||||||
#if USE_LIGHTMAP
|
#if USE_LIGHTMAP
|
||||||
output.LightmapUV = geometry.LightmapUV;
|
output.LightmapUV = geometry.LightmapUV;
|
||||||
#endif
|
#endif
|
||||||
output.TBN = CalcTangentBasisFromWorldNormal(geometry.WorldNormal);
|
output.TBN = CalcTangentBasis(geometry.WorldNormal, geometry.WorldPosition, geometry.TexCoord);
|
||||||
output.HolesMask = geometry.HolesMask;
|
output.HolesMask = geometry.HolesMask;
|
||||||
#if USE_TERRAIN_LAYERS
|
#if USE_TERRAIN_LAYERS
|
||||||
output.Layers = geometry.Layers;
|
output.Layers = geometry.Layers;
|
||||||
@@ -415,7 +415,7 @@ VertexOutput VS(TerrainVertexInput input)
|
|||||||
#if USE_LIGHTMAP
|
#if USE_LIGHTMAP
|
||||||
materialInput.LightmapUV = output.Geometry.LightmapUV;
|
materialInput.LightmapUV = output.Geometry.LightmapUV;
|
||||||
#endif
|
#endif
|
||||||
materialInput.TBN = CalcTangentBasisFromWorldNormal(output.Geometry.WorldNormal);
|
materialInput.TBN = tangentToWorld;
|
||||||
materialInput.TwoSidedSign = WorldDeterminantSign;
|
materialInput.TwoSidedSign = WorldDeterminantSign;
|
||||||
materialInput.SvPosition = output.Position;
|
materialInput.SvPosition = output.Position;
|
||||||
materialInput.PreSkinnedPosition = position;
|
materialInput.PreSkinnedPosition = position;
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,23 @@
|
|||||||
|
%copyright%
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Engine/Core/ISerializable.h"
|
||||||
|
#include "Engine/Core/Types/BaseTypes.h"
|
||||||
|
#include "Engine/Content/Assets/Model.h"
|
||||||
|
#include "Engine/Scripting/ScriptingType.h"
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// %class% Json Asset.
|
||||||
|
/// </summary>
|
||||||
|
API_CLASS() class %module%%class% : public ISerializable
|
||||||
|
{
|
||||||
|
API_AUTO_SERIALIZATION();
|
||||||
|
DECLARE_SCRIPTING_TYPE_NO_SPAWN(%class%);
|
||||||
|
public:
|
||||||
|
// Custom float value.
|
||||||
|
API_FIELD(Attributes = "Range(0, 20), EditorOrder(0), EditorDisplay(\"Data\")")
|
||||||
|
float FloatValue = 20.0f;
|
||||||
|
// Custom vector data.
|
||||||
|
API_FIELD(Attributes = "EditorOrder(1), EditorDisplay(\"Data\")")
|
||||||
|
Vector3 Vector3Value = Vector3(0.1f);
|
||||||
|
};
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
%copyright%
|
||||||
|
#include "%filename%.h"
|
||||||
|
#include "Engine/Core/Log.h"
|
||||||
|
|
||||||
|
void %class%::RunNativeAction(Vector4 data)
|
||||||
|
{
|
||||||
|
LOG(Warning, "Data in RunNativeAction: {0}", data);
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
%copyright%
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Engine/Scripting/Script.h"
|
||||||
|
#include "Engine/Core/Math/Vector4.h"
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// %class% Function Library
|
||||||
|
/// </summary>
|
||||||
|
API_CLASS(Static) class %module%%class%
|
||||||
|
{
|
||||||
|
DECLARE_SCRIPTING_TYPE_MINIMAL(%class%);
|
||||||
|
public:
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Logs the function parameter natively.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="data">Data to pass to native code</param>
|
||||||
|
API_FUNCTION() static void RunNativeAction(Vector4 data);
|
||||||
|
};
|
||||||
@@ -4,23 +4,30 @@ using FlaxEngine;
|
|||||||
|
|
||||||
namespace %namespace%
|
namespace %namespace%
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// %class% Script.
|
||||||
|
/// </summary>
|
||||||
public class %class% : Script
|
public class %class% : Script
|
||||||
{
|
{
|
||||||
|
/// <inheritdoc/>
|
||||||
public override void OnStart()
|
public override void OnStart()
|
||||||
{
|
{
|
||||||
// Here you can add code that needs to be called when script is created, just before the first game update
|
// Here you can add code that needs to be called when script is created, just before the first game update
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
public override void OnEnable()
|
public override void OnEnable()
|
||||||
{
|
{
|
||||||
// Here you can add code that needs to be called when script is enabled (eg. register for events)
|
// Here you can add code that needs to be called when script is enabled (eg. register for events)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
public override void OnDisable()
|
public override void OnDisable()
|
||||||
{
|
{
|
||||||
// Here you can add code that needs to be called when script is disabled (eg. unregister from events)
|
// Here you can add code that needs to be called when script is disabled (eg. unregister from events)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
public override void OnUpdate()
|
public override void OnUpdate()
|
||||||
{
|
{
|
||||||
// Here you can add code that needs to be called every frame
|
// Here you can add code that needs to be called every frame
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
@@ -5,6 +5,7 @@ Custom fork: [https://github.com/FlaxEngine/mono](https://github.com/FlaxEngine/
|
|||||||
### Notes
|
### Notes
|
||||||
|
|
||||||
Some useful notes and tips for devs:
|
Some useful notes and tips for devs:
|
||||||
|
* Use `-monolog` to print Mono logs to Flax logs
|
||||||
* When working with mono fork set `localRepoPath` to local repo location in `Source\Tools\Flax.Build\Deps\Dependencies\mono.cs`
|
* When working with mono fork set `localRepoPath` to local repo location in `Source\Tools\Flax.Build\Deps\Dependencies\mono.cs`
|
||||||
* To update mono deps when developing/updating use `.\Development\Scripts\Windows\CallBuildTool.bat -log -ReBuildDeps -verbose -depsToBuild=mono -platform=Windows`, then build engine and run it
|
* To update mono deps when developing/updating use `.\Development\Scripts\Windows\CallBuildTool.bat -log -ReBuildDeps -verbose -depsToBuild=mono -platform=Windows`, then build engine and run it
|
||||||
* `MONO_GC_DEBUG=check-remset-consistency` - it will do additional checks at each collection to see if there are any missing write barriers
|
* `MONO_GC_DEBUG=check-remset-consistency` - it will do additional checks at each collection to see if there are any missing write barriers
|
||||||
|
|||||||
+2
-2
@@ -2,8 +2,8 @@
|
|||||||
"Name": "Flax",
|
"Name": "Flax",
|
||||||
"Version": {
|
"Version": {
|
||||||
"Major": 1,
|
"Major": 1,
|
||||||
"Minor": 1,
|
"Minor": 2,
|
||||||
"Build": 6218
|
"Build": 6224
|
||||||
},
|
},
|
||||||
"Company": "Flax",
|
"Company": "Flax",
|
||||||
"Copyright": "Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.",
|
"Copyright": "Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.",
|
||||||
|
|||||||
@@ -234,6 +234,7 @@
|
|||||||
<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=EEA05B0ED8200E4BA9D2D3F1052EBFFD/Name/@EntryValue">Deprecated</s:String>
|
<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=EEA05B0ED8200E4BA9D2D3F1052EBFFD/Name/@EntryValue">Deprecated</s:String>
|
||||||
<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=EEA05B0ED8200E4BA9D2D3F1052EBFFD/Pattern/@EntryValue">(?<=\W|^)(?<TAG>\[Deprecated)(\W|$)(.*)</s:String>
|
<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=EEA05B0ED8200E4BA9D2D3F1052EBFFD/Pattern/@EntryValue">(?<=\W|^)(?<TAG>\[Deprecated)(\W|$)(.*)</s:String>
|
||||||
<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=EEA05B0ED8200E4BA9D2D3F1052EBFFD/TodoIconStyle/@EntryValue">Normal</s:String>
|
<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=EEA05B0ED8200E4BA9D2D3F1052EBFFD/TodoIconStyle/@EntryValue">Normal</s:String>
|
||||||
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Ackermann/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=analytics/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=analytics/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Antialiasing/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Antialiasing/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=backbuffer/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=backbuffer/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
|||||||
@@ -42,6 +42,16 @@ Flax Visual Studio extension provides better programming workflow, C# scripts de
|
|||||||
* Compile Flax project (hit F7 or CTRL+Shift+B)
|
* Compile Flax project (hit F7 or CTRL+Shift+B)
|
||||||
* Run Flax (hit F5 key)
|
* Run Flax (hit F5 key)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Note**
|
||||||
|
|
||||||
|
If building on Windows to support Vulkan rendering, first install the Vulkan SDK then set an environment variable to provide the path to the SDK prior to running GenerateProjectFiles.bat:
|
||||||
|
|
||||||
|
set VULKAN_SDK=C:\VulkanSDK\version\
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Linux
|
## Linux
|
||||||
|
|
||||||
* Install Visual Studio Code
|
* Install Visual Studio Code
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#include "Editor/Editor.h"
|
#include "Editor/Editor.h"
|
||||||
#include "Editor/ProjectInfo.h"
|
#include "Editor/ProjectInfo.h"
|
||||||
#include "Engine/Engine/EngineService.h"
|
#include "Engine/Engine/EngineService.h"
|
||||||
|
#include "Engine/Engine/Globals.h"
|
||||||
#include "Engine/Graphics/GPUDevice.h"
|
#include "Engine/Graphics/GPUDevice.h"
|
||||||
#include "Engine/Utilities/StringConverter.h"
|
#include "Engine/Utilities/StringConverter.h"
|
||||||
#include "FlaxEngine.Gen.h"
|
#include "FlaxEngine.Gen.h"
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
|
|
||||||
void RegisterGameCookingStart(GameCooker::EventType type)
|
void RegisterGameCookingStart(GameCooker::EventType type)
|
||||||
{
|
{
|
||||||
auto platform = ToString(GameCooker::GetCurrentData().Platform);
|
auto& data = *GameCooker::GetCurrentData();
|
||||||
|
auto platform = ToString(data.Platform);
|
||||||
if (type == GameCooker::EventType::BuildStarted)
|
if (type == GameCooker::EventType::BuildStarted)
|
||||||
{
|
{
|
||||||
EditorAnalytics::SendEvent("Actions", "GameCooker.Start", platform);
|
EditorAnalytics::SendEvent("Actions", "GameCooker.Start", platform);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using FlaxEditor.Content.Settings;
|
using FlaxEditor.Content.Settings;
|
||||||
using FlaxEditor.Scripting;
|
using FlaxEditor.Scripting;
|
||||||
|
using FlaxEditor.Windows.Assets;
|
||||||
using FlaxEngine;
|
using FlaxEngine;
|
||||||
|
|
||||||
namespace FlaxEditor.Content.Create
|
namespace FlaxEditor.Content.Create
|
||||||
@@ -11,87 +12,31 @@ namespace FlaxEditor.Content.Create
|
|||||||
/// Engine settings asset creating handler. Allows to specify type of the settings to create (e.g. <see cref="GameSettings"/>, <see cref="TimeSettings"/>, etc.).
|
/// Engine settings asset creating handler. Allows to specify type of the settings to create (e.g. <see cref="GameSettings"/>, <see cref="TimeSettings"/>, etc.).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <seealso cref="FlaxEditor.Content.Create.CreateFileEntry" />
|
/// <seealso cref="FlaxEditor.Content.Create.CreateFileEntry" />
|
||||||
public class SettingsCreateEntry : CreateFileEntry
|
internal class SettingsCreateEntry : CreateFileEntry
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Types of the settings assets that can be created.
|
/// Types of the settings assets that can be created.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum SettingsTypes
|
internal enum SettingsTypes
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// The game settings.
|
|
||||||
/// </summary>
|
|
||||||
GameSettings,
|
GameSettings,
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The audio settings.
|
|
||||||
/// </summary>
|
|
||||||
AudioSettings,
|
AudioSettings,
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The time settings.
|
|
||||||
/// </summary>
|
|
||||||
TimeSettings,
|
TimeSettings,
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The layers and tags settings.
|
|
||||||
/// </summary>
|
|
||||||
LayersAndTagsSettings,
|
LayersAndTagsSettings,
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The physics settings.
|
|
||||||
/// </summary>
|
|
||||||
PhysicsSettings,
|
PhysicsSettings,
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The graphics settings.
|
|
||||||
/// </summary>
|
|
||||||
GraphicsSettings,
|
GraphicsSettings,
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The navigation settings.
|
|
||||||
/// </summary>
|
|
||||||
NavigationSettings,
|
NavigationSettings,
|
||||||
|
LocalizationSettings,
|
||||||
/// <summary>
|
|
||||||
/// The build settings.
|
|
||||||
/// </summary>
|
|
||||||
BuildSettings,
|
BuildSettings,
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The input settings.
|
|
||||||
/// </summary>
|
|
||||||
InputSettings,
|
InputSettings,
|
||||||
|
StreamingSettings,
|
||||||
/// <summary>
|
|
||||||
/// The Windows settings.
|
|
||||||
/// </summary>
|
|
||||||
WindowsPlatformSettings,
|
WindowsPlatformSettings,
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The UWP settings.
|
|
||||||
/// </summary>
|
|
||||||
UWPPlatformSettings,
|
UWPPlatformSettings,
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The Linux settings.
|
|
||||||
/// </summary>
|
|
||||||
LinuxPlatformSettings,
|
LinuxPlatformSettings,
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The PS4 settings
|
|
||||||
/// </summary>
|
|
||||||
PS4PlatformSettings,
|
PS4PlatformSettings,
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The Xbox Scarlett settings
|
|
||||||
/// </summary>
|
|
||||||
XboxScarlettPlatformSettings,
|
XboxScarlettPlatformSettings,
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The Android settings
|
|
||||||
/// </summary>
|
|
||||||
AndroidPlatformSettings,
|
AndroidPlatformSettings,
|
||||||
|
SwitchPlatformSettings,
|
||||||
}
|
}
|
||||||
|
|
||||||
private static readonly Type[] _types =
|
private static readonly Type[] _types =
|
||||||
@@ -103,20 +48,20 @@ namespace FlaxEditor.Content.Create
|
|||||||
typeof(PhysicsSettings),
|
typeof(PhysicsSettings),
|
||||||
typeof(GraphicsSettings),
|
typeof(GraphicsSettings),
|
||||||
typeof(NavigationSettings),
|
typeof(NavigationSettings),
|
||||||
|
typeof(LocalizationSettings),
|
||||||
typeof(BuildSettings),
|
typeof(BuildSettings),
|
||||||
typeof(InputSettings),
|
typeof(InputSettings),
|
||||||
|
typeof(StreamingSettings),
|
||||||
typeof(WindowsPlatformSettings),
|
typeof(WindowsPlatformSettings),
|
||||||
typeof(UWPPlatformSettings),
|
typeof(UWPPlatformSettings),
|
||||||
typeof(LinuxPlatformSettings),
|
typeof(LinuxPlatformSettings),
|
||||||
TypeUtils.GetManagedType(GameSettings.PS4PlatformSettingsTypename),
|
TypeUtils.GetManagedType(GameSettings.PS4PlatformSettingsTypename),
|
||||||
TypeUtils.GetManagedType(GameSettings.XboxScarlettPlatformSettingsTypename),
|
TypeUtils.GetManagedType(GameSettings.XboxScarlettPlatformSettingsTypename),
|
||||||
typeof(AndroidPlatformSettings),
|
typeof(AndroidPlatformSettings),
|
||||||
|
TypeUtils.GetManagedType(GameSettings.SwitchPlatformSettingsTypename),
|
||||||
};
|
};
|
||||||
|
|
||||||
/// <summary>
|
internal class Options
|
||||||
/// The create options.
|
|
||||||
/// </summary>
|
|
||||||
public class Options
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The type.
|
/// The type.
|
||||||
@@ -150,7 +95,134 @@ namespace FlaxEditor.Content.Create
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
var data = Activator.CreateInstance(type);
|
var data = Activator.CreateInstance(type);
|
||||||
return Editor.SaveJsonAsset(ResultUrl, data);
|
if (Editor.SaveJsonAsset(ResultUrl, data))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
// Automatic settings linking to game settings for easier usage
|
||||||
|
var gameSettingsItem = Editor.Instance.ContentDatabase.Game.Content.Folder.FindChild(GameSettings.GameSettingsAssetPath) as JsonAssetItem;
|
||||||
|
if (gameSettingsItem != null)
|
||||||
|
{
|
||||||
|
var gameSettingsWindow = Editor.Instance.Windows.FindEditor(gameSettingsItem) as JsonAssetWindow;
|
||||||
|
if (gameSettingsWindow?.Instance is GameSettings)
|
||||||
|
{
|
||||||
|
if (TrySet(gameSettingsWindow.Instance as GameSettings, ResultUrl, _options.Type))
|
||||||
|
gameSettingsWindow.MarkAsEdited();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var gameSettingsAsset = FlaxEngine.Content.LoadAsync<JsonAsset>(gameSettingsItem.ID);
|
||||||
|
if (gameSettingsAsset && !gameSettingsAsset.WaitForLoaded())
|
||||||
|
{
|
||||||
|
if (gameSettingsAsset.CreateInstance() is GameSettings settings)
|
||||||
|
{
|
||||||
|
if (TrySet(settings, ResultUrl, _options.Type))
|
||||||
|
{
|
||||||
|
Editor.SaveJsonAsset(GameSettings.GameSettingsAssetPath, settings);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool TrySet(GameSettings instance, string resultUrl, SettingsTypes type)
|
||||||
|
{
|
||||||
|
var asset = FlaxEngine.Content.LoadAsync<JsonAsset>(resultUrl);
|
||||||
|
if (instance != null && asset != null)
|
||||||
|
{
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case SettingsTypes.AudioSettings:
|
||||||
|
if (instance.Audio != null)
|
||||||
|
return false;
|
||||||
|
instance.Audio = asset;
|
||||||
|
break;
|
||||||
|
case SettingsTypes.TimeSettings:
|
||||||
|
if (instance.Time != null)
|
||||||
|
return false;
|
||||||
|
instance.Time = asset;
|
||||||
|
break;
|
||||||
|
case SettingsTypes.LayersAndTagsSettings:
|
||||||
|
if (instance.LayersAndTags != null)
|
||||||
|
return false;
|
||||||
|
instance.LayersAndTags = asset;
|
||||||
|
break;
|
||||||
|
case SettingsTypes.PhysicsSettings:
|
||||||
|
if (instance.Physics != null)
|
||||||
|
return false;
|
||||||
|
instance.Physics = asset;
|
||||||
|
break;
|
||||||
|
case SettingsTypes.GraphicsSettings:
|
||||||
|
if (instance.Graphics != null)
|
||||||
|
return false;
|
||||||
|
instance.Graphics = asset;
|
||||||
|
break;
|
||||||
|
case SettingsTypes.NavigationSettings:
|
||||||
|
if (instance.Navigation != null)
|
||||||
|
return false;
|
||||||
|
instance.Navigation = asset;
|
||||||
|
break;
|
||||||
|
case SettingsTypes.LocalizationSettings:
|
||||||
|
if (instance.Localization != null)
|
||||||
|
return false;
|
||||||
|
instance.Localization = asset;
|
||||||
|
break;
|
||||||
|
case SettingsTypes.BuildSettings:
|
||||||
|
if (instance.GameCooking != null)
|
||||||
|
return false;
|
||||||
|
instance.GameCooking = asset;
|
||||||
|
break;
|
||||||
|
case SettingsTypes.InputSettings:
|
||||||
|
if (instance.Input != null)
|
||||||
|
return false;
|
||||||
|
instance.Input = asset;
|
||||||
|
break;
|
||||||
|
case SettingsTypes.StreamingSettings:
|
||||||
|
if (instance.Streaming != null)
|
||||||
|
return false;
|
||||||
|
instance.Streaming = asset;
|
||||||
|
break;
|
||||||
|
case SettingsTypes.WindowsPlatformSettings:
|
||||||
|
if (instance.WindowsPlatform != null)
|
||||||
|
return false;
|
||||||
|
instance.WindowsPlatform = asset;
|
||||||
|
break;
|
||||||
|
case SettingsTypes.UWPPlatformSettings:
|
||||||
|
if (instance.UWPPlatform != null)
|
||||||
|
return false;
|
||||||
|
instance.UWPPlatform = asset;
|
||||||
|
break;
|
||||||
|
case SettingsTypes.LinuxPlatformSettings:
|
||||||
|
if (instance.LinuxPlatform != null)
|
||||||
|
return false;
|
||||||
|
instance.LinuxPlatform = asset;
|
||||||
|
break;
|
||||||
|
case SettingsTypes.PS4PlatformSettings:
|
||||||
|
if (instance.PS4Platform != null)
|
||||||
|
return false;
|
||||||
|
instance.PS4Platform = asset;
|
||||||
|
break;
|
||||||
|
case SettingsTypes.XboxScarlettPlatformSettings:
|
||||||
|
if (instance.XboxScarlettPlatform != null)
|
||||||
|
return false;
|
||||||
|
instance.XboxScarlettPlatform = asset;
|
||||||
|
break;
|
||||||
|
case SettingsTypes.AndroidPlatformSettings:
|
||||||
|
if (instance.AndroidPlatform != null)
|
||||||
|
return false;
|
||||||
|
instance.AndroidPlatform = asset;
|
||||||
|
break;
|
||||||
|
case SettingsTypes.SwitchPlatformSettings:
|
||||||
|
if (instance.SwitchPlatform != null)
|
||||||
|
return false;
|
||||||
|
instance.SwitchPlatform = asset;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace FlaxEditor.Content.Create
|
|||||||
|
|
||||||
private static bool IsValid(Type type)
|
private static bool IsValid(Type type)
|
||||||
{
|
{
|
||||||
return type.IsPublic && !type.IsSealed && !type.IsGenericType;
|
return (type.IsPublic || type.IsNestedPublic) && !type.IsSealed && !type.IsGenericType;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,22 @@ namespace FlaxEditor.Content.GUI
|
|||||||
List,
|
List,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The method sort for items.
|
||||||
|
/// </summary>
|
||||||
|
public enum SortType
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The classic alphabetic sort method (A-Z).
|
||||||
|
/// </summary>
|
||||||
|
AlphabeticOrder,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The reverse alphabetic sort method (Z-A).
|
||||||
|
/// </summary>
|
||||||
|
AlphabeticReverse
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Main control for <see cref="ContentWindow"/> used to present collection of <see cref="ContentItem"/>.
|
/// Main control for <see cref="ContentWindow"/> used to present collection of <see cref="ContentItem"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -218,8 +234,9 @@ namespace FlaxEditor.Content.GUI
|
|||||||
/// Shows the items collection in the view.
|
/// Shows the items collection in the view.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="items">The items to show.</param>
|
/// <param name="items">The items to show.</param>
|
||||||
|
/// <param name="sortType">The sort method for items.</param>
|
||||||
/// <param name="additive">If set to <c>true</c> items will be added to the current selection. Otherwise selection will be cleared before.</param>
|
/// <param name="additive">If set to <c>true</c> items will be added to the current selection. Otherwise selection will be cleared before.</param>
|
||||||
public void ShowItems(List<ContentItem> items, bool additive = false)
|
public void ShowItems(List<ContentItem> items, SortType sortType, bool additive = false)
|
||||||
{
|
{
|
||||||
if (items == null)
|
if (items == null)
|
||||||
throw new ArgumentNullException();
|
throw new ArgumentNullException();
|
||||||
@@ -249,9 +266,24 @@ namespace FlaxEditor.Content.GUI
|
|||||||
items[i].AddReference(this);
|
items[i].AddReference(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sort items
|
// Sort items depending on sortMethod parameter
|
||||||
_children.Sort();
|
_children.Sort(((control, control1) =>
|
||||||
|
{
|
||||||
|
if (sortType == SortType.AlphabeticReverse)
|
||||||
|
{
|
||||||
|
if (control.CompareTo(control1) > 0)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (control.CompareTo(control1) == 0)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return control.CompareTo(control1);
|
||||||
|
}));
|
||||||
|
|
||||||
// Unload and perform UI layout
|
// Unload and perform UI layout
|
||||||
IsLayoutLocked = wasLayoutLocked;
|
IsLayoutLocked = wasLayoutLocked;
|
||||||
PerformLayout();
|
PerformLayout();
|
||||||
|
|||||||
@@ -116,8 +116,7 @@ namespace FlaxEditor.Content.Import
|
|||||||
if (FileTypes.TryGetValue(extension, out ImportFileEntryHandler createDelegate))
|
if (FileTypes.TryGetValue(extension, out ImportFileEntryHandler createDelegate))
|
||||||
return createDelegate(ref request);
|
return createDelegate(ref request);
|
||||||
|
|
||||||
// Use default type
|
return request.IsInBuilt ? new AssetImportEntry(ref request) : new ImportFileEntry(ref request);
|
||||||
return request.IsBinaryAsset ? new AssetImportEntry(ref request) : new ImportFileEntry(ref request);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void RegisterDefaultTypes()
|
internal static void RegisterDefaultTypes()
|
||||||
|
|||||||
@@ -117,8 +117,8 @@ namespace FlaxEditor.Content.Import
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// True if calculate model tangents, otherwise will import them.
|
/// True if calculate model tangents, otherwise will import them.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[EditorOrder(40), DefaultValue(true), EditorDisplay("Geometry"), Tooltip("Enable model tangent vectors recalculating")]
|
[EditorOrder(40), DefaultValue(false), EditorDisplay("Geometry"), Tooltip("Enable model tangent vectors recalculating")]
|
||||||
public bool CalculateTangents { get; set; } = true;
|
public bool CalculateTangents { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Calculated normals smoothing angle.
|
/// Calculated normals smoothing angle.
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ namespace FlaxEditor.Content.Import
|
|||||||
public string OutputPath;
|
public string OutputPath;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Flag set to true for binary assets handled by the engine internally.
|
/// Flag set to true for the assets handled by the engine internally.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsBinaryAsset;
|
public bool IsInBuilt;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Flag used to skip showing import settings dialog to used. Can be used for importing assets from code by plugins.
|
/// Flag used to skip showing import settings dialog to used. Can be used for importing assets from code by plugins.
|
||||||
|
|||||||
@@ -283,6 +283,13 @@ namespace FlaxEditor.Content.Import
|
|||||||
[EditorOrder(250), VisibleIf("PreserveAlphaCoverage"), DefaultValue(0.5f), Tooltip("The reference value for the alpha coverage preserving.")]
|
[EditorOrder(250), VisibleIf("PreserveAlphaCoverage"), DefaultValue(0.5f), Tooltip("The reference value for the alpha coverage preserving.")]
|
||||||
public float PreserveAlphaCoverageReference { get; set; } = 0.5f;
|
public float PreserveAlphaCoverageReference { get; set; } = 0.5f;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Texture group for streaming (negative if unused). See Streaming Settings.
|
||||||
|
/// </summary>
|
||||||
|
[CustomEditor(typeof(CustomEditors.Dedicated.TextureGroupEditor))]
|
||||||
|
[EditorOrder(300), Tooltip("Texture group for streaming (negative if unused). See Streaming Settings.")]
|
||||||
|
public int TextureGroup = -1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The sprites. Used to keep created sprites on sprite atlas reimport.
|
/// The sprites. Used to keep created sprites on sprite atlas reimport.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -305,6 +312,7 @@ namespace FlaxEditor.Content.Import
|
|||||||
public float PreserveAlphaCoverageReference;
|
public float PreserveAlphaCoverageReference;
|
||||||
public float Scale;
|
public float Scale;
|
||||||
public int MaxSize;
|
public int MaxSize;
|
||||||
|
public int TextureGroup;
|
||||||
public Int2 Size;
|
public Int2 Size;
|
||||||
public Rectangle[] SpriteAreas;
|
public Rectangle[] SpriteAreas;
|
||||||
public string[] SpriteNames;
|
public string[] SpriteNames;
|
||||||
@@ -327,7 +335,8 @@ namespace FlaxEditor.Content.Import
|
|||||||
PreserveAlphaCoverageReference = PreserveAlphaCoverageReference,
|
PreserveAlphaCoverageReference = PreserveAlphaCoverageReference,
|
||||||
Scale = Scale,
|
Scale = Scale,
|
||||||
Size = Size,
|
Size = Size,
|
||||||
MaxSize = (int)MaxSize
|
MaxSize = (int)MaxSize,
|
||||||
|
TextureGroup = TextureGroup,
|
||||||
};
|
};
|
||||||
if (Sprites != null && Sprites.Count > 0)
|
if (Sprites != null && Sprites.Count > 0)
|
||||||
{
|
{
|
||||||
@@ -362,6 +371,7 @@ namespace FlaxEditor.Content.Import
|
|||||||
PreserveAlphaCoverageReference = options.PreserveAlphaCoverageReference;
|
PreserveAlphaCoverageReference = options.PreserveAlphaCoverageReference;
|
||||||
Scale = options.Scale;
|
Scale = options.Scale;
|
||||||
MaxSize = ConvertMaxSize(options.MaxSize);
|
MaxSize = ConvertMaxSize(options.MaxSize);
|
||||||
|
TextureGroup = options.TextureGroup;
|
||||||
Size = options.Size;
|
Size = options.Size;
|
||||||
if (options.SpriteAreas != null)
|
if (options.SpriteAreas != null)
|
||||||
{
|
{
|
||||||
@@ -483,7 +493,9 @@ namespace FlaxEditor.Content.Import
|
|||||||
{
|
{
|
||||||
if (settings is TextureImportSettings o)
|
if (settings is TextureImportSettings o)
|
||||||
{
|
{
|
||||||
|
var sprites = o.Sprites ?? _settings.Sprites; // Preserve sprites if not specified to override
|
||||||
_settings = o;
|
_settings = o;
|
||||||
|
_settings.Sprites = sprites;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -108,6 +108,26 @@ namespace FlaxEditor.Content
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called when user dags this item into editor viewport or scene tree node.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context">The editor context (eg. editor viewport or scene tree node).</param>
|
||||||
|
/// <returns>True if item can be dropped in, otherwise false.</returns>
|
||||||
|
public virtual bool OnEditorDrag(object context)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called when user drops the item into editor viewport or scene tree node.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context">The editor context (eg. editor viewport or scene tree node).</param>
|
||||||
|
/// <returns>The spawned object.</returns>
|
||||||
|
public virtual Actor OnEditorDrop(object context)
|
||||||
|
{
|
||||||
|
throw new NotSupportedException($"Asset {GetType()} doesn't support dropping into viewport.");
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override bool DrawShadow => true;
|
protected override bool DrawShadow => true;
|
||||||
|
|
||||||
|
|||||||
@@ -103,14 +103,26 @@ namespace FlaxEditor.Content
|
|||||||
/// Implementation of <see cref="BinaryAssetItem"/> for <see cref="Model"/> assets.
|
/// Implementation of <see cref="BinaryAssetItem"/> for <see cref="Model"/> assets.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <seealso cref="FlaxEditor.Content.BinaryAssetItem" />
|
/// <seealso cref="FlaxEditor.Content.BinaryAssetItem" />
|
||||||
public class ModelAssetItem : BinaryAssetItem
|
public class ModelItem : BinaryAssetItem
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public ModelAssetItem(string path, ref Guid id, string typeName, Type type)
|
public ModelItem(string path, ref Guid id, string typeName, Type type)
|
||||||
: base(path, ref id, typeName, type, ContentItemSearchFilter.Model)
|
: base(path, ref id, typeName, type, ContentItemSearchFilter.Model)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override bool OnEditorDrag(object context)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override Actor OnEditorDrop(object context)
|
||||||
|
{
|
||||||
|
return new StaticModel { Model = FlaxEngine.Content.LoadAsync<Model>(ID) };
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void OnBuildTooltipText(StringBuilder sb)
|
protected override void OnBuildTooltipText(StringBuilder sb)
|
||||||
{
|
{
|
||||||
@@ -142,14 +154,26 @@ namespace FlaxEditor.Content
|
|||||||
/// Implementation of <see cref="BinaryAssetItem"/> for <see cref="SkinnedModel"/> assets.
|
/// Implementation of <see cref="BinaryAssetItem"/> for <see cref="SkinnedModel"/> assets.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <seealso cref="FlaxEditor.Content.BinaryAssetItem" />
|
/// <seealso cref="FlaxEditor.Content.BinaryAssetItem" />
|
||||||
public class SkinnedModelAssetItem : BinaryAssetItem
|
public class SkinnedModeItem : BinaryAssetItem
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public SkinnedModelAssetItem(string path, ref Guid id, string typeName, Type type)
|
public SkinnedModeItem(string path, ref Guid id, string typeName, Type type)
|
||||||
: base(path, ref id, typeName, type, ContentItemSearchFilter.Model)
|
: base(path, ref id, typeName, type, ContentItemSearchFilter.Model)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override bool OnEditorDrag(object context)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override Actor OnEditorDrop(object context)
|
||||||
|
{
|
||||||
|
return new AnimatedModel { SkinnedModel = FlaxEngine.Content.LoadAsync<SkinnedModel>(ID) };
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void OnBuildTooltipText(StringBuilder sb)
|
protected override void OnBuildTooltipText(StringBuilder sb)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,6 +20,6 @@ namespace FlaxEditor.Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.CSharpScript64;
|
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.CSharpScript128;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ namespace FlaxEditor.Content
|
|||||||
public override bool Exists => Directory.Exists(Path);
|
public override bool Exists => Directory.Exists(Path);
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.Folder64;
|
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.Folder128;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
internal override void UpdatePath(string value)
|
internal override void UpdatePath(string value)
|
||||||
|
|||||||
@@ -455,7 +455,7 @@ namespace FlaxEditor.Content
|
|||||||
const float thumbnailInShadowSize = 50.0f;
|
const float thumbnailInShadowSize = 50.0f;
|
||||||
var shadowRect = rectangle.MakeExpanded((DefaultThumbnailSize - thumbnailInShadowSize) * rectangle.Width / DefaultThumbnailSize * 1.3f);
|
var shadowRect = rectangle.MakeExpanded((DefaultThumbnailSize - thumbnailInShadowSize) * rectangle.Width / DefaultThumbnailSize * 1.3f);
|
||||||
if (!_shadowIcon.IsValid)
|
if (!_shadowIcon.IsValid)
|
||||||
_shadowIcon = Editor.Instance.Icons.AssetShadow;
|
_shadowIcon = Editor.Instance.Icons.AssetShadow128;
|
||||||
Render2D.DrawSprite(_shadowIcon, shadowRect);
|
Render2D.DrawSprite(_shadowIcon, shadowRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,6 @@ namespace FlaxEditor.Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.CppScript64;
|
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.CPPScript128;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,6 @@ namespace FlaxEditor.Content
|
|||||||
public override ContentItemSearchFilter SearchFilter => ContentItemSearchFilter.Other;
|
public override ContentItemSearchFilter SearchFilter => ContentItemSearchFilter.Other;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.Document64;
|
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.Document128;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ namespace FlaxEditor.Content
|
|||||||
/// <seealso cref="FlaxEditor.Content.AssetItem" />
|
/// <seealso cref="FlaxEditor.Content.AssetItem" />
|
||||||
public class JsonAssetItem : AssetItem
|
public class JsonAssetItem : AssetItem
|
||||||
{
|
{
|
||||||
|
private readonly SpriteHandle _thumbnail;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="JsonAssetItem"/> class.
|
/// Initializes a new instance of the <see cref="JsonAssetItem"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -20,13 +22,27 @@ namespace FlaxEditor.Content
|
|||||||
public JsonAssetItem(string path, Guid id, string typeName)
|
public JsonAssetItem(string path, Guid id, string typeName)
|
||||||
: base(path, typeName, ref id)
|
: base(path, typeName, ref id)
|
||||||
{
|
{
|
||||||
|
_thumbnail = Editor.Instance.Icons.Json128;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="JsonAssetItem"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="path">The path.</param>
|
||||||
|
/// <param name="id">The identifier.</param>
|
||||||
|
/// <param name="typeName">Name of the resource type.</param>
|
||||||
|
/// <param name="thumbnail">Asset icon.</param>
|
||||||
|
public JsonAssetItem(string path, Guid id, string typeName, SpriteHandle thumbnail)
|
||||||
|
: base(path, typeName, ref id)
|
||||||
|
{
|
||||||
|
_thumbnail = thumbnail;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override ContentItemSearchFilter SearchFilter => ContentItemSearchFilter.Json;
|
public override ContentItemSearchFilter SearchFilter => ContentItemSearchFilter.Json;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.Document64;
|
public override SpriteHandle DefaultThumbnail => _thumbnail;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override bool DrawShadow => false;
|
protected override bool DrawShadow => false;
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ namespace FlaxEditor.Content
|
|||||||
public override ContentItemSearchFilter SearchFilter => ContentItemSearchFilter.Other;
|
public override ContentItemSearchFilter SearchFilter => ContentItemSearchFilter.Other;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.Document64;
|
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.Document128;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override bool DrawShadow => true;
|
protected override bool DrawShadow => true;
|
||||||
|
|||||||
@@ -21,6 +21,18 @@ namespace FlaxEditor.Content
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override bool OnEditorDrag(object context)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override Actor OnEditorDrop(object context)
|
||||||
|
{
|
||||||
|
return PrefabManager.SpawnPrefab(FlaxEngine.Content.LoadAsync<Prefab>(ID), null);
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override ContentItemType ItemType => ContentItemType.Asset;
|
public override ContentItemType ItemType => ContentItemType.Asset;
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ namespace FlaxEditor.Content
|
|||||||
public override ContentItemSearchFilter SearchFilter => ContentItemSearchFilter.Scene;
|
public override ContentItemSearchFilter SearchFilter => ContentItemSearchFilter.Scene;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.Scene64;
|
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.Scene128;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override bool IsOfType(Type type)
|
public override bool IsOfType(Type type)
|
||||||
|
|||||||
@@ -27,6 +27,6 @@ namespace FlaxEditor.Content
|
|||||||
public override ContentItemSearchFilter SearchFilter => ContentItemSearchFilter.Shader;
|
public override ContentItemSearchFilter SearchFilter => ContentItemSearchFilter.Shader;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.Document64;
|
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.Document128;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ namespace FlaxEditor.Content
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
public int MetadataToken => 0;
|
public int MetadataToken => 0;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
@@ -538,7 +539,19 @@ namespace FlaxEditor.Content
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.CodeScript64;
|
public override bool OnEditorDrag(object context)
|
||||||
|
{
|
||||||
|
return new ScriptType(typeof(Actor)).IsAssignableFrom(ScriptType) && ScriptType.CanCreateInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override Actor OnEditorDrop(object context)
|
||||||
|
{
|
||||||
|
return (Actor)ScriptType.CreateInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override SpriteHandle DefaultThumbnail => Editor.Instance.Icons.VisualScript128;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override bool DrawShadow => false;
|
protected override bool DrawShadow => false;
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ void PreviewsCache::FlushTask::OnEnd()
|
|||||||
ThreadPoolTask::OnEnd();
|
ThreadPoolTask::OnEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
REGISTER_BINARY_ASSET(PreviewsCache, "FlaxEditor.PreviewsCache", ::New<TextureAssetUpgrader>(), false);
|
REGISTER_BINARY_ASSET_WITH_UPGRADER(PreviewsCache, "FlaxEditor.PreviewsCache", TextureAssetUpgrader, false);
|
||||||
|
|
||||||
PreviewsCache::PreviewsCache(const SpawnParams& params, const AssetInfo* info)
|
PreviewsCache::PreviewsCache(const SpawnParams& params, const AssetInfo* info)
|
||||||
: SpriteAtlas(params, info)
|
: SpriteAtlas(params, info)
|
||||||
@@ -241,16 +241,13 @@ CreateAssetResult PreviewsCache::create(CreateAssetContext& context)
|
|||||||
IMPORT_SETUP(PreviewsCache, 4);
|
IMPORT_SETUP(PreviewsCache, 4);
|
||||||
|
|
||||||
// Create texture header (custom data)
|
// Create texture header (custom data)
|
||||||
TextureHeader header;
|
TextureHeader textureHeader;
|
||||||
header.Width = ASSETS_ICONS_ATLAS_SIZE;
|
textureHeader.Width = ASSETS_ICONS_ATLAS_SIZE;
|
||||||
header.Height = ASSETS_ICONS_ATLAS_SIZE;
|
textureHeader.Height = ASSETS_ICONS_ATLAS_SIZE;
|
||||||
header.Format = ASSETS_ICONS_ATLAS_FORMAT;
|
textureHeader.Format = ASSETS_ICONS_ATLAS_FORMAT;
|
||||||
header.IsSRGB = false;
|
textureHeader.MipLevels = 1;
|
||||||
header.IsCubeMap = false;
|
textureHeader.NeverStream = true;
|
||||||
header.MipLevels = 1;
|
context.Data.CustomData.Copy(&textureHeader);
|
||||||
header.NeverStream = true;
|
|
||||||
header.Type = TextureFormatType::Unknown;
|
|
||||||
context.Data.CustomData.Copy(&header);
|
|
||||||
|
|
||||||
// Create blank image (chunk 0)
|
// Create blank image (chunk 0)
|
||||||
uint64 imageSize = CalculateTextureMemoryUsage(ASSETS_ICONS_ATLAS_FORMAT, ASSETS_ICONS_ATLAS_SIZE, ASSETS_ICONS_ATLAS_SIZE, 1);
|
uint64 imageSize = CalculateTextureMemoryUsage(ASSETS_ICONS_ATLAS_FORMAT, ASSETS_ICONS_ATLAS_SIZE, ASSETS_ICONS_ATLAS_SIZE, 1);
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
using FlaxEditor.Content.Thumbnails;
|
using FlaxEditor.Content.Thumbnails;
|
||||||
using FlaxEditor.Viewport.Previews;
|
using FlaxEditor.Viewport.Previews;
|
||||||
using FlaxEditor.Windows;
|
using FlaxEditor.Windows;
|
||||||
@@ -11,11 +12,51 @@ using FlaxEngine.GUI;
|
|||||||
|
|
||||||
namespace FlaxEditor.Content
|
namespace FlaxEditor.Content
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Implementation of <see cref="BinaryAssetItem"/> for <see cref="AudioClip"/> assets.
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="FlaxEditor.Content.BinaryAssetItem" />
|
||||||
|
class AudioClipItem : BinaryAssetItem
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public AudioClipItem(string path, ref Guid id, string typeName, Type type)
|
||||||
|
: base(path, ref id, typeName, type, ContentItemSearchFilter.Audio)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override bool OnEditorDrag(object context)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override Actor OnEditorDrop(object context)
|
||||||
|
{
|
||||||
|
return new AudioSource { Clip = FlaxEngine.Content.LoadAsync<AudioClip>(ID) };
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void OnBuildTooltipText(StringBuilder sb)
|
||||||
|
{
|
||||||
|
base.OnBuildTooltipText(sb);
|
||||||
|
|
||||||
|
var asset = FlaxEngine.Content.Load<AudioClip>(ID, 100);
|
||||||
|
if (asset)
|
||||||
|
{
|
||||||
|
var info = asset.Info;
|
||||||
|
sb.Append("Duration: ").Append(asset.Length).AppendLine();
|
||||||
|
sb.Append("Channels: ").Append(info.NumChannels).AppendLine();
|
||||||
|
sb.Append("Bit Depth: ").Append(info.BitDepth).AppendLine();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A <see cref="AudioClip"/> asset proxy object.
|
/// A <see cref="AudioClip"/> asset proxy object.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <seealso cref="FlaxEditor.Content.BinaryAssetProxy" />
|
/// <seealso cref="FlaxEditor.Content.BinaryAssetProxy" />
|
||||||
public class AudioClipProxy : BinaryAssetProxy
|
class AudioClipProxy : BinaryAssetProxy
|
||||||
{
|
{
|
||||||
private List<AudioClipPreview> _previews;
|
private List<AudioClipPreview> _previews;
|
||||||
|
|
||||||
@@ -34,6 +75,12 @@ namespace FlaxEditor.Content
|
|||||||
return new AudioClipWindow(editor, (AssetItem)item);
|
return new AudioClipWindow(editor, (AssetItem)item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override AssetItem ConstructItem(string path, string typeName, ref Guid id)
|
||||||
|
{
|
||||||
|
return new AudioClipItem(path, ref id, typeName, AssetType);
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override Color AccentColor => Color.FromRGB(0xB3452B);
|
public override Color AccentColor => Color.FromRGB(0xB3452B);
|
||||||
|
|
||||||
|
|||||||
@@ -47,9 +47,9 @@ namespace FlaxEditor.Content
|
|||||||
if (typeof(TextureBase).IsAssignableFrom(type))
|
if (typeof(TextureBase).IsAssignableFrom(type))
|
||||||
return new TextureAssetItem(path, ref id, typeName, type);
|
return new TextureAssetItem(path, ref id, typeName, type);
|
||||||
if (typeof(Model).IsAssignableFrom(type))
|
if (typeof(Model).IsAssignableFrom(type))
|
||||||
return new ModelAssetItem(path, ref id, typeName, type);
|
return new ModelItem(path, ref id, typeName, type);
|
||||||
if (typeof(SkinnedModel).IsAssignableFrom(type))
|
if (typeof(SkinnedModel).IsAssignableFrom(type))
|
||||||
return new SkinnedModelAssetItem(path, ref id, typeName, type);
|
return new SkinnedModeItem(path, ref id, typeName, type);
|
||||||
|
|
||||||
ContentItemSearchFilter searchFilter;
|
ContentItemSearchFilter searchFilter;
|
||||||
if (typeof(MaterialBase).IsAssignableFrom(type))
|
if (typeof(MaterialBase).IsAssignableFrom(type))
|
||||||
@@ -58,11 +58,9 @@ namespace FlaxEditor.Content
|
|||||||
searchFilter = ContentItemSearchFilter.Prefab;
|
searchFilter = ContentItemSearchFilter.Prefab;
|
||||||
else if (typeof(SceneAsset).IsAssignableFrom(type))
|
else if (typeof(SceneAsset).IsAssignableFrom(type))
|
||||||
searchFilter = ContentItemSearchFilter.Scene;
|
searchFilter = ContentItemSearchFilter.Scene;
|
||||||
else if (typeof(AudioClip).IsAssignableFrom(type))
|
|
||||||
searchFilter = ContentItemSearchFilter.Audio;
|
|
||||||
else if (typeof(Animation).IsAssignableFrom(type))
|
else if (typeof(Animation).IsAssignableFrom(type))
|
||||||
searchFilter = ContentItemSearchFilter.Animation;
|
searchFilter = ContentItemSearchFilter.Animation;
|
||||||
else if (typeof(ParticleEmitter).IsAssignableFrom(type) || typeof(ParticleSystem).IsAssignableFrom(type))
|
else if (typeof(ParticleEmitter).IsAssignableFrom(type))
|
||||||
searchFilter = ContentItemSearchFilter.Particles;
|
searchFilter = ContentItemSearchFilter.Particles;
|
||||||
else
|
else
|
||||||
searchFilter = ContentItemSearchFilter.Other;
|
searchFilter = ContentItemSearchFilter.Other;
|
||||||
|
|||||||
@@ -8,11 +8,36 @@ using FlaxEngine;
|
|||||||
|
|
||||||
namespace FlaxEditor.Content
|
namespace FlaxEditor.Content
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Implementation of <see cref="BinaryAssetItem"/> for <see cref="CollisionData"/> assets.
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="FlaxEditor.Content.BinaryAssetItem" />
|
||||||
|
class CollisionDataItem : BinaryAssetItem
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public CollisionDataItem(string path, ref Guid id, string typeName, Type type)
|
||||||
|
: base(path, ref id, typeName, type, ContentItemSearchFilter.Other)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override bool OnEditorDrag(object context)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override Actor OnEditorDrop(object context)
|
||||||
|
{
|
||||||
|
return new MeshCollider { CollisionData = FlaxEngine.Content.LoadAsync<CollisionData>(ID) };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A <see cref="CollisionData"/> asset proxy object.
|
/// A <see cref="CollisionData"/> asset proxy object.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <seealso cref="FlaxEditor.Content.BinaryAssetProxy" />
|
/// <seealso cref="FlaxEditor.Content.BinaryAssetProxy" />
|
||||||
public class CollisionDataProxy : BinaryAssetProxy
|
class CollisionDataProxy : BinaryAssetProxy
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override string Name => "Collision Data";
|
public override string Name => "Collision Data";
|
||||||
@@ -23,6 +48,12 @@ namespace FlaxEditor.Content
|
|||||||
return new CollisionDataWindow(editor, item as AssetItem);
|
return new CollisionDataWindow(editor, item as AssetItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override AssetItem ConstructItem(string path, string typeName, ref Guid id)
|
||||||
|
{
|
||||||
|
return new CollisionDataItem(path, ref id, typeName, AssetType);
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override Color AccentColor => Color.FromRGB(0x2c3e50);
|
public override Color AccentColor => Color.FromRGB(0x2c3e50);
|
||||||
|
|
||||||
|
|||||||
@@ -73,6 +73,16 @@ namespace FlaxEditor.Content
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Determines whether the specified filename is valid for this proxy.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="filename">The filename.</param>
|
||||||
|
/// <returns><c>true</c> if the filename is valid, otherwise <c>false</c>.</returns>
|
||||||
|
public virtual bool IsFileNameValid(string filename)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Determines whether this proxy can create items in the specified target location.
|
/// Determines whether this proxy can create items in the specified target location.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -0,0 +1,134 @@
|
|||||||
|
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using FlaxEditor.Content.Settings;
|
||||||
|
using FlaxEngine;
|
||||||
|
|
||||||
|
namespace FlaxEditor.Content
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Context proxy object for C++ files.
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="FlaxEditor.Content.CSharpScriptProxy" />
|
||||||
|
public abstract class CppProxy : ScriptProxy
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the paths for header and source files to format.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="headerTemplate">The header template path.</param>
|
||||||
|
/// <param name="sourceTemplate">The source template path.</param>
|
||||||
|
protected abstract void GetTemplatePaths(out string headerTemplate, out string sourceTemplate);
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override bool IsProxyFor(ContentItem item)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override void Create(string outputPath, object arg)
|
||||||
|
{
|
||||||
|
// Find the module that this script is being added (based on the path)
|
||||||
|
var module = string.Empty;
|
||||||
|
var project = TryGetProjectAtFolder(outputPath, out var moduleName);
|
||||||
|
if (project != null)
|
||||||
|
{
|
||||||
|
module = moduleName.ToUpperInvariant() + "_API ";
|
||||||
|
}
|
||||||
|
|
||||||
|
var gameSettings = GameSettings.Load();
|
||||||
|
var scriptName = ScriptItem.CreateScriptName(outputPath);
|
||||||
|
var filename = Path.GetFileNameWithoutExtension(outputPath);
|
||||||
|
var copyrightComment = string.IsNullOrEmpty(gameSettings.CopyrightNotice) ? string.Empty : string.Format("// {0}{1}{1}", gameSettings.CopyrightNotice, Environment.NewLine);
|
||||||
|
|
||||||
|
GetTemplatePaths(out var headerTemplatePath, out var sourceTemplatePath);
|
||||||
|
if (headerTemplatePath != null)
|
||||||
|
{
|
||||||
|
var headerTemplate = File.ReadAllText(headerTemplatePath);
|
||||||
|
headerTemplate = headerTemplate.Replace("%copyright%", copyrightComment);
|
||||||
|
headerTemplate = headerTemplate.Replace("%class%", scriptName);
|
||||||
|
headerTemplate = headerTemplate.Replace("%module%", module);
|
||||||
|
headerTemplate = headerTemplate.Replace("%filename%", filename);
|
||||||
|
File.WriteAllText(Path.ChangeExtension(outputPath, ".h"), headerTemplate, Encoding.UTF8);
|
||||||
|
}
|
||||||
|
if (sourceTemplatePath != null)
|
||||||
|
{
|
||||||
|
var sourceTemplate = File.ReadAllText(sourceTemplatePath);
|
||||||
|
sourceTemplate = sourceTemplate.Replace("%copyright%", copyrightComment);
|
||||||
|
sourceTemplate = sourceTemplate.Replace("%class%", scriptName);
|
||||||
|
sourceTemplate = sourceTemplate.Replace("%module%", module);
|
||||||
|
sourceTemplate = sourceTemplate.Replace("%filename%", filename);
|
||||||
|
File.WriteAllText(outputPath, sourceTemplate, Encoding.UTF8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override string FileExtension => "cpp";
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override Color AccentColor => Color.FromRGB(0x9c1c9c);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Context proxy object for C++ script files.
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="FlaxEditor.Content.CSharpScriptProxy" />
|
||||||
|
public class CppScriptProxy : CppProxy
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override string Name => "C++ Script";
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override bool IsProxyFor(ContentItem item)
|
||||||
|
{
|
||||||
|
return item is CppScriptItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void GetTemplatePaths(out string headerTemplate, out string sourceTemplate)
|
||||||
|
{
|
||||||
|
headerTemplate = StringUtils.CombinePaths(Globals.EngineContentFolder, "Editor/Scripting/ScriptTemplate.h");
|
||||||
|
sourceTemplate = StringUtils.CombinePaths(Globals.EngineContentFolder, "Editor/Scripting/ScriptTemplate.cpp");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Context proxy object for C++ Json Asset files.
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="FlaxEditor.Content.CSharpScriptProxy" />
|
||||||
|
public class CppStaticClassProxy : CppProxy
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override string Name => "C++ Function Library";
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void GetTemplatePaths(out string headerTemplate, out string sourceTemplate)
|
||||||
|
{
|
||||||
|
headerTemplate = StringUtils.CombinePaths(Globals.EngineContentFolder, "Editor/Scripting/CppStaticClassTemplate.h");
|
||||||
|
sourceTemplate = StringUtils.CombinePaths(Globals.EngineContentFolder, "Editor/Scripting/CppStaticClassTemplate.cpp");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Context proxy object for C++ Json Asset files.
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="FlaxEditor.Content.CSharpScriptProxy" />
|
||||||
|
public class CppAssetProxy : CppProxy
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override string Name => "C++ Json Asset";
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void GetTemplatePaths(out string headerTemplate, out string sourceTemplate)
|
||||||
|
{
|
||||||
|
headerTemplate = null;
|
||||||
|
sourceTemplate = StringUtils.CombinePaths(Globals.EngineContentFolder, "Editor/Scripting/CppAssetTemplate.h");
|
||||||
|
//sourceTemplate = StringUtils.CombinePaths(Globals.EngineContentFolder, "Editor/Scripting/CppAssetTemplate.cpp");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override string FileExtension => "h";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using System.Text;
|
|
||||||
using FlaxEditor.Content.Settings;
|
|
||||||
using FlaxEngine;
|
|
||||||
|
|
||||||
namespace FlaxEditor.Content
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Context proxy object for C++ script files.
|
|
||||||
/// </summary>
|
|
||||||
/// <seealso cref="FlaxEditor.Content.CSharpScriptProxy" />
|
|
||||||
public class CppScriptProxy : ScriptProxy
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public override string Name => "C++ Script";
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public override bool IsProxyFor(ContentItem item)
|
|
||||||
{
|
|
||||||
return item is CppScriptItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public override void Create(string outputPath, object arg)
|
|
||||||
{
|
|
||||||
// Load templates
|
|
||||||
var headerTemplate = File.ReadAllText(StringUtils.CombinePaths(Globals.EngineContentFolder, "Editor/Scripting/ScriptTemplate.h"));
|
|
||||||
var sourceTemplate = File.ReadAllText(StringUtils.CombinePaths(Globals.EngineContentFolder, "Editor/Scripting/ScriptTemplate.cpp"));
|
|
||||||
|
|
||||||
// Find the module that this script is being added (based on the path)
|
|
||||||
var module = string.Empty;
|
|
||||||
var project = TryGetProjectAtFolder(outputPath, out var moduleName);
|
|
||||||
if (project != null)
|
|
||||||
{
|
|
||||||
module = moduleName.ToUpperInvariant() + "_API ";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Format
|
|
||||||
var gameSettings = GameSettings.Load();
|
|
||||||
var scriptName = ScriptItem.CreateScriptName(outputPath);
|
|
||||||
var filename = Path.GetFileNameWithoutExtension(outputPath);
|
|
||||||
var copyrightComment = string.IsNullOrEmpty(gameSettings.CopyrightNotice) ? string.Empty : string.Format("// {0}{1}{1}", gameSettings.CopyrightNotice, Environment.NewLine);
|
|
||||||
headerTemplate = headerTemplate.Replace("%copyright%", copyrightComment);
|
|
||||||
headerTemplate = headerTemplate.Replace("%class%", scriptName);
|
|
||||||
headerTemplate = headerTemplate.Replace("%module%", module);
|
|
||||||
sourceTemplate = sourceTemplate.Replace("%filename%", filename);
|
|
||||||
sourceTemplate = sourceTemplate.Replace("%copyright%", copyrightComment);
|
|
||||||
sourceTemplate = sourceTemplate.Replace("%class%", scriptName);
|
|
||||||
sourceTemplate = sourceTemplate.Replace("%filename%", filename);
|
|
||||||
|
|
||||||
// Save
|
|
||||||
File.WriteAllText(Path.ChangeExtension(outputPath, ".h"), headerTemplate, Encoding.UTF8);
|
|
||||||
File.WriteAllText(outputPath, sourceTemplate, Encoding.UTF8);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public override string FileExtension => "cpp";
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public override Color AccentColor => Color.FromRGB(0x9c1c9c);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using FlaxEditor.Content.Create;
|
using FlaxEditor.Content.Create;
|
||||||
using FlaxEditor.Content.Settings;
|
|
||||||
using FlaxEditor.CustomEditors;
|
using FlaxEditor.CustomEditors;
|
||||||
using FlaxEditor.CustomEditors.Editors;
|
using FlaxEditor.CustomEditors.Editors;
|
||||||
using FlaxEditor.Windows;
|
using FlaxEditor.Windows;
|
||||||
@@ -45,18 +44,12 @@ namespace FlaxEditor.Content
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override bool IsProxyFor(ContentItem item)
|
public override bool IsProxyFor(ContentItem item)
|
||||||
{
|
{
|
||||||
return item is JsonAssetItem;
|
return item is JsonAssetItem json && json.TypeName == TypeName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override Color AccentColor => Color.FromRGB(0xd14f67);
|
public override Color AccentColor => Color.FromRGB(0xd14f67);
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public override bool AcceptsAsset(string typeName, string path)
|
|
||||||
{
|
|
||||||
return typeName == TypeName && base.AcceptsAsset(typeName, path);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override AssetItem ConstructItem(string path, string typeName, ref Guid id)
|
public override AssetItem ConstructItem(string path, string typeName, ref Guid id)
|
||||||
{
|
{
|
||||||
@@ -99,6 +92,7 @@ namespace FlaxEditor.Content
|
|||||||
!type.IsAbstract &&
|
!type.IsAbstract &&
|
||||||
!type.IsGenericType &&
|
!type.IsGenericType &&
|
||||||
type.Type.GetConstructor(Type.EmptyTypes) != null &&
|
type.Type.GetConstructor(Type.EmptyTypes) != null &&
|
||||||
|
!typeof(FlaxEngine.GUI.Control).IsAssignableFrom(type.Type) &&
|
||||||
!typeof(FlaxEngine.Object).IsAssignableFrom(type.Type);
|
!typeof(FlaxEngine.Object).IsAssignableFrom(type.Type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -143,6 +137,12 @@ namespace FlaxEditor.Content
|
|||||||
return path.EndsWith(FileExtension, StringComparison.OrdinalIgnoreCase);
|
return path.EndsWith(FileExtension, StringComparison.OrdinalIgnoreCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override bool IsProxyFor(ContentItem item)
|
||||||
|
{
|
||||||
|
return item is JsonAssetItem;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override bool CanCreate(ContentFolder targetLocation)
|
public override bool CanCreate(ContentFolder targetLocation)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||||
|
|
||||||
|
using FlaxEditor.Windows;
|
||||||
|
using FlaxEditor.Windows.Assets;
|
||||||
|
using FlaxEngine;
|
||||||
|
|
||||||
|
namespace FlaxEditor.Content
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <see cref="LocalizedStringTable"/> proxy.
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="FlaxEditor.Content.JsonAssetProxy" />
|
||||||
|
public class LocalizedStringTableProxy : JsonAssetProxy
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override EditorWindow Open(Editor editor, ContentItem item)
|
||||||
|
{
|
||||||
|
return new LocalizedStringTableWindow(editor, (JsonAssetItem)item);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override string TypeName => "FlaxEngine.LocalizedStringTable";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -47,7 +47,7 @@ namespace FlaxEditor.Content
|
|||||||
|
|
||||||
menu.AddButton("Create collision data", () =>
|
menu.AddButton("Create collision data", () =>
|
||||||
{
|
{
|
||||||
var model = FlaxEngine.Content.LoadAsync<Model>(((ModelAssetItem)item).ID);
|
var model = FlaxEngine.Content.LoadAsync<Model>(((ModelItem)item).ID);
|
||||||
var collisionDataProxy = (CollisionDataProxy)Editor.Instance.ContentDatabase.GetProxy<CollisionData>();
|
var collisionDataProxy = (CollisionDataProxy)Editor.Instance.ContentDatabase.GetProxy<CollisionData>();
|
||||||
collisionDataProxy.CreateCollisionDataFromModel(model);
|
collisionDataProxy.CreateCollisionDataFromModel(model);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -10,6 +10,31 @@ using FlaxEngine.GUI;
|
|||||||
|
|
||||||
namespace FlaxEditor.Content
|
namespace FlaxEditor.Content
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Implementation of <see cref="BinaryAssetItem"/> for <see cref="ParticleSystem"/> assets.
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="FlaxEditor.Content.BinaryAssetItem" />
|
||||||
|
class ParticleSystemItem : BinaryAssetItem
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public ParticleSystemItem(string path, ref Guid id, string typeName, Type type)
|
||||||
|
: base(path, ref id, typeName, type, ContentItemSearchFilter.Particles)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override bool OnEditorDrag(object context)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override Actor OnEditorDrop(object context)
|
||||||
|
{
|
||||||
|
return new ParticleEffect { ParticleSystem = FlaxEngine.Content.LoadAsync<ParticleSystem>(ID) };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A <see cref="ParticleSystem"/> asset proxy object.
|
/// A <see cref="ParticleSystem"/> asset proxy object.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -28,6 +53,12 @@ namespace FlaxEditor.Content
|
|||||||
return new ParticleSystemWindow(editor, item as AssetItem);
|
return new ParticleSystemWindow(editor, item as AssetItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override AssetItem ConstructItem(string path, string typeName, ref Guid id)
|
||||||
|
{
|
||||||
|
return new ParticleSystemItem(path, ref id, typeName, AssetType);
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override Color AccentColor => Color.FromRGB(0xFF790200);
|
public override Color AccentColor => Color.FromRGB(0xFF790200);
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,31 @@ using FlaxEngine;
|
|||||||
|
|
||||||
namespace FlaxEditor.Content
|
namespace FlaxEditor.Content
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Implementation of <see cref="BinaryAssetItem"/> for <see cref="SceneAnimation"/> assets.
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="FlaxEditor.Content.BinaryAssetItem" />
|
||||||
|
class SceneAnimationItem : BinaryAssetItem
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public SceneAnimationItem(string path, ref Guid id, string typeName, Type type)
|
||||||
|
: base(path, ref id, typeName, type, ContentItemSearchFilter.Other)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override bool OnEditorDrag(object context)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override Actor OnEditorDrop(object context)
|
||||||
|
{
|
||||||
|
return new SceneAnimationPlayer { Animation = FlaxEngine.Content.LoadAsync<SceneAnimation>(ID) };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A <see cref="SceneAnimation"/> asset proxy object.
|
/// A <see cref="SceneAnimation"/> asset proxy object.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -22,6 +47,12 @@ namespace FlaxEditor.Content
|
|||||||
return new SceneAnimationWindow(editor, item as AssetItem);
|
return new SceneAnimationWindow(editor, item as AssetItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override AssetItem ConstructItem(string path, string typeName, ref Guid id)
|
||||||
|
{
|
||||||
|
return new SceneAnimationItem(path, ref id, typeName, AssetType);
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override Color AccentColor => Color.FromRGB(0xff5c4a87);
|
public override Color AccentColor => Color.FromRGB(0xff5c4a87);
|
||||||
|
|
||||||
|
|||||||
@@ -66,6 +66,15 @@ namespace FlaxEditor.Content
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override bool IsFileNameValid(string filename)
|
||||||
|
{
|
||||||
|
// Scripts cannot start with digit.
|
||||||
|
if (Char.IsDigit(filename[0]))
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override void Create(string outputPath, object arg)
|
public override void Create(string outputPath, object arg)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using FlaxEditor.Content.Create;
|
using FlaxEditor.Content.Create;
|
||||||
using FlaxEditor.Content.Settings;
|
using FlaxEditor.Content.Settings;
|
||||||
|
using FlaxEngine;
|
||||||
|
|
||||||
namespace FlaxEditor.Content
|
namespace FlaxEditor.Content
|
||||||
{
|
{
|
||||||
@@ -13,15 +14,18 @@ namespace FlaxEditor.Content
|
|||||||
public sealed class SettingsProxy : JsonAssetProxy
|
public sealed class SettingsProxy : JsonAssetProxy
|
||||||
{
|
{
|
||||||
private readonly Type _type;
|
private readonly Type _type;
|
||||||
|
private readonly SpriteHandle _thumbnail;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="SettingsProxy"/> class.
|
/// Initializes a new instance of the <see cref="SettingsProxy"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="type">The settings asset type (must be subclass of SettingsBase type).</param>
|
/// <param name="type">The settings asset type (must be subclass of SettingsBase type).</param>
|
||||||
public SettingsProxy(Type type)
|
/// <param name="thumbnail">Asset icon.</param>
|
||||||
|
public SettingsProxy(Type type, SpriteHandle thumbnail)
|
||||||
{
|
{
|
||||||
_type = type;
|
_type = type;
|
||||||
TypeName = type.FullName;
|
TypeName = type.FullName;
|
||||||
|
_thumbnail = thumbnail;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
@@ -44,6 +48,12 @@ namespace FlaxEditor.Content
|
|||||||
Editor.Instance.ContentImporting.Create(new SettingsCreateEntry(outputPath));
|
Editor.Instance.ContentImporting.Create(new SettingsCreateEntry(outputPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override AssetItem ConstructItem(string path, string typeName, ref Guid id)
|
||||||
|
{
|
||||||
|
return new JsonAssetItem(path, id, typeName, _thumbnail);
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override bool IsProxyFor<T>()
|
public override bool IsProxyFor<T>()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ namespace FlaxEditor.Content
|
|||||||
/// <param name="type">The folder type.</param>
|
/// <param name="type">The folder type.</param>
|
||||||
/// <param name="path">The folder path.</param>
|
/// <param name="path">The folder path.</param>
|
||||||
protected ContentTreeNode(ContentTreeNode parent, ContentFolderType type, string path)
|
protected ContentTreeNode(ContentTreeNode parent, ContentFolderType type, string path)
|
||||||
: base(false, Editor.Instance.Icons.FolderClosed12, Editor.Instance.Icons.FolderOpened12)
|
: base(false, Editor.Instance.Icons.FolderClosed32, Editor.Instance.Icons.FolderOpen32)
|
||||||
{
|
{
|
||||||
_folder = new ContentFolder(type, path, this);
|
_folder = new ContentFolder(type, path, this);
|
||||||
Text = _folder.ShortName;
|
Text = _folder.ShortName;
|
||||||
|
|||||||
@@ -3,10 +3,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Engine/Core/Log.h"
|
#include "Engine/Core/Log.h"
|
||||||
#include "Engine/Core/Enums.h"
|
#include "Engine/Core/Types/Guid.h"
|
||||||
#include "Engine/Core/Collections/Array.h"
|
#include "Engine/Core/Collections/Array.h"
|
||||||
#include "Engine/Core/Collections/HashSet.h"
|
#include "Engine/Core/Collections/HashSet.h"
|
||||||
#include "Engine/Core/Collections/Dictionary.h"
|
#include "Engine/Core/Collections/Dictionary.h"
|
||||||
|
#include "Engine/Scripting/ScriptingObject.h"
|
||||||
|
|
||||||
class GameCooker;
|
class GameCooker;
|
||||||
class PlatformTools;
|
class PlatformTools;
|
||||||
@@ -87,34 +88,14 @@ API_ENUM() enum class BuildPlatform
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
API_ENUM(Attributes="EditorDisplay(null, \"Android ARM64 (arm64-v8a)\")")
|
API_ENUM(Attributes="EditorDisplay(null, \"Android ARM64 (arm64-v8a)\")")
|
||||||
AndroidARM64 = 9,
|
AndroidARM64 = 9,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Switch.
|
||||||
|
/// </summary>
|
||||||
|
Switch = 10,
|
||||||
};
|
};
|
||||||
|
|
||||||
inline const Char* ToString(const BuildPlatform platform)
|
extern FLAXENGINE_API const Char* ToString(const BuildPlatform platform);
|
||||||
{
|
|
||||||
switch (platform)
|
|
||||||
{
|
|
||||||
case BuildPlatform::Windows32:
|
|
||||||
return TEXT("Windows x86");
|
|
||||||
case BuildPlatform::Windows64:
|
|
||||||
return TEXT("Windows x64");
|
|
||||||
case BuildPlatform::UWPx86:
|
|
||||||
return TEXT("Windows Store x86");
|
|
||||||
case BuildPlatform::UWPx64:
|
|
||||||
return TEXT("Windows Store x64");
|
|
||||||
case BuildPlatform::XboxOne:
|
|
||||||
return TEXT("Xbox One");
|
|
||||||
case BuildPlatform::LinuxX64:
|
|
||||||
return TEXT("Linux x64");
|
|
||||||
case BuildPlatform::PS4:
|
|
||||||
return TEXT("PlayStation 4");
|
|
||||||
case BuildPlatform::XboxScarlett:
|
|
||||||
return TEXT("Xbox Scarlett");
|
|
||||||
case BuildPlatform::AndroidARM64:
|
|
||||||
return TEXT("Android ARM64");
|
|
||||||
default:
|
|
||||||
return TEXT("?");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Game build configuration modes.
|
/// Game build configuration modes.
|
||||||
@@ -137,57 +118,67 @@ API_ENUM() enum class BuildConfiguration
|
|||||||
Release = 2,
|
Release = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
inline const Char* ToString(const BuildConfiguration configuration)
|
extern FLAXENGINE_API const Char* ToString(const BuildConfiguration configuration);
|
||||||
{
|
|
||||||
switch (configuration)
|
|
||||||
{
|
|
||||||
case BuildConfiguration::Debug:
|
|
||||||
return TEXT("Debug");
|
|
||||||
case BuildConfiguration::Development:
|
|
||||||
return TEXT("Development");
|
|
||||||
case BuildConfiguration::Release:
|
|
||||||
return TEXT("Release");
|
|
||||||
default:
|
|
||||||
return TEXT("?");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#define BUILD_STEP_CANCEL_CHECK if (GameCooker::IsCancelRequested()) return true
|
#define BUILD_STEP_CANCEL_CHECK if (GameCooker::IsCancelRequested()) return true
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Game cooking temporary data.
|
/// Game cooking temporary data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
struct FLAXENGINE_API CookingData
|
API_CLASS(Sealed, Namespace="FlaxEditor") class FLAXENGINE_API CookingData : public PersistentScriptingObject
|
||||||
{
|
{
|
||||||
|
DECLARE_SCRIPTING_TYPE(CookingData);
|
||||||
|
public:
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The platform.
|
/// The platform.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
BuildPlatform Platform;
|
API_FIELD(ReadOnly) BuildPlatform Platform;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The configuration.
|
/// The configuration.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
BuildConfiguration Configuration;
|
API_FIELD(ReadOnly) BuildConfiguration Configuration;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The options.
|
/// The options.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
BuildOptions Options;
|
API_FIELD(ReadOnly) BuildOptions Options;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The name of build preset used for cooking (can be used by editor and game plugins).
|
||||||
|
/// </summary>
|
||||||
|
API_FIELD(ReadOnly) String Preset;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The name of build preset target used for cooking (can be used by editor and game plugins).
|
||||||
|
/// </summary>
|
||||||
|
API_FIELD(ReadOnly) String PresetTarget;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The list of custom defines passed to the build tool when compiling project scripts. Can be used in build scripts for configuration (Configuration.CustomDefines).
|
/// The list of custom defines passed to the build tool when compiling project scripts. Can be used in build scripts for configuration (Configuration.CustomDefines).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Array<String> CustomDefines;
|
API_FIELD(ReadOnly) Array<String> CustomDefines;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The original output path (actual OutputPath could be modified by the Platform Tools or a plugin for additional layout customizations or packaging). This path is preserved.
|
/// The original output path (actual OutputPath could be modified by the Platform Tools or a plugin for additional layout customizations or packaging). This path is preserved.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
String OriginalOutputPath;
|
API_FIELD(ReadOnly) String OriginalOutputPath;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The output path.
|
/// The output path for data files (Content, Mono, etc.).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
String OutputPath;
|
API_FIELD(ReadOnly) String DataOutputPath;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The output path for binaries (native executable and native code libraries).
|
||||||
|
/// </summary>
|
||||||
|
API_FIELD(ReadOnly) String NativeCodeOutputPath;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The output path for binaries (C# code libraries).
|
||||||
|
/// </summary>
|
||||||
|
API_FIELD(ReadOnly) String ManagedCodeOutputPath;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The platform tools.
|
/// The platform tools.
|
||||||
@@ -270,7 +261,7 @@ public:
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
HashSet<Guid> Assets;
|
HashSet<Guid> Assets;
|
||||||
|
|
||||||
struct BinaryModule
|
struct BinaryModuleInfo
|
||||||
{
|
{
|
||||||
String Name;
|
String Name;
|
||||||
String NativePath;
|
String NativePath;
|
||||||
@@ -280,17 +271,10 @@ public:
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The binary modules used in the build. Valid after scripts compilation step. This list includes game, all plugins modules and engine module.
|
/// The binary modules used in the build. Valid after scripts compilation step. This list includes game, all plugins modules and engine module.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Array<BinaryModule, InlinedAllocation<64>> BinaryModules;
|
Array<BinaryModuleInfo, InlinedAllocation<64>> BinaryModules;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void Init()
|
|
||||||
{
|
|
||||||
RootAssets.Clear();
|
|
||||||
Assets.Clear();
|
|
||||||
Stats = Statistics();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the absolute path to the Platform Data folder that contains the binary files used by the current build configuration.
|
/// Gets the absolute path to the Platform Data folder that contains the binary files used by the current build configuration.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#include "Engine/Serialization/JsonTools.h"
|
#include "Engine/Serialization/JsonTools.h"
|
||||||
#include "Engine/Content/Content.h"
|
#include "Engine/Content/Content.h"
|
||||||
#include "Engine/Engine/EngineService.h"
|
#include "Engine/Engine/EngineService.h"
|
||||||
|
#include "Engine/Engine/Globals.h"
|
||||||
#include "Engine/Threading/ThreadSpawner.h"
|
#include "Engine/Threading/ThreadSpawner.h"
|
||||||
#include "Engine/Platform/FileSystem.h"
|
#include "Engine/Platform/FileSystem.h"
|
||||||
#include "Steps/ValidateStep.h"
|
#include "Steps/ValidateStep.h"
|
||||||
@@ -25,6 +26,7 @@
|
|||||||
#include "Engine/Scripting/ManagedCLR/MAssembly.h"
|
#include "Engine/Scripting/ManagedCLR/MAssembly.h"
|
||||||
#include "Engine/Content/JsonAsset.h"
|
#include "Engine/Content/JsonAsset.h"
|
||||||
#include "Engine/Content/AssetReference.h"
|
#include "Engine/Content/AssetReference.h"
|
||||||
|
#include "Engine/Scripting/MException.h"
|
||||||
#if PLATFORM_TOOLS_WINDOWS
|
#if PLATFORM_TOOLS_WINDOWS
|
||||||
#include "Platform/Windows/WindowsPlatformTools.h"
|
#include "Platform/Windows/WindowsPlatformTools.h"
|
||||||
#include "Engine/Platform/Windows/WindowsPlatformSettings.h"
|
#include "Engine/Platform/Windows/WindowsPlatformSettings.h"
|
||||||
@@ -39,7 +41,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#if PLATFORM_TOOLS_PS4
|
#if PLATFORM_TOOLS_PS4
|
||||||
#include "Platforms/PS4/Editor/PlatformTools/PS4PlatformTools.h"
|
#include "Platforms/PS4/Editor/PlatformTools/PS4PlatformTools.h"
|
||||||
#include "Platforms/PS4/Engine/Platform/PS4PlatformSettings.h"
|
|
||||||
#endif
|
#endif
|
||||||
#if PLATFORM_TOOLS_XBOX_SCARLETT
|
#if PLATFORM_TOOLS_XBOX_SCARLETT
|
||||||
#include "Platforms/XboxScarlett/Editor/PlatformTools/XboxScarlettPlatformTools.h"
|
#include "Platforms/XboxScarlett/Editor/PlatformTools/XboxScarlettPlatformTools.h"
|
||||||
@@ -47,12 +48,15 @@
|
|||||||
#if PLATFORM_TOOLS_ANDROID
|
#if PLATFORM_TOOLS_ANDROID
|
||||||
#include "Platform/Android/AndroidPlatformTools.h"
|
#include "Platform/Android/AndroidPlatformTools.h"
|
||||||
#endif
|
#endif
|
||||||
|
#if PLATFORM_TOOLS_SWITCH
|
||||||
|
#include "Platforms/Switch/Editor/PlatformTools/SwitchPlatformTools.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace GameCookerImpl
|
namespace GameCookerImpl
|
||||||
{
|
{
|
||||||
MMethod* Internal_OnEvent = nullptr;
|
MMethod* Internal_OnEvent = nullptr;
|
||||||
MMethod* Internal_OnProgress = nullptr;
|
MMethod* Internal_OnProgress = nullptr;
|
||||||
MMethod* Internal_CanDeployPlugin = nullptr;
|
MMethod* Internal_OnCollectAssets = nullptr;
|
||||||
|
|
||||||
bool IsRunning = false;
|
bool IsRunning = false;
|
||||||
bool IsThreadRunning = false;
|
bool IsThreadRunning = false;
|
||||||
@@ -64,7 +68,7 @@ namespace GameCookerImpl
|
|||||||
String ProgressMsg;
|
String ProgressMsg;
|
||||||
float ProgressValue;
|
float ProgressValue;
|
||||||
|
|
||||||
CookingData Data;
|
CookingData* Data = nullptr;
|
||||||
Array<GameCooker::BuildStep*> Steps;
|
Array<GameCooker::BuildStep*> Steps;
|
||||||
Dictionary<BuildPlatform, PlatformTools*> Tools;
|
Dictionary<BuildPlatform, PlatformTools*> Tools;
|
||||||
|
|
||||||
@@ -74,6 +78,7 @@ namespace GameCookerImpl
|
|||||||
|
|
||||||
void CallEvent(GameCooker::EventType type);
|
void CallEvent(GameCooker::EventType type);
|
||||||
void ReportProgress(const String& info, float totalProgress);
|
void ReportProgress(const String& info, float totalProgress);
|
||||||
|
void OnCollectAssets(HashSet<Guid>& assets);
|
||||||
bool Build();
|
bool Build();
|
||||||
int32 ThreadFunction();
|
int32 ThreadFunction();
|
||||||
|
|
||||||
@@ -81,6 +86,7 @@ namespace GameCookerImpl
|
|||||||
{
|
{
|
||||||
Internal_OnEvent = nullptr;
|
Internal_OnEvent = nullptr;
|
||||||
Internal_OnProgress = nullptr;
|
Internal_OnProgress = nullptr;
|
||||||
|
Internal_OnCollectAssets = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,6 +94,51 @@ using namespace GameCookerImpl;
|
|||||||
|
|
||||||
Delegate<GameCooker::EventType> GameCooker::OnEvent;
|
Delegate<GameCooker::EventType> GameCooker::OnEvent;
|
||||||
Delegate<const String&, float> GameCooker::OnProgress;
|
Delegate<const String&, float> GameCooker::OnProgress;
|
||||||
|
Delegate<HashSet<Guid>&> GameCooker::OnCollectAssets;
|
||||||
|
|
||||||
|
const Char* ToString(const BuildPlatform platform)
|
||||||
|
{
|
||||||
|
switch (platform)
|
||||||
|
{
|
||||||
|
case BuildPlatform::Windows32:
|
||||||
|
return TEXT("Windows x86");
|
||||||
|
case BuildPlatform::Windows64:
|
||||||
|
return TEXT("Windows x64");
|
||||||
|
case BuildPlatform::UWPx86:
|
||||||
|
return TEXT("Windows Store x86");
|
||||||
|
case BuildPlatform::UWPx64:
|
||||||
|
return TEXT("Windows Store x64");
|
||||||
|
case BuildPlatform::XboxOne:
|
||||||
|
return TEXT("Xbox One");
|
||||||
|
case BuildPlatform::LinuxX64:
|
||||||
|
return TEXT("Linux x64");
|
||||||
|
case BuildPlatform::PS4:
|
||||||
|
return TEXT("PlayStation 4");
|
||||||
|
case BuildPlatform::XboxScarlett:
|
||||||
|
return TEXT("Xbox Scarlett");
|
||||||
|
case BuildPlatform::AndroidARM64:
|
||||||
|
return TEXT("Android ARM64");
|
||||||
|
case BuildPlatform::Switch:
|
||||||
|
return TEXT("Switch");
|
||||||
|
default:
|
||||||
|
return TEXT("?");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const Char* ToString(const BuildConfiguration configuration)
|
||||||
|
{
|
||||||
|
switch (configuration)
|
||||||
|
{
|
||||||
|
case BuildConfiguration::Debug:
|
||||||
|
return TEXT("Debug");
|
||||||
|
case BuildConfiguration::Development:
|
||||||
|
return TEXT("Development");
|
||||||
|
case BuildConfiguration::Release:
|
||||||
|
return TEXT("Release");
|
||||||
|
default:
|
||||||
|
return TEXT("?");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool CookingData::AssetTypeStatistics::operator<(const AssetTypeStatistics& other) const
|
bool CookingData::AssetTypeStatistics::operator<(const AssetTypeStatistics& other) const
|
||||||
{
|
{
|
||||||
@@ -103,6 +154,11 @@ CookingData::Statistics::Statistics()
|
|||||||
ContentSizeMB = 0;
|
ContentSizeMB = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CookingData::CookingData(const SpawnParams& params)
|
||||||
|
: PersistentScriptingObject(params)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
String CookingData::GetGameBinariesPath() const
|
String CookingData::GetGameBinariesPath() const
|
||||||
{
|
{
|
||||||
const Char* archDir;
|
const Char* archDir;
|
||||||
@@ -128,7 +184,7 @@ String CookingData::GetGameBinariesPath() const
|
|||||||
return String::Empty;
|
return String::Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
return GetPlatformBinariesRoot() / TEXT("Game") / archDir / ToString(Configuration);
|
return GetPlatformBinariesRoot() / TEXT("Game") / archDir / ::ToString(Configuration);
|
||||||
}
|
}
|
||||||
|
|
||||||
String CookingData::GetPlatformBinariesRoot() const
|
String CookingData::GetPlatformBinariesRoot() const
|
||||||
@@ -188,7 +244,7 @@ public:
|
|||||||
|
|
||||||
GameCookerService GameCookerServiceInstance;
|
GameCookerService GameCookerServiceInstance;
|
||||||
|
|
||||||
const CookingData& GameCooker::GetCurrentData()
|
CookingData* GameCooker::GetCurrentData()
|
||||||
{
|
{
|
||||||
return Data;
|
return Data;
|
||||||
}
|
}
|
||||||
@@ -250,6 +306,11 @@ PlatformTools* GameCooker::GetTools(BuildPlatform platform)
|
|||||||
case BuildPlatform::AndroidARM64:
|
case BuildPlatform::AndroidARM64:
|
||||||
result = New<AndroidPlatformTools>(ArchitectureType::ARM64);
|
result = New<AndroidPlatformTools>(ArchitectureType::ARM64);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
#if PLATFORM_TOOLS_SWITCH
|
||||||
|
case BuildPlatform::Switch:
|
||||||
|
result = New<SwitchPlatformTools>();
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
Tools.Add(platform, result);
|
Tools.Add(platform, result);
|
||||||
@@ -257,7 +318,7 @@ PlatformTools* GameCooker::GetTools(BuildPlatform platform)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameCooker::Build(BuildPlatform platform, BuildConfiguration configuration, const StringView& outputPath, BuildOptions options, const Array<String>& customDefines)
|
void GameCooker::Build(BuildPlatform platform, BuildConfiguration configuration, const StringView& outputPath, BuildOptions options, const Array<String>& customDefines, const StringView& preset, const StringView& presetTarget)
|
||||||
{
|
{
|
||||||
if (IsRunning())
|
if (IsRunning())
|
||||||
{
|
{
|
||||||
@@ -275,16 +336,19 @@ void GameCooker::Build(BuildPlatform platform, BuildConfiguration configuration,
|
|||||||
CancelFlag = 0;
|
CancelFlag = 0;
|
||||||
ProgressMsg.Clear();
|
ProgressMsg.Clear();
|
||||||
ProgressValue = 1.0f;
|
ProgressValue = 1.0f;
|
||||||
CookingData& data = Data;
|
Data = New<CookingData>();
|
||||||
data.Init();
|
CookingData& data = *Data;
|
||||||
data.Tools = tools;
|
data.Tools = tools;
|
||||||
data.Platform = platform;
|
data.Platform = platform;
|
||||||
data.Configuration = configuration;
|
data.Configuration = configuration;
|
||||||
data.Options = options;
|
data.Options = options;
|
||||||
|
data.Preset = preset;
|
||||||
|
data.PresetTarget = presetTarget;
|
||||||
data.CustomDefines = customDefines;
|
data.CustomDefines = customDefines;
|
||||||
data.OutputPath = outputPath;
|
data.OriginalOutputPath = outputPath;
|
||||||
FileSystem::NormalizePath(data.OutputPath);
|
FileSystem::NormalizePath(data.OriginalOutputPath);
|
||||||
data.OutputPath = data.OriginalOutputPath = FileSystem::ConvertRelativePathToAbsolute(Globals::ProjectFolder, data.OutputPath);
|
data.OriginalOutputPath = FileSystem::ConvertRelativePathToAbsolute(Globals::ProjectFolder, data.OriginalOutputPath);
|
||||||
|
data.NativeCodeOutputPath = data.ManagedCodeOutputPath = data.DataOutputPath = data.OriginalOutputPath;
|
||||||
data.CacheDirectory = Globals::ProjectCacheFolder / TEXT("Cooker") / tools->GetName();
|
data.CacheDirectory = Globals::ProjectCacheFolder / TEXT("Cooker") / tools->GetName();
|
||||||
if (!FileSystem::DirectoryExists(data.CacheDirectory))
|
if (!FileSystem::DirectoryExists(data.CacheDirectory))
|
||||||
{
|
{
|
||||||
@@ -362,12 +426,39 @@ void GameCookerImpl::ReportProgress(const String& info, float totalProgress)
|
|||||||
ProgressValue = totalProgress;
|
ProgressValue = totalProgress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GameCookerImpl::OnCollectAssets(HashSet<Guid>& assets)
|
||||||
|
{
|
||||||
|
if (Internal_OnCollectAssets == nullptr)
|
||||||
|
{
|
||||||
|
auto c = GameCooker::GetStaticClass();
|
||||||
|
if (c)
|
||||||
|
Internal_OnCollectAssets = c->GetMethod("Internal_OnCollectAssets", 0);
|
||||||
|
ASSERT(GameCookerImpl::Internal_OnCollectAssets);
|
||||||
|
}
|
||||||
|
|
||||||
|
MCore::AttachThread();
|
||||||
|
MonoObject* exception = nullptr;
|
||||||
|
auto list = (MonoArray*)Internal_OnCollectAssets->Invoke(nullptr, nullptr, &exception);
|
||||||
|
if (exception)
|
||||||
|
{
|
||||||
|
MException ex(exception);
|
||||||
|
ex.Log(LogType::Error, TEXT("OnCollectAssets"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (list)
|
||||||
|
{
|
||||||
|
auto ids = MUtils::ToSpan<Guid>(list);
|
||||||
|
for (int32 i = 0; i < ids.Length(); i++)
|
||||||
|
assets.Add(ids[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool GameCookerImpl::Build()
|
bool GameCookerImpl::Build()
|
||||||
{
|
{
|
||||||
CookingData& data = Data;
|
CookingData& data = *Data;
|
||||||
LOG(Info, "Starting Game Cooker...");
|
LOG(Info, "Starting Game Cooker...");
|
||||||
LOG(Info, "Platform: {0}, Configuration: {2}, Options: {1}", ::ToString(data.Platform), (int32)data.Options, ::ToString(data.Configuration));
|
LOG(Info, "Platform: {0}, Configuration: {2}, Options: {1}", ::ToString(data.Platform), (int32)data.Options, ::ToString(data.Configuration));
|
||||||
LOG(Info, "Output Path: {0}", data.OutputPath);
|
LOG(Info, "Output Path: {0}", data.OriginalOutputPath);
|
||||||
|
|
||||||
// Late init feature
|
// Late init feature
|
||||||
if (Steps.IsEmpty())
|
if (Steps.IsEmpty())
|
||||||
@@ -388,7 +479,7 @@ bool GameCookerImpl::Build()
|
|||||||
CallEvent(GameCooker::EventType::BuildStarted);
|
CallEvent(GameCooker::EventType::BuildStarted);
|
||||||
for (int32 stepIndex = 0; stepIndex < Steps.Count(); stepIndex++)
|
for (int32 stepIndex = 0; stepIndex < Steps.Count(); stepIndex++)
|
||||||
Steps[stepIndex]->OnBuildStarted(data);
|
Steps[stepIndex]->OnBuildStarted(data);
|
||||||
Data.Tools->OnBuildStarted(data);
|
data.Tools->OnBuildStarted(data);
|
||||||
data.InitProgress(Steps.Count());
|
data.InitProgress(Steps.Count());
|
||||||
|
|
||||||
// Execute all steps in a sequence
|
// Execute all steps in a sequence
|
||||||
@@ -427,10 +518,12 @@ bool GameCookerImpl::Build()
|
|||||||
}
|
}
|
||||||
IsRunning = false;
|
IsRunning = false;
|
||||||
CancelFlag = 0;
|
CancelFlag = 0;
|
||||||
Data.Tools->OnBuildEnded(data, failed);
|
data.Tools->OnBuildEnded(data, failed);
|
||||||
for (int32 stepIndex = 0; stepIndex < Steps.Count(); stepIndex++)
|
for (int32 stepIndex = 0; stepIndex < Steps.Count(); stepIndex++)
|
||||||
Steps[stepIndex]->OnBuildEnded(data, failed);
|
Steps[stepIndex]->OnBuildEnded(data, failed);
|
||||||
CallEvent(failed ? GameCooker::EventType::BuildFailed : GameCooker::EventType::BuildDone);
|
CallEvent(failed ? GameCooker::EventType::BuildFailed : GameCooker::EventType::BuildDone);
|
||||||
|
Delete(Data);
|
||||||
|
Data = nullptr;
|
||||||
|
|
||||||
return failed;
|
return failed;
|
||||||
}
|
}
|
||||||
@@ -458,6 +551,7 @@ bool GameCookerService::Init()
|
|||||||
{
|
{
|
||||||
auto editorAssembly = ((NativeBinaryModule*)GetBinaryModuleFlaxEngine())->Assembly;
|
auto editorAssembly = ((NativeBinaryModule*)GetBinaryModuleFlaxEngine())->Assembly;
|
||||||
editorAssembly->Unloading.Bind(OnEditorAssemblyUnloading);
|
editorAssembly->Unloading.Bind(OnEditorAssemblyUnloading);
|
||||||
|
GameCooker::OnCollectAssets.Bind(OnCollectAssets);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using FlaxEngine;
|
using FlaxEngine;
|
||||||
|
|
||||||
namespace FlaxEditor
|
namespace FlaxEditor
|
||||||
@@ -80,6 +78,11 @@ namespace FlaxEditor
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static event BuildProgressDelegate Progress;
|
public static event BuildProgressDelegate Progress;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Occurs when building collects assets to cook.
|
||||||
|
/// </summary>
|
||||||
|
public static event Action<List<Guid>> CollectAssets;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the type of the platform from the game build platform type.
|
/// Gets the type of the platform from the game build platform type.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -96,6 +99,9 @@ namespace FlaxEditor
|
|||||||
case BuildPlatform.XboxOne: return PlatformType.XboxOne;
|
case BuildPlatform.XboxOne: return PlatformType.XboxOne;
|
||||||
case BuildPlatform.LinuxX64: return PlatformType.Linux;
|
case BuildPlatform.LinuxX64: return PlatformType.Linux;
|
||||||
case BuildPlatform.PS4: return PlatformType.PS4;
|
case BuildPlatform.PS4: return PlatformType.PS4;
|
||||||
|
case BuildPlatform.AndroidARM64: return PlatformType.Android;
|
||||||
|
case BuildPlatform.XboxScarlett: return PlatformType.XboxScarlett;
|
||||||
|
case BuildPlatform.Switch: return PlatformType.Switch;
|
||||||
default: throw new ArgumentOutOfRangeException(nameof(buildPlatform), buildPlatform, null);
|
default: throw new ArgumentOutOfRangeException(nameof(buildPlatform), buildPlatform, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -109,5 +115,23 @@ namespace FlaxEditor
|
|||||||
{
|
{
|
||||||
Progress?.Invoke(info, totalProgress);
|
Progress?.Invoke(info, totalProgress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static Guid[] Internal_OnCollectAssets()
|
||||||
|
{
|
||||||
|
var list = new List<Guid>();
|
||||||
|
|
||||||
|
// Custom assets
|
||||||
|
CollectAssets?.Invoke(list);
|
||||||
|
|
||||||
|
// Plugin assets
|
||||||
|
foreach (var plugin in PluginManager.GamePlugins)
|
||||||
|
{
|
||||||
|
plugin.OnCollectAssets(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (list.Count == 0)
|
||||||
|
return null;
|
||||||
|
return list.ToArray();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,18 +56,16 @@ public:
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the current build data. Valid only during active build process.
|
/// Gets the current build data. Valid only during active build process.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
static const CookingData& GetCurrentData();
|
API_PROPERTY() static CookingData* GetCurrentData();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Determines whether game building is running.
|
/// Determines whether game building is running.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns><c>true</c> if game building is running; otherwise, <c>false</c>.</returns>
|
|
||||||
API_PROPERTY() static bool IsRunning();
|
API_PROPERTY() static bool IsRunning();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Determines whether building cancel has been requested.
|
/// Determines whether building cancel has been requested.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns><c>true</c> if building cancel has been requested; otherwise, <c>false</c>.</returns>
|
|
||||||
API_PROPERTY() static bool IsCancelRequested();
|
API_PROPERTY() static bool IsCancelRequested();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -85,7 +83,9 @@ public:
|
|||||||
/// <param name="outputPath">The output path (output directory).</param>
|
/// <param name="outputPath">The output path (output directory).</param>
|
||||||
/// <param name="options">The build options.</param>
|
/// <param name="options">The build options.</param>
|
||||||
/// <param name="customDefines">The list of custom defines passed to the build tool when compiling project scripts. Can be used in build scripts for configuration (Configuration.CustomDefines).</param>
|
/// <param name="customDefines">The list of custom defines passed to the build tool when compiling project scripts. Can be used in build scripts for configuration (Configuration.CustomDefines).</param>
|
||||||
API_FUNCTION() static void Build(BuildPlatform platform, BuildConfiguration configuration, const StringView& outputPath, BuildOptions options, const Array<String>& customDefines);
|
/// <param name="preset">The name of build preset used for cooking (can be used by editor and game plugins).</param>
|
||||||
|
/// <param name="presetTarget">The name of build preset target used for cooking (can be used by editor and game plugins).</param>
|
||||||
|
API_FUNCTION() static void Build(BuildPlatform platform, BuildConfiguration configuration, const StringView& outputPath, BuildOptions options, const Array<String>& customDefines, const StringView& preset = StringView::Empty, const StringView& presetTarget = StringView::Empty);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sends a cancel event to the game building service.
|
/// Sends a cancel event to the game building service.
|
||||||
@@ -123,4 +123,9 @@ public:
|
|||||||
/// Occurs when building game progress fires.
|
/// Occurs when building game progress fires.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
static Delegate<const String&, float> OnProgress;
|
static Delegate<const String&, float> OnProgress;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Occurs when building collects assets to cook.
|
||||||
|
/// </summary>
|
||||||
|
static Delegate<HashSet<Guid>&> OnCollectAssets;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -104,7 +104,9 @@ PixelFormat AndroidPlatformTools::GetTextureFormat(CookingData& data, TextureBas
|
|||||||
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
|
||||||
data.OutputPath /= TEXT("app/assets");
|
data.DataOutputPath /= TEXT("app/assets");
|
||||||
|
data.NativeCodeOutputPath /= TEXT("app/assets");
|
||||||
|
data.ManagedCodeOutputPath /= TEXT("app/assets");
|
||||||
|
|
||||||
PlatformTools::OnBuildStarted(data);
|
PlatformTools::OnBuildStarted(data);
|
||||||
}
|
}
|
||||||
@@ -114,7 +116,7 @@ bool AndroidPlatformTools::OnPostProcess(CookingData& data)
|
|||||||
const auto gameSettings = GameSettings::Get();
|
const auto gameSettings = GameSettings::Get();
|
||||||
const auto platformSettings = AndroidPlatformSettings::Get();
|
const auto platformSettings = AndroidPlatformSettings::Get();
|
||||||
const auto platformDataPath = data.GetPlatformBinariesRoot();
|
const auto platformDataPath = data.GetPlatformBinariesRoot();
|
||||||
const auto assetsPath = data.OutputPath;
|
const auto assetsPath = data.DataOutputPath;
|
||||||
const auto jniLibsPath = data.OriginalOutputPath / TEXT("app/jniLibs");
|
const auto jniLibsPath = data.OriginalOutputPath / TEXT("app/jniLibs");
|
||||||
const auto projectVersion = Editor::Project->Version.ToString();
|
const auto projectVersion = Editor::Project->Version.ToString();
|
||||||
const Char* abi;
|
const Char* abi;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ bool LinuxPlatformTools::OnDeployBinaries(CookingData& data)
|
|||||||
{
|
{
|
||||||
const auto gameSettings = GameSettings::Get();
|
const auto gameSettings = GameSettings::Get();
|
||||||
const auto platformSettings = LinuxPlatformSettings::Get();
|
const auto platformSettings = LinuxPlatformSettings::Get();
|
||||||
const auto outputPath = data.OutputPath;
|
const auto outputPath = data.DataOutputPath;
|
||||||
|
|
||||||
// Copy binaries
|
// Copy binaries
|
||||||
{
|
{
|
||||||
@@ -66,7 +66,7 @@ bool LinuxPlatformTools::OnDeployBinaries(CookingData& data)
|
|||||||
#if !BUILD_DEBUG
|
#if !BUILD_DEBUG
|
||||||
const String outputExePath = outputPath / TEXT("FlaxGame");
|
const String outputExePath = outputPath / TEXT("FlaxGame");
|
||||||
const String gameExePath = outputPath / gameSettings->ProductName;
|
const String gameExePath = outputPath / gameSettings->ProductName;
|
||||||
if (FileSystem::FileExists(outputExePath) && gameExePath.Compare(outputExePath, StringSearchCase::IgnoreCase) == 0)
|
if (FileSystem::FileExists(outputExePath) && gameExePath.Compare(outputExePath, StringSearchCase::IgnoreCase) != 0)
|
||||||
{
|
{
|
||||||
if (FileSystem::MoveFile(gameExePath, outputExePath, true))
|
if (FileSystem::MoveFile(gameExePath, outputExePath, true))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ bool UWPPlatformTools::OnScriptsStepDone(CookingData& data)
|
|||||||
{
|
{
|
||||||
// Override Newtonsoft.Json.dll for some platforms (that don't support runtime code generation)
|
// Override Newtonsoft.Json.dll for some platforms (that don't support runtime code generation)
|
||||||
const String customBinPath = data.GetPlatformBinariesRoot() / TEXT("Newtonsoft.Json.dll");
|
const String customBinPath = data.GetPlatformBinariesRoot() / TEXT("Newtonsoft.Json.dll");
|
||||||
const String assembliesPath = data.OutputPath;
|
const String assembliesPath = data.ManagedCodeOutputPath;
|
||||||
if (FileSystem::CopyFile(assembliesPath / TEXT("Newtonsoft.Json.dll"), customBinPath))
|
if (FileSystem::CopyFile(assembliesPath / TEXT("Newtonsoft.Json.dll"), customBinPath))
|
||||||
{
|
{
|
||||||
data.Error(TEXT("Failed to copy deploy custom assembly."));
|
data.Error(TEXT("Failed to copy deploy custom assembly."));
|
||||||
@@ -64,7 +64,7 @@ bool UWPPlatformTools::OnDeployBinaries(CookingData& data)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FileSystem::CopyFile(data.OutputPath / StringUtils::GetFileName(files[i]), files[i]))
|
if (FileSystem::CopyFile(data.DataOutputPath / StringUtils::GetFileName(files[i]), files[i]))
|
||||||
{
|
{
|
||||||
data.Error(TEXT("Failed to setup output directory."));
|
data.Error(TEXT("Failed to setup output directory."));
|
||||||
return true;
|
return true;
|
||||||
@@ -92,7 +92,7 @@ bool UWPPlatformTools::OnDeployBinaries(CookingData& data)
|
|||||||
|
|
||||||
// Prepare certificate
|
// Prepare certificate
|
||||||
const auto srcCertificatePath = Globals::ProjectFolder / platformSettings->CertificateLocation;
|
const auto srcCertificatePath = Globals::ProjectFolder / platformSettings->CertificateLocation;
|
||||||
const auto dstCertificatePath = data.OutputPath / TEXT("WSACertificate.pfx");
|
const auto dstCertificatePath = data.DataOutputPath / TEXT("WSACertificate.pfx");
|
||||||
if (platformSettings->CertificateLocation.HasChars() && FileSystem::FileExists(srcCertificatePath))
|
if (platformSettings->CertificateLocation.HasChars() && FileSystem::FileExists(srcCertificatePath))
|
||||||
{
|
{
|
||||||
// Use cert from settings
|
// Use cert from settings
|
||||||
@@ -115,7 +115,7 @@ bool UWPPlatformTools::OnDeployBinaries(CookingData& data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Copy assets
|
// Copy assets
|
||||||
const auto dstAssetsPath = data.OutputPath / TEXT("Assets");
|
const auto dstAssetsPath = data.DataOutputPath / TEXT("Assets");
|
||||||
const auto srcAssetsPath = uwpDataPath / TEXT("Assets");
|
const auto srcAssetsPath = uwpDataPath / TEXT("Assets");
|
||||||
if (!FileSystem::DirectoryExists(dstAssetsPath))
|
if (!FileSystem::DirectoryExists(dstAssetsPath))
|
||||||
{
|
{
|
||||||
@@ -125,7 +125,7 @@ bool UWPPlatformTools::OnDeployBinaries(CookingData& data)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const auto dstPropertiesPath = data.OutputPath / TEXT("Properties");
|
const auto dstPropertiesPath = data.DataOutputPath / TEXT("Properties");
|
||||||
if (!FileSystem::DirectoryExists(dstPropertiesPath))
|
if (!FileSystem::DirectoryExists(dstPropertiesPath))
|
||||||
{
|
{
|
||||||
if (FileSystem::CreateDirectory(dstPropertiesPath))
|
if (FileSystem::CreateDirectory(dstPropertiesPath))
|
||||||
@@ -176,7 +176,7 @@ bool UWPPlatformTools::OnDeployBinaries(CookingData& data)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const auto dstAppPath = data.OutputPath / TEXT("App.cs");
|
const auto dstAppPath = data.DataOutputPath / TEXT("App.cs");
|
||||||
const auto srcAppPath = uwpDataPath / TEXT("App.cs");
|
const auto srcAppPath = uwpDataPath / TEXT("App.cs");
|
||||||
if (!FileSystem::FileExists(dstAppPath))
|
if (!FileSystem::FileExists(dstAppPath))
|
||||||
{
|
{
|
||||||
@@ -205,7 +205,7 @@ bool UWPPlatformTools::OnDeployBinaries(CookingData& data)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const auto dstFlaxGeneratedPath = data.OutputPath / TEXT("FlaxGenerated.cs");
|
const auto dstFlaxGeneratedPath = data.DataOutputPath / TEXT("FlaxGenerated.cs");
|
||||||
const auto srcFlaxGeneratedPath = uwpDataPath / TEXT("FlaxGenerated.cs");
|
const auto srcFlaxGeneratedPath = uwpDataPath / TEXT("FlaxGenerated.cs");
|
||||||
{
|
{
|
||||||
// Get template
|
// Get template
|
||||||
@@ -264,7 +264,7 @@ bool UWPPlatformTools::OnDeployBinaries(CookingData& data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create solution
|
// Create solution
|
||||||
const auto dstSolutionPath = data.OutputPath / projectName + TEXT(".sln");
|
const auto dstSolutionPath = data.DataOutputPath / projectName + TEXT(".sln");
|
||||||
const auto srcSolutionPath = uwpDataPath / TEXT("Solution.sln");
|
const auto srcSolutionPath = uwpDataPath / TEXT("Solution.sln");
|
||||||
if (!FileSystem::FileExists(dstSolutionPath))
|
if (!FileSystem::FileExists(dstSolutionPath))
|
||||||
{
|
{
|
||||||
@@ -297,7 +297,7 @@ bool UWPPlatformTools::OnDeployBinaries(CookingData& data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create project
|
// Create project
|
||||||
const auto dstProjectPath = data.OutputPath / projectName + TEXT(".csproj");
|
const auto dstProjectPath = data.DataOutputPath / projectName + TEXT(".csproj");
|
||||||
const auto srcProjectPath = uwpDataPath / TEXT("Project.csproj");
|
const auto srcProjectPath = uwpDataPath / TEXT("Project.csproj");
|
||||||
{
|
{
|
||||||
// Get template
|
// Get template
|
||||||
@@ -347,7 +347,7 @@ bool UWPPlatformTools::OnDeployBinaries(CookingData& data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create manifest
|
// Create manifest
|
||||||
const auto dstManifestPath = data.OutputPath / TEXT("Package.appxmanifest");
|
const auto dstManifestPath = data.DataOutputPath / TEXT("Package.appxmanifest");
|
||||||
const auto srcManifestPath = uwpDataPath / TEXT("Package.appxmanifest");
|
const auto srcManifestPath = uwpDataPath / TEXT("Package.appxmanifest");
|
||||||
if (!FileSystem::FileExists(dstManifestPath))
|
if (!FileSystem::FileExists(dstManifestPath))
|
||||||
{
|
{
|
||||||
@@ -484,8 +484,8 @@ bool UWPPlatformTools::OnPostProcess(CookingData& data)
|
|||||||
// Special case for UWP
|
// Special case for UWP
|
||||||
// FlaxEngine.dll cannot be added to the solution as `Content` item (due to conflicts with C++ /CX FlaxEngine.dll)
|
// FlaxEngine.dll cannot be added to the solution as `Content` item (due to conflicts with C++ /CX FlaxEngine.dll)
|
||||||
// Use special directory for it (generated UWP project handles this case and copies lib to the output)
|
// Use special directory for it (generated UWP project handles this case and copies lib to the output)
|
||||||
const String assembliesPath = data.OutputPath;
|
const String assembliesPath = data.DataOutputPath;
|
||||||
const auto dstPath1 = data.OutputPath / TEXT("DataSecondary");
|
const auto dstPath1 = data.DataOutputPath / TEXT("DataSecondary");
|
||||||
if (!FileSystem::DirectoryExists(dstPath1))
|
if (!FileSystem::DirectoryExists(dstPath1))
|
||||||
{
|
{
|
||||||
if (FileSystem::CreateDirectory(dstPath1))
|
if (FileSystem::CreateDirectory(dstPath1))
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ ArchitectureType WindowsPlatformTools::GetArchitecture() const
|
|||||||
bool WindowsPlatformTools::OnDeployBinaries(CookingData& data)
|
bool WindowsPlatformTools::OnDeployBinaries(CookingData& data)
|
||||||
{
|
{
|
||||||
const auto platformSettings = WindowsPlatformSettings::Get();
|
const auto platformSettings = WindowsPlatformSettings::Get();
|
||||||
const auto& outputPath = data.OutputPath;
|
const auto& outputPath = data.NativeCodeOutputPath;
|
||||||
|
|
||||||
// Apply executable icon
|
// Apply executable icon
|
||||||
Array<String> files;
|
Array<String> files;
|
||||||
|
|||||||
@@ -66,6 +66,17 @@ public:
|
|||||||
return format;
|
return format;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Checks if the given file is a native code.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="data">The cooking data.</param>
|
||||||
|
/// <param name="file">The file path.</param>
|
||||||
|
/// <returns>True if it's a native file, otherwise false.<returns>
|
||||||
|
virtual bool IsNativeCodeFile(CookingData& data, const String& file)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -136,6 +147,8 @@ public:
|
|||||||
String AssemblerArgs;
|
String AssemblerArgs;
|
||||||
String ArchiverPath;
|
String ArchiverPath;
|
||||||
String ArchiverArgs;
|
String ArchiverArgs;
|
||||||
|
String AuxToolPath;
|
||||||
|
String AuxToolArgs;
|
||||||
String AotCachePath;
|
String AotCachePath;
|
||||||
Dictionary<String, String> EnvVars;
|
Dictionary<String, String> EnvVars;
|
||||||
Array<String> AssembliesSearchDirs;
|
Array<String> AssembliesSearchDirs;
|
||||||
@@ -144,8 +157,8 @@ public:
|
|||||||
AotConfig(CookingData& data)
|
AotConfig(CookingData& data)
|
||||||
{
|
{
|
||||||
Platform::GetEnvironmentVariables(EnvVars);
|
Platform::GetEnvironmentVariables(EnvVars);
|
||||||
EnvVars[TEXT("MONO_PATH")] = data.OutputPath / TEXT("Mono/lib/mono/4.5");
|
EnvVars[TEXT("MONO_PATH")] = data.DataOutputPath / TEXT("Mono/lib/mono/4.5");
|
||||||
AssembliesSearchDirs.Add(data.OutputPath / TEXT("Mono/lib/mono/4.5"));
|
AssembliesSearchDirs.Add(data.DataOutputPath / TEXT("Mono/lib/mono/4.5"));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -119,7 +119,8 @@ bool CompileScriptsStep::DeployBinaries(CookingData& data, const String& path, c
|
|||||||
}
|
}
|
||||||
for (auto& file : files)
|
for (auto& file : files)
|
||||||
{
|
{
|
||||||
const String dst = data.OutputPath / StringUtils::GetFileName(file);
|
const String& dstPath = data.Tools->IsNativeCodeFile(data, file) ? data.NativeCodeOutputPath : data.ManagedCodeOutputPath;
|
||||||
|
const String dst = dstPath / StringUtils::GetFileName(file);
|
||||||
if (dst != file && FileSystem::CopyFile(dst, file))
|
if (dst != file && FileSystem::CopyFile(dst, file))
|
||||||
{
|
{
|
||||||
data.Error(TEXT("Failed to copy file from {0} to {1}."), file, dst);
|
data.Error(TEXT("Failed to copy file from {0} to {1}."), file, dst);
|
||||||
@@ -180,7 +181,12 @@ bool CompileScriptsStep::Perform(CookingData& data)
|
|||||||
platform = TEXT("Android");
|
platform = TEXT("Android");
|
||||||
architecture = TEXT("ARM64");
|
architecture = TEXT("ARM64");
|
||||||
break;
|
break;
|
||||||
|
case BuildPlatform::Switch:
|
||||||
|
platform = TEXT("Switch");
|
||||||
|
architecture = TEXT("ARM64");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
|
LOG(Error, "Unknown or unsupported build platform.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
_extensionsToSkip.Clear();
|
_extensionsToSkip.Clear();
|
||||||
@@ -289,7 +295,7 @@ bool CompileScriptsStep::Perform(CookingData& data)
|
|||||||
}
|
}
|
||||||
writer.EndObject();
|
writer.EndObject();
|
||||||
|
|
||||||
const String outputBuildInfo = data.OutputPath / TEXT("Game.Build.json");
|
const String outputBuildInfo = data.DataOutputPath / TEXT("Game.Build.json");
|
||||||
if (File::WriteAllBytes(outputBuildInfo, (byte*)buffer.GetString(), (int32)buffer.GetSize()))
|
if (File::WriteAllBytes(outputBuildInfo, (byte*)buffer.GetString(), (int32)buffer.GetSize()))
|
||||||
{
|
{
|
||||||
LOG(Error, "Failed to save binary modules info file {0}.", outputBuildInfo);
|
LOG(Error, "Failed to save binary modules info file {0}.", outputBuildInfo);
|
||||||
|
|||||||
@@ -25,10 +25,12 @@
|
|||||||
#include "Engine/Core/Config/PlatformSettings.h"
|
#include "Engine/Core/Config/PlatformSettings.h"
|
||||||
#include "Engine/Core/Config/GameSettings.h"
|
#include "Engine/Core/Config/GameSettings.h"
|
||||||
#include "Engine/Core/Config/BuildSettings.h"
|
#include "Engine/Core/Config/BuildSettings.h"
|
||||||
|
#include "Engine/Streaming/StreamingSettings.h"
|
||||||
#include "Engine/ShadersCompilation/ShadersCompilation.h"
|
#include "Engine/ShadersCompilation/ShadersCompilation.h"
|
||||||
#include "Engine/Graphics/RenderTools.h"
|
#include "Engine/Graphics/RenderTools.h"
|
||||||
#include "Engine/Graphics/Textures/TextureData.h"
|
#include "Engine/Graphics/Textures/TextureData.h"
|
||||||
#include "Engine/Engine/Base/GameBase.h"
|
#include "Engine/Engine/Base/GameBase.h"
|
||||||
|
#include "Engine/Engine/Globals.h"
|
||||||
#include "Engine/Tools/TextureTool/TextureTool.h"
|
#include "Engine/Tools/TextureTool/TextureTool.h"
|
||||||
#if PLATFORM_TOOLS_WINDOWS
|
#if PLATFORM_TOOLS_WINDOWS
|
||||||
#include "Engine/Platform/Windows/WindowsPlatformSettings.h"
|
#include "Engine/Platform/Windows/WindowsPlatformSettings.h"
|
||||||
@@ -43,6 +45,35 @@
|
|||||||
|
|
||||||
Dictionary<String, CookAssetsStep::ProcessAssetFunc> CookAssetsStep::AssetProcessors;
|
Dictionary<String, CookAssetsStep::ProcessAssetFunc> CookAssetsStep::AssetProcessors;
|
||||||
|
|
||||||
|
bool CookAssetsStep::CacheEntry::IsValid(bool withDependencies)
|
||||||
|
{
|
||||||
|
AssetInfo assetInfo;
|
||||||
|
if (Content::GetAssetInfo(ID, assetInfo))
|
||||||
|
{
|
||||||
|
if (TypeName == assetInfo.TypeName)
|
||||||
|
{
|
||||||
|
if (FileSystem::GetFileLastEditTime(assetInfo.Path) <= FileModified)
|
||||||
|
{
|
||||||
|
bool isValid = true;
|
||||||
|
if (withDependencies)
|
||||||
|
{
|
||||||
|
for (auto& f : FileDependencies)
|
||||||
|
{
|
||||||
|
if (FileSystem::GetFileLastEditTime(f.First) > f.Second)
|
||||||
|
{
|
||||||
|
isValid = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (isValid)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
CookAssetsStep::CacheEntry& CookAssetsStep::CacheData::CreateEntry(const JsonAssetBase* asset, String& cachedFilePath)
|
CookAssetsStep::CacheEntry& CookAssetsStep::CacheData::CreateEntry(const JsonAssetBase* asset, String& cachedFilePath)
|
||||||
{
|
{
|
||||||
ASSERT(asset->DataTypeName.HasChars());
|
ASSERT(asset->DataTypeName.HasChars());
|
||||||
@@ -67,7 +98,6 @@ CookAssetsStep::CacheEntry& CookAssetsStep::CacheData::CreateEntry(const Asset*
|
|||||||
void CookAssetsStep::CacheData::InvalidateShaders()
|
void CookAssetsStep::CacheData::InvalidateShaders()
|
||||||
{
|
{
|
||||||
LOG(Info, "Invalidating cached shader assets.");
|
LOG(Info, "Invalidating cached shader assets.");
|
||||||
|
|
||||||
for (auto e = Entries.Begin(); e.IsNotEnd(); ++e)
|
for (auto e = Entries.Begin(); e.IsNotEnd(); ++e)
|
||||||
{
|
{
|
||||||
auto& typeName = e->Value.TypeName;
|
auto& typeName = e->Value.TypeName;
|
||||||
@@ -82,6 +112,23 @@ void CookAssetsStep::CacheData::InvalidateShaders()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CookAssetsStep::CacheData::InvalidateTextures()
|
||||||
|
{
|
||||||
|
LOG(Info, "Invalidating cached texture assets.");
|
||||||
|
for (auto e = Entries.Begin(); e.IsNotEnd(); ++e)
|
||||||
|
{
|
||||||
|
auto& typeName = e->Value.TypeName;
|
||||||
|
if (
|
||||||
|
typeName == Texture::TypeName ||
|
||||||
|
typeName == CubeTexture::TypeName ||
|
||||||
|
typeName == SpriteAtlas::TypeName
|
||||||
|
)
|
||||||
|
{
|
||||||
|
Entries.Remove(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CookAssetsStep::CacheData::Load(CookingData& data)
|
void CookAssetsStep::CacheData::Load(CookingData& data)
|
||||||
{
|
{
|
||||||
HeaderFilePath = data.CacheDirectory / String::Format(TEXT("CookedHeader_{0}.bin"), FLAXENGINE_VERSION_BUILD);
|
HeaderFilePath = data.CacheDirectory / String::Format(TEXT("CookedHeader_{0}.bin"), FLAXENGINE_VERSION_BUILD);
|
||||||
@@ -158,17 +205,17 @@ void CookAssetsStep::CacheData::Load(CookingData& data)
|
|||||||
Entries.Clear();
|
Entries.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auto buildSettings = BuildSettings::Get();
|
||||||
|
const auto gameSettings = GameSettings::Get();
|
||||||
|
|
||||||
// Invalidate shaders and assets with shaders if need to rebuild them
|
// Invalidate shaders and assets with shaders if need to rebuild them
|
||||||
bool invalidateShaders = false;
|
bool invalidateShaders = false;
|
||||||
const auto buildSettings = BuildSettings::Get();
|
if (buildSettings->ShadersNoOptimize != Settings.Global.ShadersNoOptimize)
|
||||||
const bool shadersNoOptimize = buildSettings->ShadersNoOptimize;
|
|
||||||
const bool shadersGenerateDebugData = buildSettings->ShadersGenerateDebugData;
|
|
||||||
if (shadersNoOptimize != Settings.Global.ShadersNoOptimize)
|
|
||||||
{
|
{
|
||||||
LOG(Info, "ShadersNoOptimize option has been modified.");
|
LOG(Info, "ShadersNoOptimize option has been modified.");
|
||||||
invalidateShaders = true;
|
invalidateShaders = true;
|
||||||
}
|
}
|
||||||
if (shadersGenerateDebugData != Settings.Global.ShadersGenerateDebugData)
|
if (buildSettings->ShadersGenerateDebugData != Settings.Global.ShadersGenerateDebugData)
|
||||||
{
|
{
|
||||||
LOG(Info, "ShadersGenerateDebugData option has been modified.");
|
LOG(Info, "ShadersGenerateDebugData option has been modified.");
|
||||||
invalidateShaders = true;
|
invalidateShaders = true;
|
||||||
@@ -217,6 +264,12 @@ void CookAssetsStep::CacheData::Load(CookingData& data)
|
|||||||
#endif
|
#endif
|
||||||
if (invalidateShaders)
|
if (invalidateShaders)
|
||||||
InvalidateShaders();
|
InvalidateShaders();
|
||||||
|
|
||||||
|
// Invalidate textures if streaming settings gets modified
|
||||||
|
if (Settings.Global.StreamingSettingsAssetId != gameSettings->Streaming || (Entries.ContainsKey(gameSettings->Streaming) && !Entries[gameSettings->Streaming].IsValid()))
|
||||||
|
{
|
||||||
|
InvalidateTextures();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CookAssetsStep::CacheData::Save()
|
void CookAssetsStep::CacheData::Save()
|
||||||
@@ -453,6 +506,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_SWITCH
|
||||||
|
case BuildPlatform::Switch:
|
||||||
|
{
|
||||||
|
const char* platformDefineName = "PLATFORM_SWITCH";
|
||||||
|
COMPILE_PROFILE(Vulkan_SM5, SHADER_FILE_CHUNK_INTERNAL_VULKAN_SM5_CACHE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
@@ -532,91 +593,129 @@ bool ProcessParticleEmitter(CookAssetsStep::AssetCookData& data)
|
|||||||
bool ProcessTextureBase(CookAssetsStep::AssetCookData& data)
|
bool ProcessTextureBase(CookAssetsStep::AssetCookData& data)
|
||||||
{
|
{
|
||||||
const auto asset = static_cast<TextureBase*>(data.Asset);
|
const auto asset = static_cast<TextureBase*>(data.Asset);
|
||||||
|
const auto& assetHeader = asset->StreamingTexture()->GetHeader();
|
||||||
// Check if target platform doesn't support the texture format
|
|
||||||
const auto format = asset->Format();
|
const auto format = asset->Format();
|
||||||
const auto targetFormat = data.Data.Tools->GetTextureFormat(data.Data, asset, format);
|
const auto targetFormat = data.Data.Tools->GetTextureFormat(data.Data, asset, format);
|
||||||
|
const auto streamingSettings = StreamingSettings::Get();
|
||||||
|
int32 mipLevelsMax = GPU_MAX_TEXTURE_MIP_LEVELS;
|
||||||
|
if (assetHeader->TextureGroup >= 0 && assetHeader->TextureGroup < streamingSettings->TextureGroups.Count())
|
||||||
|
{
|
||||||
|
auto& group = streamingSettings->TextureGroups[assetHeader->TextureGroup];
|
||||||
|
mipLevelsMax = group.MipLevelsMax;
|
||||||
|
group.MipLevelsMaxPerPlatform.TryGet(data.Data.Tools->GetPlatform(), mipLevelsMax);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Faster path if don't need to modify texture for the target platform
|
||||||
|
if (format == targetFormat && assetHeader->MipLevels <= mipLevelsMax)
|
||||||
|
{
|
||||||
|
return CookAssetsStep::ProcessDefaultAsset(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Extract texture data from the asset
|
||||||
|
TextureData textureDataSrc;
|
||||||
|
auto assetLock = asset->LockData();
|
||||||
|
if (asset->GetTextureData(textureDataSrc, false))
|
||||||
|
{
|
||||||
|
LOG(Error, "Failed to load data from texture {0}", asset->ToString());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
TextureData* textureData = &textureDataSrc;
|
||||||
|
TextureData textureDataTmp1;
|
||||||
|
|
||||||
if (format != targetFormat)
|
if (format != targetFormat)
|
||||||
{
|
{
|
||||||
// Extract texture data from the asset
|
|
||||||
TextureData textureData;
|
|
||||||
auto assetLock = asset->LockData();
|
|
||||||
if (asset->GetTextureData(textureData, false))
|
|
||||||
{
|
|
||||||
LOG(Error, "Failed to load data from texture {0}", asset->ToString());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Convert texture data to the target format
|
// Convert texture data to the target format
|
||||||
TextureData targetTextureData;
|
if (TextureTool::Convert(textureDataTmp1, *textureData, targetFormat))
|
||||||
if (TextureTool::Convert(targetTextureData, textureData, targetFormat))
|
|
||||||
{
|
{
|
||||||
LOG(Error, "Failed to convert texture {0} from format {1} to {2}", asset->ToString(), (int32)format, (int32)targetFormat);
|
LOG(Error, "Failed to convert texture {0} from format {1} to {2}", asset->ToString(), (int32)format, (int32)targetFormat);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
textureData = &textureDataTmp1;
|
||||||
// Adjust texture header
|
|
||||||
auto& header = *(TextureHeader*)data.InitData.CustomData.Get();
|
|
||||||
header.Width = targetTextureData.Width;
|
|
||||||
header.Height = targetTextureData.Height;
|
|
||||||
header.Format = targetTextureData.Format;
|
|
||||||
header.MipLevels = targetTextureData.GetMipLevels();
|
|
||||||
|
|
||||||
// Serialize texture data into the asset chunks
|
|
||||||
for (int32 mipIndex = 0; mipIndex < targetTextureData.GetMipLevels(); mipIndex++)
|
|
||||||
{
|
|
||||||
auto chunk = New<FlaxChunk>();
|
|
||||||
data.InitData.Header.Chunks[mipIndex] = chunk;
|
|
||||||
|
|
||||||
// Calculate the texture data storage layout
|
|
||||||
uint32 rowPitch, slicePitch;
|
|
||||||
const int32 mipWidth = Math::Max(1, targetTextureData.Width >> mipIndex);
|
|
||||||
const int32 mipHeight = Math::Max(1, targetTextureData.Height >> mipIndex);
|
|
||||||
RenderTools::ComputePitch(targetTextureData.Format, mipWidth, mipHeight, rowPitch, slicePitch);
|
|
||||||
chunk->Data.Allocate(slicePitch * targetTextureData.GetArraySize());
|
|
||||||
|
|
||||||
// Copy array slices into mip data (sequential)
|
|
||||||
for (int32 arrayIndex = 0; arrayIndex < targetTextureData.Items.Count(); arrayIndex++)
|
|
||||||
{
|
|
||||||
auto& mipData = targetTextureData.Items[arrayIndex].Mips[mipIndex];
|
|
||||||
byte* src = mipData.Data.Get();
|
|
||||||
byte* dst = chunk->Data.Get() + (slicePitch * arrayIndex);
|
|
||||||
|
|
||||||
// Faster path if source and destination data layout matches
|
|
||||||
if (rowPitch == mipData.RowPitch && slicePitch == mipData.DepthPitch)
|
|
||||||
{
|
|
||||||
Platform::MemoryCopy(dst, src, slicePitch);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
const auto copyRowSize = Math::Min(mipData.RowPitch, rowPitch);
|
|
||||||
for (uint32 line = 0; line < mipData.Lines; line++)
|
|
||||||
{
|
|
||||||
Platform::MemoryCopy(dst, src, copyRowSize);
|
|
||||||
src += mipData.RowPitch;
|
|
||||||
dst += rowPitch;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clone any custom asset chunks (eg. sprite atlas data, mips are in 0-13 chunks)
|
|
||||||
for (int32 i = 14; i < ASSET_FILE_DATA_CHUNKS; i++)
|
|
||||||
{
|
|
||||||
const auto chunk = asset->GetChunk(i);
|
|
||||||
if (chunk != nullptr && chunk->IsMissing() && chunk->ExistsInFile())
|
|
||||||
{
|
|
||||||
if (asset->Storage->LoadAssetChunk(chunk))
|
|
||||||
return true;
|
|
||||||
data.InitData.Header.Chunks[i] = chunk->Clone();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fallback to the default asset processing
|
if (assetHeader->MipLevels > mipLevelsMax)
|
||||||
return CookAssetsStep::ProcessDefaultAsset(data);
|
{
|
||||||
|
// Reduce texture quality
|
||||||
|
const int32 mipLevelsToStrip = assetHeader->MipLevels - mipLevelsMax;
|
||||||
|
textureData->Width = Math::Max(1, textureData->Width >> mipLevelsToStrip);
|
||||||
|
textureData->Height = Math::Max(1, textureData->Height >> mipLevelsToStrip);
|
||||||
|
textureData->Depth = Math::Max(1, textureData->Depth >> mipLevelsToStrip);
|
||||||
|
for (int32 arrayIndex = 0; arrayIndex < textureData->Items.Count(); arrayIndex++)
|
||||||
|
{
|
||||||
|
auto& item = textureData->Items[arrayIndex];
|
||||||
|
Array<TextureMipData, FixedAllocation<GPU_MAX_TEXTURE_MIP_LEVELS>> oldMips(MoveTemp(item.Mips));
|
||||||
|
item.Mips.Resize(mipLevelsMax);
|
||||||
|
for (int32 mipIndex = 0; mipIndex < mipLevelsMax; mipIndex++)
|
||||||
|
{
|
||||||
|
auto& dstMip = item.Mips[mipIndex];
|
||||||
|
auto& srcMip = oldMips[mipIndex + mipLevelsToStrip];
|
||||||
|
dstMip = MoveTemp(srcMip);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Adjust texture header
|
||||||
|
data.InitData.CustomData.Allocate(sizeof(TextureHeader));
|
||||||
|
auto& header = *(TextureHeader*)data.InitData.CustomData.Get();
|
||||||
|
header = *assetHeader;
|
||||||
|
header.Width = textureData->Width;
|
||||||
|
header.Height = textureData->Height;
|
||||||
|
header.Depth = textureData->Depth;
|
||||||
|
header.Format = textureData->Format;
|
||||||
|
header.MipLevels = textureData->GetMipLevels();
|
||||||
|
|
||||||
|
// Serialize texture data into the asset chunks
|
||||||
|
for (int32 mipIndex = 0; mipIndex < header.MipLevels; mipIndex++)
|
||||||
|
{
|
||||||
|
auto chunk = New<FlaxChunk>();
|
||||||
|
data.InitData.Header.Chunks[mipIndex] = chunk;
|
||||||
|
|
||||||
|
// Calculate the texture data storage layout
|
||||||
|
uint32 rowPitch, slicePitch;
|
||||||
|
const int32 mipWidth = Math::Max(1, textureData->Width >> mipIndex);
|
||||||
|
const int32 mipHeight = Math::Max(1, textureData->Height >> mipIndex);
|
||||||
|
RenderTools::ComputePitch(textureData->Format, mipWidth, mipHeight, rowPitch, slicePitch);
|
||||||
|
chunk->Data.Allocate(slicePitch * textureData->GetArraySize());
|
||||||
|
|
||||||
|
// Copy array slices into mip data (sequential)
|
||||||
|
for (int32 arrayIndex = 0; arrayIndex < textureData->Items.Count(); arrayIndex++)
|
||||||
|
{
|
||||||
|
auto& mipData = textureData->Items[arrayIndex].Mips[mipIndex];
|
||||||
|
byte* src = mipData.Data.Get();
|
||||||
|
byte* dst = chunk->Data.Get() + (slicePitch * arrayIndex);
|
||||||
|
|
||||||
|
// Faster path if source and destination data layout matches
|
||||||
|
if (rowPitch == mipData.RowPitch && slicePitch == mipData.DepthPitch)
|
||||||
|
{
|
||||||
|
Platform::MemoryCopy(dst, src, slicePitch);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const auto copyRowSize = Math::Min(mipData.RowPitch, rowPitch);
|
||||||
|
for (uint32 line = 0; line < mipData.Lines; line++)
|
||||||
|
{
|
||||||
|
Platform::MemoryCopy(dst, src, copyRowSize);
|
||||||
|
src += mipData.RowPitch;
|
||||||
|
dst += rowPitch;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clone any custom asset chunks (eg. sprite atlas data, mips are in 0-13 chunks)
|
||||||
|
for (int32 i = 14; i < ASSET_FILE_DATA_CHUNKS; i++)
|
||||||
|
{
|
||||||
|
const auto chunk = asset->GetChunk(i);
|
||||||
|
if (chunk != nullptr && chunk->IsMissing() && chunk->ExistsInFile())
|
||||||
|
{
|
||||||
|
if (asset->Storage->LoadAssetChunk(chunk))
|
||||||
|
return true;
|
||||||
|
data.InitData.Header.Chunks[i] = chunk->Clone();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
CookAssetsStep::CookAssetsStep()
|
CookAssetsStep::CookAssetsStep()
|
||||||
@@ -861,7 +960,7 @@ public:
|
|||||||
// Create package
|
// Create package
|
||||||
// Note: FlaxStorage::Create overrides chunks locations in file so don't use files anymore (only readonly)
|
// Note: FlaxStorage::Create overrides chunks locations in file so don't use files anymore (only readonly)
|
||||||
const String localPath = String::Format(TEXT("Content/Data_{0}.{1}"), _packageIndex, PACKAGE_FILES_EXTENSION);
|
const String localPath = String::Format(TEXT("Content/Data_{0}.{1}"), _packageIndex, PACKAGE_FILES_EXTENSION);
|
||||||
const String path = data.OutputPath / localPath;
|
const String path = data.DataOutputPath / localPath;
|
||||||
if (FlaxStorage::Create(path, assetsData, false, &CustomData))
|
if (FlaxStorage::Create(path, assetsData, false, &CustomData))
|
||||||
{
|
{
|
||||||
data.Error(TEXT("Failed to create assets package."));
|
data.Error(TEXT("Failed to create assets package."));
|
||||||
@@ -929,6 +1028,7 @@ bool CookAssetsStep::Perform(CookingData& data)
|
|||||||
{
|
{
|
||||||
cache.Settings.Global.ShadersNoOptimize = buildSettings->ShadersNoOptimize;
|
cache.Settings.Global.ShadersNoOptimize = buildSettings->ShadersNoOptimize;
|
||||||
cache.Settings.Global.ShadersGenerateDebugData = buildSettings->ShadersGenerateDebugData;
|
cache.Settings.Global.ShadersGenerateDebugData = buildSettings->ShadersGenerateDebugData;
|
||||||
|
cache.Settings.Global.StreamingSettingsAssetId = gameSettings->Streaming;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: this step converts all the assets (even the json) into the binary files (FlaxStorage format).
|
// Note: this step converts all the assets (even the json) into the binary files (FlaxStorage format).
|
||||||
@@ -1027,7 +1127,7 @@ bool CookAssetsStep::Perform(CookingData& data)
|
|||||||
gameFlags |= GameHeaderFlags::ShowSplashScreen;
|
gameFlags |= GameHeaderFlags::ShowSplashScreen;
|
||||||
|
|
||||||
// Open file
|
// Open file
|
||||||
auto stream = FileWriteStream::Open(data.OutputPath / TEXT("Content/head"));
|
auto stream = FileWriteStream::Open(data.DataOutputPath / TEXT("Content/head"));
|
||||||
if (stream == nullptr)
|
if (stream == nullptr)
|
||||||
{
|
{
|
||||||
data.Error(TEXT("Failed to create game data file."));
|
data.Error(TEXT("Failed to create game data file."));
|
||||||
@@ -1121,7 +1221,7 @@ bool CookAssetsStep::Perform(CookingData& data)
|
|||||||
BUILD_STEP_CANCEL_CHECK;
|
BUILD_STEP_CANCEL_CHECK;
|
||||||
|
|
||||||
// Save assets cache
|
// Save assets cache
|
||||||
if (AssetsCache::Save(data.OutputPath / TEXT("Content/AssetsCache.dat"), AssetsRegistry, AssetPathsMapping, AssetsCacheFlags::RelativePaths))
|
if (AssetsCache::Save(data.DataOutputPath / TEXT("Content/AssetsCache.dat"), AssetsRegistry, AssetPathsMapping, AssetsCacheFlags::RelativePaths))
|
||||||
{
|
{
|
||||||
data.Error(TEXT("Failed to create assets registry."));
|
data.Error(TEXT("Failed to create assets registry."));
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ public:
|
|||||||
/// The list of files on which this entry depends on. Cached date is the last edit time used to discard cache result on modification.
|
/// The list of files on which this entry depends on. Cached date is the last edit time used to discard cache result on modification.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
FileDependenciesList FileDependencies;
|
FileDependenciesList FileDependencies;
|
||||||
|
|
||||||
|
bool IsValid(bool withDependencies = false);
|
||||||
};
|
};
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -93,6 +95,7 @@ public:
|
|||||||
{
|
{
|
||||||
bool ShadersNoOptimize;
|
bool ShadersNoOptimize;
|
||||||
bool ShadersGenerateDebugData;
|
bool ShadersGenerateDebugData;
|
||||||
|
Guid StreamingSettingsAssetId;
|
||||||
} Global;
|
} Global;
|
||||||
} Settings;
|
} Settings;
|
||||||
|
|
||||||
@@ -134,6 +137,11 @@ public:
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void InvalidateShaders();
|
void InvalidateShaders();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Removes all cached entries for assets that contain a texture. This forces rebuild for them.
|
||||||
|
/// </summary>
|
||||||
|
void InvalidateTextures();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Loads the cache for the given cooking data.
|
/// Loads the cache for the given cooking data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include "Engine/Core/Config/GameSettings.h"
|
#include "Engine/Core/Config/GameSettings.h"
|
||||||
#include "Engine/Renderer/ReflectionsPass.h"
|
#include "Engine/Renderer/ReflectionsPass.h"
|
||||||
#include "Engine/Renderer/AntiAliasing/SMAA.h"
|
#include "Engine/Renderer/AntiAliasing/SMAA.h"
|
||||||
|
#include "Engine/Engine/Globals.h"
|
||||||
|
|
||||||
bool DeployDataStep::Perform(CookingData& data)
|
bool DeployDataStep::Perform(CookingData& data)
|
||||||
{
|
{
|
||||||
@@ -15,7 +16,7 @@ bool DeployDataStep::Perform(CookingData& data)
|
|||||||
const auto gameSettings = GameSettings::Get();
|
const auto gameSettings = GameSettings::Get();
|
||||||
|
|
||||||
// Setup output folders and copy required data
|
// Setup output folders and copy required data
|
||||||
const auto contentDir = data.OutputPath / TEXT("Content");
|
const auto contentDir = data.DataOutputPath / TEXT("Content");
|
||||||
if (FileSystem::DirectoryExists(contentDir))
|
if (FileSystem::DirectoryExists(contentDir))
|
||||||
{
|
{
|
||||||
// Remove old content files
|
// Remove old content files
|
||||||
@@ -26,7 +27,7 @@ bool DeployDataStep::Perform(CookingData& data)
|
|||||||
}
|
}
|
||||||
FileSystem::CreateDirectory(contentDir);
|
FileSystem::CreateDirectory(contentDir);
|
||||||
const auto srcMono = depsRoot / TEXT("Mono");
|
const auto srcMono = depsRoot / TEXT("Mono");
|
||||||
const auto dstMono = data.OutputPath / TEXT("Mono");
|
const auto dstMono = data.DataOutputPath / TEXT("Mono");
|
||||||
if (!FileSystem::DirectoryExists(dstMono))
|
if (!FileSystem::DirectoryExists(dstMono))
|
||||||
{
|
{
|
||||||
if (!FileSystem::DirectoryExists(srcMono))
|
if (!FileSystem::DirectoryExists(srcMono))
|
||||||
@@ -100,6 +101,10 @@ bool DeployDataStep::Perform(CookingData& data)
|
|||||||
if (data.Configuration != BuildConfiguration::Release)
|
if (data.Configuration != BuildConfiguration::Release)
|
||||||
data.AddRootEngineAsset(TEXT("Editor/Fonts/Roboto-Regular"));
|
data.AddRootEngineAsset(TEXT("Editor/Fonts/Roboto-Regular"));
|
||||||
|
|
||||||
|
// Register custom assets (eg. plugins)
|
||||||
|
data.StepProgress(TEXT("Deploying custom data"), 30);
|
||||||
|
GameCooker::OnCollectAssets(data.RootAssets);
|
||||||
|
|
||||||
// Register game assets
|
// Register game assets
|
||||||
data.StepProgress(TEXT("Deploying game data"), 50);
|
data.StepProgress(TEXT("Deploying game data"), 50);
|
||||||
auto& buildSettings = *BuildSettings::Get();
|
auto& buildSettings = *BuildSettings::Get();
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ bool PrecompileAssembliesStep::Perform(CookingData& data)
|
|||||||
data.Tools->OnConfigureAOT(data, config);
|
data.Tools->OnConfigureAOT(data, config);
|
||||||
|
|
||||||
// Prepare output directory
|
// Prepare output directory
|
||||||
config.AotCachePath = data.OutputPath / TEXT("Mono/lib/mono/aot-cache");
|
config.AotCachePath = data.DataOutputPath / TEXT("Mono/lib/mono/aot-cache");
|
||||||
switch (data.Tools->GetArchitecture())
|
switch (data.Tools->GetArchitecture())
|
||||||
{
|
{
|
||||||
case ArchitectureType::x86:
|
case ArchitectureType::x86:
|
||||||
@@ -52,9 +52,9 @@ bool PrecompileAssembliesStep::Perform(CookingData& data)
|
|||||||
FileSystem::DirectoryGetFiles(config.Assemblies, dir, TEXT("*.dll"), DirectorySearchOption::TopDirectoryOnly);
|
FileSystem::DirectoryGetFiles(config.Assemblies, dir, TEXT("*.dll"), DirectorySearchOption::TopDirectoryOnly);
|
||||||
for (auto& binaryModule : data.BinaryModules)
|
for (auto& binaryModule : data.BinaryModules)
|
||||||
if (binaryModule.ManagedPath.HasChars())
|
if (binaryModule.ManagedPath.HasChars())
|
||||||
config.Assemblies.Add(data.OutputPath / binaryModule.ManagedPath);
|
config.Assemblies.Add(data.ManagedCodeOutputPath / binaryModule.ManagedPath);
|
||||||
// TODO: move AOT to Flax.Build and perform it on all C# assemblies used in target build
|
// TODO: move AOT to Flax.Build and perform it on all C# assemblies used in target build
|
||||||
config.Assemblies.Add(data.OutputPath / TEXT("Newtonsoft.Json.dll"));
|
config.Assemblies.Add(data.ManagedCodeOutputPath / TEXT("Newtonsoft.Json.dll"));
|
||||||
|
|
||||||
// Perform AOT for the assemblies
|
// Perform AOT for the assemblies
|
||||||
for (int32 i = 0; i < config.Assemblies.Count(); i++)
|
for (int32 i = 0; i < config.Assemblies.Count(); i++)
|
||||||
|
|||||||
@@ -11,21 +11,25 @@ bool ValidateStep::Perform(CookingData& data)
|
|||||||
data.StepProgress(TEXT("Performing validation"), 0);
|
data.StepProgress(TEXT("Performing validation"), 0);
|
||||||
|
|
||||||
// Ensure output and cache directories exist
|
// Ensure output and cache directories exist
|
||||||
if (!FileSystem::DirectoryExists(data.OutputPath))
|
if (!FileSystem::DirectoryExists(data.NativeCodeOutputPath) && FileSystem::CreateDirectory(data.NativeCodeOutputPath))
|
||||||
{
|
{
|
||||||
if (FileSystem::CreateDirectory(data.OutputPath))
|
data.Error(TEXT("Failed to create build output directory."));
|
||||||
{
|
return true;
|
||||||
data.Error(TEXT("Failed to create build output directory."));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (!FileSystem::DirectoryExists(data.CacheDirectory))
|
if (!FileSystem::DirectoryExists(data.ManagedCodeOutputPath) && FileSystem::CreateDirectory(data.ManagedCodeOutputPath))
|
||||||
{
|
{
|
||||||
if (FileSystem::CreateDirectory(data.CacheDirectory))
|
data.Error(TEXT("Failed to create build output directory."));
|
||||||
{
|
return true;
|
||||||
data.Error(TEXT("Failed to create build cache directory."));
|
}
|
||||||
return true;
|
if (!FileSystem::DirectoryExists(data.DataOutputPath) && FileSystem::CreateDirectory(data.DataOutputPath))
|
||||||
}
|
{
|
||||||
|
data.Error(TEXT("Failed to create build output directory."));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!FileSystem::DirectoryExists(data.CacheDirectory) && FileSystem::CreateDirectory(data.CacheDirectory))
|
||||||
|
{
|
||||||
|
data.Error(TEXT("Failed to create build cache directory."));
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if OFFICIAL_BUILD
|
#if OFFICIAL_BUILD
|
||||||
|
|||||||
@@ -101,11 +101,6 @@ namespace FlaxEditor.CustomEditors
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected bool IsSetBlocked => _isSetBlocked;
|
protected bool IsSetBlocked => _isSetBlocked;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets a value indicating whether this editor needs value propagation up (value synchronization when one of the child editors changes value, used by the struct types).
|
|
||||||
/// </summary>
|
|
||||||
protected virtual bool NeedsValuePropagationUp => Values.HasValueType;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The linked label used to show this custom editor. Can be null if not used (eg. editor is inlined or is using a very customized UI layout).
|
/// The linked label used to show this custom editor. Can be null if not used (eg. editor is inlined or is using a very customized UI layout).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -142,6 +137,10 @@ namespace FlaxEditor.CustomEditors
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void RebuildLayout()
|
public void RebuildLayout()
|
||||||
{
|
{
|
||||||
|
// Skip rebuilding during init
|
||||||
|
if (CurrentCustomEditor == this)
|
||||||
|
return;
|
||||||
|
|
||||||
// Special case for root objects to run normal layout build
|
// Special case for root objects to run normal layout build
|
||||||
if (_presenter.Selection == Values)
|
if (_presenter.Selection == Values)
|
||||||
{
|
{
|
||||||
@@ -250,6 +249,15 @@ namespace FlaxEditor.CustomEditors
|
|||||||
_children[i].RefreshInternal();
|
_children[i].RefreshInternal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Synchronizes the value of the <see cref="Values"/> container. Called during Refresh to flush property after editing it in UI.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="value">The value to set.</param>
|
||||||
|
protected virtual void SynchronizeValue(object value)
|
||||||
|
{
|
||||||
|
_values.Set(_parent.Values, value);
|
||||||
|
}
|
||||||
|
|
||||||
internal virtual void RefreshInternal()
|
internal virtual void RefreshInternal()
|
||||||
{
|
{
|
||||||
if (_values == null)
|
if (_values == null)
|
||||||
@@ -264,11 +272,11 @@ namespace FlaxEditor.CustomEditors
|
|||||||
_valueToSet = null;
|
_valueToSet = null;
|
||||||
|
|
||||||
// Assign value
|
// Assign value
|
||||||
_values.Set(_parent.Values, val);
|
SynchronizeValue(val);
|
||||||
|
|
||||||
// Propagate values up (eg. when member of structure gets modified, also structure should be updated as a part of the other object)
|
// Propagate values up (eg. when member of structure gets modified, also structure should be updated as a part of the other object)
|
||||||
var obj = _parent;
|
var obj = _parent;
|
||||||
while (obj._parent != null && !(obj._parent is SyncPointEditor)) // && obj.NeedsValuePropagationUp)
|
while (obj._parent != null && !(obj._parent is SyncPointEditor))
|
||||||
{
|
{
|
||||||
obj.Values.Set(obj._parent.Values, obj.Values);
|
obj.Values.Set(obj._parent.Values, obj.Values);
|
||||||
obj = obj._parent;
|
obj = obj._parent;
|
||||||
@@ -288,12 +296,15 @@ namespace FlaxEditor.CustomEditors
|
|||||||
_isSetBlocked = false;
|
_isSetBlocked = false;
|
||||||
|
|
||||||
// Update children
|
// Update children
|
||||||
|
if (_skipChildrenRefresh)
|
||||||
|
{
|
||||||
|
_skipChildrenRefresh = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var childrenCount = _skipChildrenRefresh ? 0 : _children.Count;
|
for (int i = 0; i < _children.Count; i++)
|
||||||
for (int i = 0; i < childrenCount; i++)
|
|
||||||
_children[i].RefreshInternal();
|
_children[i].RefreshInternal();
|
||||||
_skipChildrenRefresh = false;
|
|
||||||
}
|
}
|
||||||
catch (TargetException ex)
|
catch (TargetException ex)
|
||||||
{
|
{
|
||||||
@@ -780,12 +791,11 @@ namespace FlaxEditor.CustomEditors
|
|||||||
/// <returns>True if allow to handle this event, otherwise false.</returns>
|
/// <returns>True if allow to handle this event, otherwise false.</returns>
|
||||||
protected virtual bool OnDirty(CustomEditor editor, object value, object token = null)
|
protected virtual bool OnDirty(CustomEditor editor, object value, object token = null)
|
||||||
{
|
{
|
||||||
ParentEditor.OnDirty(editor, value, token);
|
return ParentEditor.OnDirty(editor, value, token);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when custom editor sets the value to the object and resets the dirty state. Can be sued to perform custom work after editing the target object.
|
/// Called when custom editor sets the value to the object and resets the dirty state. Can be used to perform custom work after editing the target object.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual void OnUnDirty()
|
protected virtual void OnUnDirty()
|
||||||
{
|
{
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user