Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity OCX Activex Control Inside Visual Studio Problem in Src Property ??

Discussion in 'Editor & General Support' started by Developer007, Jul 9, 2014.

  1. Developer007

    Developer007

    Joined:
    Jul 8, 2014
    Posts:
    31
    Code (CSharp):
    1.    
    2.         OpenFileDialog ofd = new OpenFileDialog();
    3.  
    4.         private void addFileToolStripMenuItem_Click(object sender, EventArgs e)
    5.         {
    6.             ofd.Filter = "Unity3D Game (*.Unity3D)|*.unity3d";
    7.             if(ofd.ShowDialog()==DialogResult.OK)
    8.             {
    9.                 axUnityWebPlayer1.src = ofd.FileName;
    10.                 this.Refresh();
    11.             }
    12.         }
    13.  
    it didnt Run and no load the unity3d file ? people told that only can referenced from property page with complete source path ? how to solve this ..... ;/
     
  2. Developer007

    Developer007

    Joined:
    Jul 8, 2014
    Posts:
    31
    i also try these and didnt works :/

    Code (CSharp):
    1.  
    2.         AxUnityWebPlayerAXLib.AxUnityWebPlayer player = new AxUnityWebPlayerAXLib.AxUnityWebPlayer();
    3.  
    4.         private void addFileToolStripMenuItem_Click(object sender, EventArgs e)
    5.         {
    6.             player = new AxUnityWebPlayerAXLib.AxUnityWebPlayer();
    7.             player.src = @"C:\Users\Dev007\Desktop\test.unity3d";
    8.  
    9.             this.Controls.Add(player);
    10.  
    11.         }
     
  3. Developer007

    Developer007

    Joined:
    Jul 8, 2014
    Posts:
    31
    oh ... any one can figure that ?
     
  4. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    You might be the only person in the world using the OCX inside VS.
     
    Developer007 likes this.
  5. Developer007

    Developer007

    Joined:
    Jul 8, 2014
    Posts:
    31
    you alright , cuz am VS# fan .
     
  6. vision1v1

    vision1v1

    Joined:
    Aug 3, 2015
    Posts:
    2
    hi
    How to resolve this problem.Recently,I use AxUnityWebPlayer in WPF.How to set src by coding?