Search Unity

How to make ZenFulcrum Browser Full Screen when player looks at browser.

Discussion in 'Scripting' started by PoisonedElixir, Jun 9, 2018.

  1. PoisonedElixir

    PoisonedElixir

    Joined:
    Jul 10, 2013
    Posts:
    2
    So im using the zen fulcrum package which is basically an embedded browser. When in scene the scale is set to 1,1,1. But then i wrote a script trying to basically make it fit full screen on a fps controller i made. And when i the mouse goes over the GameObject it does make it larger but it does not make it full screen, can anybody guide me towards that goal?? I am also gonna note that im not using orthographic as a perspective either cause a few people assume i am.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class zoom : MonoBehaviour
    6. {
    7.  
    8.     public void OnMouseEnter()
    9.     {
    10.      
    11.      
    12.         transform.localScale += new Vector3(16.0F, 9.0f, 1f);
    13.      
    14.     }
    15.  
    16.  
    17.     public void OnMouseExit()
    18.     {
    19.         Debug.Log("left");
    20.         transform.localScale = new Vector3(1, 1, 1);
    21.     }
     
    Last edited: Jun 9, 2018