public void AllClientsNoPixelWrite(bool enable) { var pkg = new S2C_NoPixelWrite.ArgumentData(); pkg.Enable = enable; if (ProfilerConnect != null) { S2C_NoPixelWrite.Instance.DoCall( ref pkg, NetCore.ERouteTarget.Self, ProfilerConnect, null); } }
public void OnS2C_NoPixelWrite(byte userFlags, ref S2C_NoPixelWrite.ArgumentData cmd, UInt16 serialId, NetCore.NetConnection connect, ref NetCore.RPCRouter.RouteData routeInfo) { var enable = cmd.Enable; CEngine.Instance.EventPoster.RunOn(() => { if (CEngine.Instance.GameInstance != null) { CEngine.Instance.GameInstance.NoPixelWrite = enable; var policy = CEngine.Instance.GameInstance.RenderPolicy as Graphics.RenderPolicy.CGfxRP_GameMobile; if (policy != null) { var profiler = CEngine.Instance.GameInstance.GetGraphicProfiler(); policy.SetGraphicsProfiler(profiler); Profiler.Log.WriteLine(Profiler.ELogTag.Info, "GraphicsDebugger", $"No Pixel Write:{enable}"); } } return(null); }, Thread.Async.EAsyncTarget.Main); }