Why can't I see my WebView Prefab in Unity game window? - unity3d

I used 3D WebView in Unity development. I dragged a WebViewPrefab into my scene and clicked 'play'. From the console I knew that it had already loaded the webpage I wanted, but I could't see it in the game window.
I had looked around, but still nothing in the game window.
Could anyone please tell me what had happened?

I had a similar problem not long ago. I found that WebView doesn't seem to be like those GameObjects we commonly use in unity, it can only be viewed from one direction. This means that if you look at it from behind, you won't see anything. Therefore, you need to adjust your main camera angle.
Also, when you use WebViewPrefab.Instantiate to create your WebView Object, it defaults to a somewhat strange position and angle. I usually set its position manually, and after that, it's easier to find in the game window in play mode.

Related

How do I add camera rotation in Unity

I am new to unity and I'm trying to figure out how to rotate the main camera from one position (in perspective of a person). I've tried looking for scripts and writing out but it never works.
here's what the scripts would look like...
enter image description here
I honestly don't know what I am doing so if this is actually a simple problem to solve, please don't be too harsh. Or do.
I am using unity 2018, btw.
Get the standard assets, use and look into the FPS Controller.

How can I tell what will actually be displayed in game?

I'm having a serious issue with Unity. It's most definitely a conceptual issue, and I would love some help understanding what I'm doing wrong.
The game window on the Unity editor shows my game working exactly as intended. The sizing of everything is perfect, the animations fit nicely, and everything is how I want it to be.
The problem, however, is that when I actually build the game, nothing is where it should be. The animations are off. The sizing of buttons and canvas UI elements are wonky. This is not what I see represented in the Unity editor, so I have no idea why it's working like that.
I've tried changing canvas to scale with screen size because the canvas elements are what is bugging.
I expect my built game to look exactly as it does in the unity editor, but that's not happening.
Thanks!

Dynamically instantiated prefabs are invisible

Now I know that this is a common problem and there are so many mistakes that would lead to it, but I have searched and seen all the results and answers in unity forums and other websites, and I'm sure that I don't have any beginner-mistake that would lead to it.
My problem is -Like the title states- that I have a "platform" prefab and I have a script, attached to some game object in the scene, that instantiates a new platform every x seconds. Now, the scripts works and everything is fine, the platforms are instantiated and they are moving and functioning as they should, but I can't see anything from this!
I mean that I can see them in the scene view window, where everything is fine, but in the game view window nothing appears, though I can interact with the platforms, such as landing on them and so on...
check the z depth... your probably instantiating them behind your camera. a good way to check is to start the game, go to scene, and take it out of 2d, then click one of the platforms in the explorer, and check its z value
It is highly possible that they are shown "behind" your background. I was making an android app and my buttons were displayed behind the UI panel. Try to instantiate your platforms as child objects of your panel.

Scrolling Scene Background - Unity

My title might have actually been a bit misworded, as to be honest I'm not sure how to word it, but basically I'm making a game on Unity and I have my main scene and I am making a main menu however what I want to do is have a, I guess, camera slowly panning around the main scene as the background of the main menu. Not sure if I worded that right or what wording to actually type into Google to research it so I'm hoping you guys might be able to point me in the right direction.
Cheers guys,
Jason
As stromdotcom mentioned you can attach a script to the camera.
It's hard to tell what you're trying to do but if you want to circle the camera around a point...
Try making an empty game object in the middle of your scene and point the camera at it.
Make the object the parent of the camera (using the object and cameras transform properties).
From here you should be able to set the game object to rotate using a script, which should make the camera spin as it is a child of the object.
I have not tried this in Unity but I have used this technique in other programs so I'm assuming it will work. Sorry if it doesn't.
If your scene is already set up then you can attach a script to your camera which simply modifies the camera's transform to move it around the room. You can move and rotate the camera just like any other transform in your scene.
Im pretty sure what you are looking for is "Animation view". Unity has a tutorial on it: https://unity3d.com/learn/tutorials/topics/animation/animation-view?playlist=17099

Why touching a slider that is on top of a SCNView moves the camera underneath on iOS 8/Swift?

Using Xcode 6 GM, I created a new project based on the Game template using SceneKit and Swift. Then I dragged a slider onto the SCNView. Now in the simulation, when I move the slider, the slider moves (as expected) but the camera moves as well (like if I was simply touching the screen). I'm not an experienced iOS developer but I never had this problem in the past. Did I forget to do something? Did anything change recently in the default behaviour of sliders? It looks more like a bug to me. If you add a slider, you want to control only this slider, not what is underneath.
Anyone can help me there or confirm the issue? Sorry if it's the answer is very simple. I googled my problem but could not find anything.
There is a property on the scene called allowsCameraControl, and if that is set to true then the panning will control the camera. It's probably on by default in the game template.