Skip to content

Commit

Permalink
Correctly identify new variable types
Browse files Browse the repository at this point in the history
  • Loading branch information
tonihele committed Apr 28, 2024
1 parent 44d45f5 commit 5c3df0c
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,13 @@ public class EditableMaterialFile {
private final List<String> matDefEntries = new ArrayList<>();
private final ProjectAssetManager manager;
private FileSystem fs;
public static final String[] variableTypes = new String[]{"Int", "Boolean", "Float", "Vector2", "Vector3", "Vector4", "Color", "Texture2D", "Texture3D", "TextureArray", "TextureBuffer", "TextureCubeMap"};

// Note that these are tested with startsWith, so the ordering matters (i.e. FloatArray & Float)
public static final String[] variableTypes = new String[]{
"IntArray", "Int", "Boolean", "FloatArray", "Float", "Vector2Array",
"Vector3Array", "Vector4Array", "Vector2", "Vector3", "Vector4",
"Color", "Texture2D", "Texture3D", "TextureArray", "TextureBuffer",
"TextureCubeMap", "Matrix3Array", "Matrix4Array", "Matrix3", "Matrix4"};

public EditableMaterialFile(FileObject material, ProjectAssetManager manager) {
this.material = material;
Expand Down Expand Up @@ -257,6 +263,8 @@ private void checkWithMatDef() {
materialParameters.put(prop.getName(), prop);
}
prop.setType(string);

break;
}
}
}
Expand Down

0 comments on commit 5c3df0c

Please sign in to comment.