Esempio n. 1
0
    protected override void OnAwakeInitUI()
    {
        export = TransformExtension.FindComponent <Button>(CacheTrans, "ExportButton");
        export.onClick.AddListener(ExportAsset);

        assetNameInput = TransformExtension.FindComponent <InputField>(CacheTrans, "AssetNameInput");
    }
Esempio n. 2
0
    void LoadFBXItem()
    {
        DirectoryInfo d = new DirectoryInfo(Application.dataPath + "/Resources/FBX/");

        FileInfo[] info  = d.GetFiles();
        int        count = 0;

        for (int i = 0; i < info.Length; i++)
        {
            if (info[i].Name.Contains(".meta"))
            {
                continue;
            }
            GameObject temp = GameObject.Instantiate(Resources.Load(itemStr)) as GameObject;
            temp.transform.parent        = toggleGroup.transform;
            temp.transform.localPosition = new Vector3(0, -150 * (count + 1), 0);
            count++;
            Toggle tog = temp.GetComponent <Toggle>();
            tog.group = toggleGroup;
            ToggleModel tm = new ToggleModel();
            tm.itemName = info[i].Name.Remove(info[i].Name.Length - 4);
            Text text = TransformExtension.FindComponent <Text>(temp.transform, "Label");
            text.text = tm.itemName;
            tm.toggle = tog;

            UnityAction <bool> ua = tm.Click;
            temp.GetComponent <Toggle>().onValueChanged.AddListener(ua);
        }
        RectTransform rf = (RectTransform)toggleGroup.transform;

        rf.SetHeight(count * 150 + 150);
    }
Esempio n. 3
0
    protected override void OnAwakeInitUI()
    {
        loadAsset = TransformExtension.FindComponent <Button>(CacheTrans, "LoadAssetButton");
        loadAsset.onClick.AddListener(ConfirmAssetInfo);

        recordAsset = TransformExtension.FindComponent <Button>(CacheTrans, "RecordAssetButton");
        recordAsset.onClick.AddListener(RecordAssetWindow);
    }
Esempio n. 4
0
    protected override void OnAwakeInitUI()
    {
        commissionButton = TransformExtension.FindComponent <Button>(CacheTrans, "CommissionButton");
        commissionButton.onClick.AddListener(StartCommission);
        frameCommissionButton = TransformExtension.FindComponent <Button>(CacheTrans, "FrameCommissionButton");
        frameCommissionButton.onClick.AddListener(StartFrameCommission);
        nextFrameButton = TransformExtension.FindComponent <Button>(CacheTrans, "NextFrameButton");
        nextFrameButton.onClick.AddListener(NextFrame);
        stopCommissionButton = TransformExtension.FindComponent <Button>(CacheTrans, "StopCommissionButton");
        stopCommissionButton.onClick.AddListener(StopCommission);
        updateFrameInfoButton = TransformExtension.FindComponent <Button>(CacheTrans, "UpdateFrameInfoButton");
        updateFrameInfoButton.onClick.AddListener(UpdateFrameInfoClick);
        frameRevertButton = TransformExtension.FindComponent <Button>(CacheTrans, "FrameRevertButton");
        frameRevertButton.onClick.AddListener(FrameRevertClick);

        Transform curFrameCountPivot = TransformExtension.FindComponent <Transform>(CacheTrans, "CurFrameCount");

        curFrameCount = TransformExtension.FindComponent <Text>(curFrameCountPivot, "Text");

        backButton = TransformExtension.FindComponent <Button>(CacheTrans, "BackButton");
        backButton.onClick.AddListener(Back);

        frameInfoPivot = TransformExtension.FindComponent <Transform>(CacheTrans, "FrameInfoPivot");

        pxo = TransformExtension.FindComponent <InputField>(frameInfoPivot, "PXOffset");
        pyo = TransformExtension.FindComponent <InputField>(frameInfoPivot, "PYOffset");
        pzo = TransformExtension.FindComponent <InputField>(frameInfoPivot, "PZOffset");

        exo = TransformExtension.FindComponent <InputField>(frameInfoPivot, "EXOffset");
        eyo = TransformExtension.FindComponent <InputField>(frameInfoPivot, "EYOffset");
        ezo = TransformExtension.FindComponent <InputField>(frameInfoPivot, "EZOffset");

        sureButton = TransformExtension.FindComponent <Button>(frameInfoPivot, "SureButton");
        sureButton.onClick.AddListener(SureFrameInfoClick);

        frameCutButton = TransformExtension.FindComponent <Button>(CacheTrans, "FrameCutButton");
        frameCutButton.onClick.AddListener(ShowCutFrame);

        curFrameCutButton = TransformExtension.FindComponent <Button>(CacheTrans, "CurFrameCutButton");
        curFrameCutButton.onClick.AddListener(CurFrameCut);

        frameCutInfoPivot = TransformExtension.FindComponent <Transform>(CacheTrans, "FrameCutInfoPivot");

        frameStart = TransformExtension.FindComponent <InputField>(frameCutInfoPivot, "FrameStart");
        frameEnd   = TransformExtension.FindComponent <InputField>(frameCutInfoPivot, "FrameEnd");

        sureCutButton = TransformExtension.FindComponent <Button>(frameCutInfoPivot, "SureCutButton");
        sureCutButton.onClick.AddListener(SureCutFrame);

        allAplyButton = TransformExtension.FindComponent <Button>(frameInfoPivot, "AllAplyButton");
        allAplyButton.onClick.AddListener(AllFrameAply);

        commissionPlayStyle = TransformExtension.FindComponent <Dropdown>(CacheTrans, "CommissionPlayStyle");

        StartFrameCommission();
    }
