private
void
CreateUnityWebPlayer()
{
var unity =
new
AxUnityWebPlayerAXLib.AxUnityWebPlayer();
((System.ComponentModel.ISupportInitialize)(unity)).BeginInit();
Controls.Add(unity);
((System.ComponentModel.ISupportInitialize)(unity)).EndInit();
unity.src =
"此处请填写.unity3d源文件的绝对路径"
;
AxHost.State state = unity.OcxState;
unity.Dispose();
unity =
new
AxUnityWebPlayerAXLib.AxUnityWebPlayer();
((System.ComponentModel.ISupportInitialize)(unity)).BeginInit();
this
.SuspendLayout();
unity.Name =
"Unity"
;
unity.OcxState = state;
unity.Dock = DockStyle.Fill;
this
.Controls.Add(unity);
((System.ComponentModel.ISupportInitialize)(unity)).EndInit();
this
.ResumeLayout(
false
);
}