AggrorJorn Posted April 19, 2013 Share Posted April 19, 2013 This one took me quite some time to figure out. I load a material via a lua property Script.material = "" --path "a Path" "Mat file (*.mat):mat" I then want to assign this material to the entity itself. This causes an error. self.entity:SetMaterial(self.material) self.material contains this value: Materials\developer\redgrid.mat This should be: Materials/developer/redgrid.mat The backslash inside the path causes the material loading to fail. source: Script.matPath = ""--path "a Path" Mat file (*.mat):mat" function Script:Start() System:Print(self.matPath) local material = Material:Load(self.matPath) self.entity:SetMaterial(material) end Link to comment Share on other sites More sharing options...
Admin Posted June 26, 2013 Share Posted June 26, 2013 I modified the editor to replace the wrong slashes when the property is set. Let me know if you have any more problems after the next patch. Link to comment Share on other sites More sharing options...
Recommended Posts