Esempio n. 5
0
    protected override void OnAwakeInitUI()
    {
        startLoad = TransformExtension.FindComponent <Button>(CacheTrans, "StartLoad");
        startLoad.onClick.AddListener(LoadAsset);

        backButton = TransformExtension.FindComponent <Button>(CacheTrans, "BackButton");
        backButton.onClick.AddListener(Back);

        assetBundleName = TransformExtension.FindComponent <InputField>(CacheTrans, "AssetBundleName");
        assetName       = TransformExtension.FindComponent <InputField>(CacheTrans, "AssetName");
    }
Esempio n. 6
0
 protected override void OnAwakeInitUI()
 {
     scrollRect  = TransformExtension.FindComponent <ScrollRect>(CacheTrans, "Scroll View");
     toggleGroup = scrollRect.content.GetComponent <ToggleGroup>();
     sureButton  = TransformExtension.FindComponent <Button>(CacheTrans, "SureButton");
     sureButton.onClick.AddListener(SureCharacter);
     backButton = TransformExtension.FindComponent <Button>(CacheTrans, "BackButton");
     backButton.onClick.AddListener(Back);
     UIModelMgr.Instance.GetModel <UIAnimMadeModel>().ValueUpdateEvent += ValueUpdateEvent;
     LoadFBXItem();
 }
Esempio n. 7
0
    private Dropdown recordStyle;   //fixed or update


    protected override void OnAwakeInitUI()
    {
        showAnimButton = TransformExtension.FindComponent <Button>(CacheTrans, "ShowAnimButton");
        showAnimButton.onClick.AddListener(ShowAnim);
        recordButton = TransformExtension.FindComponent <Button>(CacheTrans, "RecordButton");
        recordButton.onClick.AddListener(StartRecord);
        startCommissionButton = TransformExtension.FindComponent <Button>(CacheTrans, "StartCommissionButton");
        startCommissionButton.onClick.AddListener(StartCommission);
        startExportButton = TransformExtension.FindComponent <Button>(CacheTrans, "StartExportButton");
        startExportButton.onClick.AddListener(StartExport);
        backButton = TransformExtension.FindComponent <Button>(CacheTrans, "BackButton");
        backButton.onClick.AddListener(Back);

        showPlayStyle = TransformExtension.FindComponent <Dropdown>(CacheTrans, "ShowPlayStyle");

        recordStyle = TransformExtension.FindComponent <Dropdown>(CacheTrans, "RecordStyle");
    }