Adjust whitespace to be consistent with old version of scripts
This commit is contained in:
@@ -290,12 +290,12 @@ public class MjImporterWithAssets : MjcfImporter {
|
|||||||
// We use the geom's name, guaranteed to be unique, as the asset name.
|
// We use the geom's name, guaranteed to be unique, as the asset name.
|
||||||
// If geom is nameless, use a random number.
|
// If geom is nameless, use a random number.
|
||||||
var name =
|
var name =
|
||||||
MjEngineTool.Sanitize(parentNode.GetStringAttribute(
|
MjEngineTool.Sanitize(parentNode.GetStringAttribute(
|
||||||
"name", defaultValue: $"{UnityEngine.Random.Range(0, 1000000)}"));
|
"name", defaultValue: $"{UnityEngine.Random.Range(0, 1000000)}"));
|
||||||
var assetPath = Path.Combine(_targetAssetDir, name+".mat");
|
var assetPath = Path.Combine(_targetAssetDir, name+".mat");
|
||||||
if (AssetDatabase.LoadMainAssetAtPath(assetPath) != null) {
|
if (AssetDatabase.LoadMainAssetAtPath(assetPath) != null) {
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
$"Creating a material asset for the geom {name}, but {assetPath} already exists.");
|
$"Creating a material asset for the geom {name}, but {assetPath} already exists.");
|
||||||
}
|
}
|
||||||
AssetDatabase.CreateAsset(material, assetPath);
|
AssetDatabase.CreateAsset(material, assetPath);
|
||||||
AssetDatabase.SaveAssets();
|
AssetDatabase.SaveAssets();
|
||||||
|
|||||||
Reference in New Issue
Block a user