コード例 #1
0
 private void Awake()
 {
     ThisCamera           = GetComponent <Camera>();
     Skybox               = GetComponent <Skybox>();
     depthEffectHandle    = new DepthEffectHandle();
     reflectionHandle     = new ReflectionHandle();
     clipHandle           = new ClipHandle();
     underOceanMarkHandle = new UnderOceanMarkHandle();
     willRenderOceans     = new List <OceanRendererBase>();
 }
コード例 #2
0
        public string OPSTRING(bool brief, int _size_override)
        {
            if (function_image == null)             //probably this is fresh function
            {
                Raw2Image(_size_override);
            }
            if (function_image == null)
            {
                return("FuncPtr32 " + string.Format("{0:X4}", (long)funcptr_provided) + " is invalid.");
            }

            StringBuilder sb = new StringBuilder();

            //name and signature of method or unmanaged+adress
            string mb = ReflectionHandle != null?ReflectionHandle.ToString() : "unmanaged:" +
                            string.Format("{0:X4}", (long)funcptr_alligned);

            //for stackwalking
            long delta = (long)funcptr_provided - (long)funcptr_alligned;

            sb.Append("IP BEGIN " + mb + "+" + string.Format("{0:X4}", delta) +
                      " ( " + String.Format("{0:X4}", (long)funcptr_alligned) + " )");

            if (brief)
            {
                return(sb.ToString());
            }

            int i = 0;

            foreach (byte b in function_image)
            {
                if (i++ % 4 == 0)
                {
                    sb.Append("\n" + String.Format("{0:X2}", b));
                }
                else
                {
                    sb.Append(" " + String.Format("{0:X2}", b));
                }
            }

            sb.Append("\nLenght " + malloc_size);
            sb.Append("\nIP END " + mb + " ( " + String.Format("{0:X2}", (long)funcptr_alligned) + " )");

            return(sb.ToString());
        }