Syntax Error "can't multiply System Type with Float"
i have a function pln(num:float): float{} ... bizarre error happening, because pln worked in the previous function, same lines, and it halts on error for identical lines in a similar function just...
View Articlehow to assign mesh.vertices ToList linq extension
this doesnt work: var mesh2 : Mesh = child.gameObject.GetComponent(MeshFilter).mesh; var vtxlist = new List.(); var vtx2 = mesh2.vertices; vtxlist = vtx2.ToList();...
View Articleproblem with loop and mesh values
Trying to delete n colored uvs and vertices from a mesh, but after 4 loops, it sais the index is out of range, even though it is counting down from top to bottom. ![alt text][1] i dont understand. var...
View Articleproblem with loop and mesh values
Trying to delete n colored uvs and vertices from a mesh, but after 4 loops, it sais the index is out of range, even though it is counting down from top to bottom. ![alt text][1] i dont understand. var...
View ArticleU3D version 4 optional function parameters in javascript and c#
Can someone please demonstrate the Unity3d optional function parameters? i.e. function human(name:string,required; age: int, optional; shoesize:float,optional; haircolor : Color : optional) ... is...
View ArticleAutomatic GUI generation systems?
HELLO! Complicated Topic Alert! :) I want to make 100ds of similar GUI boxes, each with 3-4 sliders and 2-3 text input boxes, in the same screen position, to adjust different functions. The functions...
View ArticleHow to use shader _SinTime?
_SinTime alledgedly supports various speeds of oscillation. how to specify which one is used? if i wanted to have an oscillation at 100 frames per second, i would have to use sin(_Time*100)? No...
View ArticleTesselation Shading only in U3d Professional?
It seems my tesselated sphere has still got shading from the base vertices prior to tesselation. Am i missing a unity pro feature? Do i have to construct new normals for the mesh somehow? ![alt...
View ArticleSurface Shader If Condition W = :( A == B ? V syntax
i found some strange syntax in a surface shader, but i can't find any documentation on what it is. can't i just write if... else in a void surf()? what is :(a==b ? syntax and where can i learn it?...
View ArticleFragment Bumpmap Shader Doesn't Work
There is some cool code on this page to render bumpmaps using CG code, except... it doesn't render anything when i add a bumpmap....
View ArticleSometimes 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 ArticleFind 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 ArticleSelf 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 ArticleCan 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 ArticleAddComponent 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 Articlecode 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 ArticleGetAssetPath(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 Articlefind 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 Articlehow 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