Exemple #1
0
    private void Start()
    {
        Windowed();
        Batchui        = gameObject.AddComponent <BatchUI>();
        _lastDirectory = Application.dataPath;

        HeightMap          = null;
        HdHeightMap        = null;
        DiffuseMap         = null;
        DiffuseMapOriginal = null;
        NormalMap          = null;
        MetallicMap        = null;
        SmoothnessMap      = null;
        EdgeMap            = null;
        AoMap = null;

        _propertyCompShader   = Shader.Find("Hidden/Blit_Property_Comp");
        _propertyCompMaterial = new Material(_propertyCompShader);

        Shader.SetGlobalFloat(CorrectionId, GamaCorrection);

        FullMaterial = new Material(FullMaterialRef.shader);
        FullMaterial.CopyPropertiesFromMaterial(FullMaterialRef);

        SampleMaterial = new Material(SampleMaterialRef.shader);
        SampleMaterial.CopyPropertiesFromMaterial(SampleMaterialRef);

        HeightFromDiffuseGuiScript   = HeightFromDiffuseGuiObject.GetComponent <HeightFromDiffuseGui>();
        NormalFromHeightGuiScript    = NormalFromHeightGuiObject.GetComponent <NormalFromHeightGui>();
        EdgeFromNormalGuiScript      = EdgeFromNormalGuiObject.GetComponent <EdgeFromNormalGui>();
        AoFromNormalGuiScript        = AoFromNormalGuiObject.GetComponent <AoFromNormalGui>();
        EditDiffuseGuiScript         = EditDiffuseGuiObject.GetComponent <EditDiffuseGui>();
        MetallicGuiScript            = MetallicGuiObject.GetComponent <MetallicGui>();
        SmoothnessGuiScript          = SmoothnessGuiObject.GetComponent <SmoothnessGui>();
        MaterialGuiScript            = MaterialGuiObject.GetComponent <MaterialGui>();
        _tilingTextureMakerGuiScript = TilingTextureMakerGuiObject.GetComponent <TilingTextureMakerGui>();
        _saveLoadProjectScript       = SaveLoadProjectObject.GetComponent <SaveLoadProject>();
        _settingsGuiScript           = SettingsGuiObject.GetComponent <SettingsGui>();

        _settingsGuiScript.LoadSettings();

        if (Application.platform == RuntimePlatform.WindowsEditor ||
            Application.platform == RuntimePlatform.WindowsPlayer)
        {
            _pathChar = '\\';
        }

        TestObject.GetComponent <Renderer>().material = FullMaterial;
        SetMaterialValues();

        ReflectionProbe.RenderProbe();

        HideGuiLocker.LockEmpty += LoadHideState;
    }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        //string[] arguments = Environment.GetCommandLineArgs();
        mainGui  = mainGuiObject.GetComponent <MainGui> ();
        saveLoad = saveLoadProjectObject.GetComponent <SaveLoadProject> ();

        heightFromDiffuseGui = heightFromDiffuseGuiObject.GetComponent <HeightFromDiffuseGui> ();
        normalFromHeightGui  = normalFromHeightGuiObject.GetComponent <NormalFromHeightGui> ();
        metallicGui          = metallicGuiObject.GetComponent <MetallicGui> ();
        smoothnessGui        = smoothnessGuiObject.GetComponent <SmoothnessGui> ();
        aoFromNormalGui      = aoFromNormalGuiObject.GetComponent <AOFromNormalGui> ();
        edgeFromNormalGui    = edgeFromNormalGuiObject.GetComponent <EdgeFromNormalGui> ();

        materialGui = materialGuiObject.GetComponent <MaterialGui> ();

        StartCoroutine(StartCommandString());
    }