Quantcast
Channel: Latest Questions by PokeJoe
Browsing latest articles
Browse All 20 View Live

Can I call a function on a behavior attached to a prefab from it's spawner...

I am making a falling block game. The blocks can be red, orange, yellow, green, or blue. Besides just having different materials, each color has other properties I'll need to implement later. I also...

View Article



Trying to implement specularity in my shader, but getting apparent type...

I am brand new to writing shaders, so I am mostly copy+pasting from examples at this point. But I successfully implemented a rim lighting shader, and a rim lighting shader that takes into account a...

View Article

How do I pass a consistent List between objects?

I am making a game which involves dynamically instantiated boxes. One box is added to the game every 0.2 seconds, but when the game starts there are no boxes. I want to make it so that when a box is...

View Article

Is additive transparency incompatible with this implementation of falloff...

Here is a shader that makes the transparency of the surface depend on its viewing angle. I've been asked if it's possible to get this effect while making the shader blend additively with objects behind...

View Article

How can I get a texture to render in object space?

I want to make a shader that is 1) completely emissive with no albedo component, 2) uses a UV-mapped texture with transparency based on the texture's alpha, and 3) uses a second texture in object space...

View Article


Shader Forge vs. Strumpy

Are there particular advantages that either has over the other? Without having bought ShaderForge yet, it's hard to compare. But I wonder, because in terms of workflow they look so similar. Plus, I...

View Article

In an editor script, is there a way to access the Animation editor window's...

I would like to create some editor extensions for improving animation workflow inside Unity. One thing that would be very useful is some way to access the current frame of the Animation window's...

View Article

When and how to take a screenshot of a particle system from the editor?

I am writing an editor extension that, among other things, traverses the hierarchy of an object and takes thumbnail images of the components, depending on type. If it finds a texture, it writes the...

View Article


Can't include shaders in packages exported by ExportPackage. How to work...

I am having trouble with this line in my code: AssetDatabase.ExportPackage(AssetDatabase.GetAssetPath(items[0]), "C:\\path\\" + items[0].name + ".unitypackage",...

View Article


Do I need to explicitly test for null or is testing the object itself good...

Often I avoid NullReferenceExceptions by testing my objects before I use them like so: if (obj) { obj.property = 5; } Generally if the object is null, it won't pass the if (obj) test, and I avoid a...

View Article
Browsing latest articles
Browse All 20 View Live




Latest Images