None of the suggestions work in iOS 14.4... kind of annoyed at the developer support here... I had followed countless Stack overflow posts, and green check marked solutions from the actual framework developers on this forum, but none of it works.
All I want is a transparent material with a base color. After trying for hours and hours, I decided to make a transparent PNG to try that so I could exactly match these pieces of code:
Code Block let resource = try? TextureResource.load(named: "WallOverlay") |
var material = SimpleMaterial(color: .white, roughness: 1, isMetallic: true) |
material.baseColor = MaterialColorParameter.texture(resource!) |
material.tintColor = UIColor.white.withAlphaComponent(0.99) |
Does not work at all. If I use an unlit material, doesn't work.
If I use a color instead of a texture resource, it doesn't work.
In iOS 14.4 there appears to be no way to make a material transparent at this time.It would be great if the framework engineers could acknowledge this instead of having posts with solved statuses that DO NOT work in the latest version of iOS.
Please let us know when this will be fixed, or provide a full example of making a material that actually makes it transparent. Thank you :)
P.S this is all I want to do and expect this code to work:
Code Block var material = SimpleMaterial() |
|
material.baseColor = MaterialColorParameter.color( |
UIColor(red: 0.97, green: 0.75, blue: 0.09, alpha: 0.10) |
) |
|
self.model = ModelComponent( |
mesh: .generatePlane(width: 0, depth: 0), |
materials: [material] |
) |
Use this color and make it barely visible, and have the real world visible behind it.