// Use this for initialization void Start () { Scene = new RSScene(Host, Port, Timeout); Scene.Filename = SceneFilename; Scene.OnAppIniting += new ApplicationInitialisingCallback(OnAppInitingCallback); Viewport = new RSViewport(Scene); Viewport.UseRenderLoop = UseRenderLoop; Viewport.RenderLoopHandler = RenderLoopHandler; Viewport.Renderer = Renderer; Viewport.RenderTarget = RenderTarget; Viewport.RenderLoopInterval = RenderLoopInterval; Viewport.OnRestartRender += new RSViewport.RestartRenderCallback(OnRestartRender); Viewport.OnRender += new ResponseHandler(OnRender); migenius.rs4.core.Logger.OnLog += new migenius.rs4.core.Logger.LogHandler(onLog); }
// Use this for initialization void Start () { Scene = new RSScene(Host, Port, Timeout); Scene.Filename = SceneFilename; Scene.OnAppIniting += new ApplicationInitialisingCallback(OnAppInitingCallback); Viewport = new RSViewport(Scene); Viewport.UseRenderLoop = UseRenderLoop; Viewport.RenderLoopHandler = RenderLoopHandler; Viewport.Renderer = Renderer; Viewport.RenderTarget = RenderTarget; Viewport.RenderLoopInterval = RenderLoopInterval; Viewport.OnRestartRender += new RSViewport.RestartRenderCallback(OnRestartRender); Viewport.OnRender += new ResponseHandler(OnRender); Logger.OnLog += new Logger.LogHandler(onLog); //Cache gui texture if(RenderTarget !=null) m_RenderTexture = RenderTarget.GetComponent<GUITexture>(); }