File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
source/ExportUnityPackage Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1502,6 +1502,21 @@ def apply_any_platform_selection(importer_metadata):
1502
1502
plugin_importer ["platformData" ] = new_platform_data
1503
1503
return importer_metadata
1504
1504
1505
+ @staticmethod
1506
+ def set_define_constraints (importer_metadata ):
1507
+ """Set define constraints for the target platform.
1508
+
1509
+ Args:
1510
+ importer_metadata: Metadata to modify. This is modified in-place.
1511
+
1512
+ Returns:
1513
+ Modified importer_metadata.
1514
+ """
1515
+ define_constraints = safe_dict_get_value (importer_metadata , "PluginImporter" , {}).get ("defineConstraints" )
1516
+ if define_constraints :
1517
+ importer_metadata ["PluginImporter" ]["defineConstraints" ] = define_constraints
1518
+ return importer_metadata
1519
+
1505
1520
@property
1506
1521
def importer_metadata_original (self ):
1507
1522
"""Get the original metadata section used to import this asset.
@@ -1548,6 +1563,7 @@ def importer_metadata(self):
1548
1563
metadata = Asset .disable_unsupported_platforms (metadata , self ._filename )
1549
1564
metadata = Asset .apply_any_platform_selection (metadata )
1550
1565
metadata = Asset .set_cpu_for_desktop_platforms (metadata )
1566
+ metadata = Asset .set_define_constraints (metadata )
1551
1567
return metadata
1552
1568
1553
1569
@staticmethod
You can’t perform that action at this time.
0 commit comments