Quantcast
Channel: Latest Questions by frogsbo
Browsing all 90 articles
Browse latest View live
↧

Sometimes Shader CG doesn't listen to if condition, Why?

i had an if condition which works, if (_Mode <= 3.0) { and if i do if (_Mode == 3.0 || _Mode == 4.0) { the shader compiles but doesnt execute the if condition, it only runs the rest of the code.

View Article


Find a script by name and add it to gameObject?

to make it simpler, i want users to be able to use one script, and that script loads a mouseOrbit onto the camera when a button is pressed, and unloads it when it's pressed again. can i do "if button...

View Article


Self Illumination shader without Ambient Lighting?

How can i take out ambien lighting from the standard unity shader? The object changes color as the light rotates and i would like a static color. I'd love some help for resources/ examples. Shader...

View Article

Can i use ReadAllBytes instead of GetPixels?

I am creating a texture editor for many textures, and i wish to read them without setting all the textures to IsReadeable. Can i get a color Vector[4] using ReadAllBytes instead of GetPixels?

View Article

AddComponent can't find script name MouseOrbit?

i moved a folder with 2 .JS from angry bots demo to character customization demo. the scripts are CameraScript and MouseOrbit. in Angry Bots, no errors, and in Character Customization unity demo, i get...

View Article


code to access submesh materials 1,2,3,4 etc?

A woman has various submeshes to make her eyes, hair, etc. i can only select the entire woman, and all the materials are on her GameObject, and i would like to know how to access her different...

View Article

GetAssetPath(texture1.instance)?

is it possible to find the path of a texture, using a gameObject that has an instance of that texture on it?

View Article

.Net Error: System.IO.Directory.GetDirectories($, $, searchoption);

in .JS I try to get string and string[] using GetDirectories, var path1 : String[] = System.IO.Directory.GetDirectories(Application.dataPath, title, System.IO.SearchOption.AllDirectories); i have this...

View Article


find type of asset by path? (to check if file is Texture2D?)

GetFiles returns a list of strings[] of asset paths, and i have girl_hair.tga.meta, i wish to check if an asset is a texture at given path prior to loading it to a tex2d. how can i?

View Article


how to convert absolute path to relative Application.DataPath

GetFiles function returns this path: **E:/Users/Tuone/Downloads/CharacterCustomization/CharacterCustomization/Assets\DressingroomExample\dressing_room\textures\floor_wood.tga** how do i convert it to...

View Article
Browsing all 90 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>