Hi, I was wondering if anybody can help me with this virtual architectural walk through I’m creating. Keep in mind I’m a noob and don’t know anything about scripting.
OK, so I created this simple virtual walk through in Unity and all I need to do is to be able to target objects (i.e. Wall, furniture) and be able to change their texture during the actual play.
Any help will be much appreciated.
Azeddine, I think its very easy and i think any intermediate unity developer can make it within one or two days. Even if u want to make it ur self u can find lots of video tutorial just google it.
Ram,
Thanks for the reply. I do want to make it myself. I did find a couple of examples on youtube but I couldn’t find any tutorials.
If you can direct to a specific tutorial that would help me a lot.
Hey, we are just about to launch (any day now) a program called REALIS3D which would allow you to do everything you have just said and loads more. You just import a .fbx model at run-time and off you go, takes seconds.
If your happy to test it and offer up some feedback you can download the alpha version (any day now) and use it for free. No developer knowledge needed!
Thanks realvisual,
I will try your application. The fact of the matter is that I think it’s fun to mess with unity3D and I’d like to create an app similar to yours. Maybe I’ll take some scripting classes or something.
Thanks for your help. I actually found a good tutorial on youtube by: Envatio.
Basically, he shows how to create a main menu with GUI Texture, when clicked will change the texture of an object in the game.
But this sounds like not what you wanted. you wanted to click on an object in the building directly, now your clicking on a button to do something to the object. You should take the texture swapping code from the video you found and use it in the getmouseDown event of the object.
Azeddine, u just do one thing, u make one folder in asset folder and name it : “Resources” like this, put ur all textures in that folder; which u want to change at runtime.
What I’d do is make a raycasting script that when hits something(use tagging or naming to detect if you want that selected), reference it and then a gui pops up with available settings and textures for that obj that would be pulled from an array in the object. That should offer a lot of customization with ease.
Or to go totally boss you can make an ingame editor, but that takes time and you need to question if it’s worth it.
initially, I just wanted to go around in the game and click to swap textures but then I thought it might be nice to have a menu to pick from. Right now, I’m just watching the tutorials and trying what all you guys suggested. I will eventually build games using different techniques and see what works best. I’ll also post them to get you guys’ feed back.
Hey guys,
I tried what you all suggested but I keep getting a bunch of errors. I really have a lot to learn about scripting.
Anyway, I did find these tutorials on youtube and I created a small application (see attached images). Basically the tutorial shows how to create a main menu with GUI textures and be able to swap textures on gameplay. The thing is, the tutorial show texture swapping for one object. When I add a new object and apply the same codes, it all works fine but I can only render one object at the time, meaning when I pick a texture from the main menu it applies it to the object, but when I go back to pick the texture for the second object, it does it but the previous object goes back to the defaut blank texture. So I can only change the one texture at the time.
I’m not sure which code I have to change.
Here are the scripts I used (I insert large spaces between codes):
var Value : String;
function Update(){
DontDestroyOnLoad(this);
}
var Level : String;
function OnMouseUp(){
Application.LoadLevel(Level);
}
var Level : String;
function OnMouseUp(){
var Loader = GameObject.Find(“Loader”);
Destroy(Loader);
Application.LoadLevel(Level);
}
var Kolor : String;
function OnMouseUp(){
var Loader = GameObject.Find(“Loader”);
var VS = Loader.GetComponent(VS);
VS.Value = Kolor;
}
var Me : GameObject;
var Blue : Material;
var Red : Material;
var Yellow : Material;
var Default : Material;
function Update () {
var Loader = GameObject.Find(“Loader”);
var VS = Loader.GetComponent(VS);
var Value = VS.Value;
Sorry, i dont know that u r using javascript, actually in javascript u can define a function with ‘function example(){’ and in csharp its “void example”, so i sent to csharp script example. Anyway i m very happy that u solved ur problem.
Ram,
Well, I haven’t really solved the problem. As you can see in my previous post, i can only change one texture at the time. Can you please look at my codes and tell me how to modify them to be able to change 2 or more textures at a time?