Exemplo n.º 1
0
        private void convertHeaderByteStream()
        {
            int        offset = 0;
            VpetHeader header = ByteArrayToStructure <VpetHeader>(ref m_headerByteData, ref offset);

            VPETSettings.Instance.lightIntensityFactor = header.lightIntensityFactor;
            VPETSettings.Instance.textureBinaryType    = header.textureBinaryType;
        }
Exemplo n.º 2
0
        // Use this for initialization
        void Start()
        {
            scene = GameObject.Find("Scene").transform;
            Application.targetFrameRate = 60;
            globalID = 0;
            if (doDistribute && sceneRoot != null)
            {
                vpetHeader = new VpetHeader();
                vpetHeader.lightIntensityFactor = 1f;
                vpetHeader.textureBinaryType    = 1;

                gatherSceneData();

                // write binary to file
                if (WriteCacheFile && sceneFileName != "")
                {
                    writeBinary(headerByteData, "header");
                    writeBinary(nodesByteData, "nodes");
                    writeBinary(objectsByteData, "objects");
                    writeBinary(charactersByteData, "characters");
                    writeBinary(texturesByteData, "textures");
#if TRUNK
                    writeBinary(materialsByteData, "materials");
#endif
                }

                if (serverThread == null)
                {
                    print("Start distribution thread");
                    isRunning    = true;
                    serverThread = new Thread(new ThreadStart(dataServer));
                    serverThread.Start();
                    print("Distribution thread started");
                }
                else
                {
                    Debug.LogWarning(string.Format("{0}: DistributionServerThread already running", this.GetType()));
                }
            }
        }
Exemplo n.º 3
0
        // Use this for initialization
        void Start()
        {
            if (doDistribute && sceneRoot != null)
            {
                vpetHeader = new VpetHeader();
                vpetHeader.lightIntensityFactor = 1f;
                vpetHeader.textureBinaryType    = 1;

                gatherSceneData();

                if (serverThread == null)
                {
                    print("Start distribution thread");
                    isRunning    = true;
                    serverThread = new Thread(new ThreadStart(dataServer));
                    serverThread.Start();
                    print("Distribution thread started");
                }
                else
                {
                    Debug.LogWarning(string.Format("{0}: DistributionServerThread already running", this.GetType()));
                }
            }
        }