In the docs you can find an editor script to generate a cube map from a given point. See below.
But what kind of script is it:
Javascript?
C sharp?
Boo?
After placing that script (Javascript) in a folder named “Editor” there is a “Render to Cube Map” item under “Game Object”
But how does it works? Choosing first an objekt? The camera? Pushing a start button?
Where is it saving the cube map (path)?
Please Unity Support: Place a short step by step explanation of how to use that script.
Thanks for education.
// Render scene from a given point into a static cube map.
// Place this script in Editor folder of your project.
// Then use the cubemap with one of Reflective shaders!
class RenderCubemapWizard extends ScriptableWizard {
var renderFromPosition : Transform;
var cubemap : Cubemap;
function OnWizardUpdate () {
helpString = "Select transform to render from and cubemap to render into";
isValid = (renderFromPosition != null) (cubemap != null);
}
function OnWizardCreate () {
// create temporary camera for rendering
var go = new GameObject( "CubemapCamera", Camera );
// place it on the object
go.transform.position = renderFromPosition.position;
go.transform.rotation = Quaternion.identity;
// render into cubemap
go.camera.RenderToCubemap( cubemap );
// destroy temporary camera
DestroyImmediate( go );
}
@MenuItem("GameObject/Render into Cubemap")
static function RenderCubemap () {
ScriptableWizard.DisplayWizard.<RenderCubemapWizard>(
"Render cubemap", "Render!");
}
}
Heellooo - Is there anybody outside of that box? :???:
This error occurs in Unity 3.5.2
if a sphere is selected in the scene and the editor script “Render into Cubemap” is called >>
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.ScriptableWizard.DisplayWizard (System.String title, System.Type klass, System.String createButtonName, System.String otherButtonName)
UnityEditor.ScriptableWizard.DisplayWizard[RenderCubemapWizard] (System.String title, System.String createButtonName, System.String otherButtonName)
UnityEditor.ScriptableWizard.DisplayWizard[RenderCubemapWizard] (System.String title, System.String createButtonName)
RenderCubemapWizard.RenderCubemap () (at Assets/Editor/RenderToCubematp.js:29)
<<
Sorry for asking, but if you would place a little more information within your docs, this help begging don’t must be
Again: How works this script exactly? Or is it not working any more with Unity 3.5.2?
Then you need some transform of a gameobject which we drag this gameobject from the scene into inspector of the wizard of CameraRenderToCubeMap which produces a 6 sided skybox material.
gameobject Transform (Render from Position) the camera spawns along this transform and takes pics from 6 views
I did attach a picture in my previous post but its not viewable for some reason?
For you’re problem did you move the script out of its current location and see if the wizard shows? or does it show and not render when clicked and instead produces those errors.
It don’t depends where that script is within the Asset folder. It could be outside of the the folder “Editor” too and still it appears in the menu “GameObject”
That Wizard: Is it showing after choosing “GameObject/Render into Cubemap”? Do you have to select anything before? (I guess the empty cubemap.) But as soon as the command “Render into Cubemap” is selected, the error appears.
IS THERE ANYBODY WORKING OF YOU UNITY SUPPORTER GUYS ???
I mean, we have paid a lot for our Unity 3D licenses and have to wait weeks for an answers!
Some time we don’t get any answer at all, neither here within the forum nor with a ticket over a bug report.
It sucks a bit, that the Unity Support team lets private people try to helping each other in the forum, while they drink coffee in the office…And that we must begging all the time with agreeable words, for a little bit of support!
The Script (look at the top of that thread) is not working on our Unity Pro BECAUSE:
In the docs (script references) you placed that Camera.RenderToCubemap script with the following comment:
// Render scene from a given point into a static cube map.
// Place this script in Editor folder of your project.
// Then use the cubemap with one of Reflective shaders!
BUT ALL THAT TROUBLES YOU COULD PREVENTET WITH THAT COMMENT HERE: // Place this JAVAscript in Editor folder of your project AND NAME IT RenderCubemapWizard
Thankyou so much! I was trying to sort this exact issue out today and just randomly found your thread. Nice work on finding the solution and sharing it with others.