void Awake()
    {
        skillCreationState =
            GameObject.Find("SkillCreationCanvas").GetComponent <SkillCreationState>();
        interfightCameraView =
            GameObject.Find("GeneralScripts").GetComponent <InterfightCameraView>();
        backgroundImage = transform.Find("TransparentBackground").GetComponent <Image>();
        skillNameInput  =
            transform.Find("EditedSkill/NameInput").GetComponent <InputField>();
        imageInputObj      = transform.Find("EditedSkill/ImageInput").gameObject;
        imageInputTextObj  = transform.Find("EditedSkill/ImageInput/Text").gameObject;
        imageInputImageObj = transform.Find("EditedSkill/ImageInput/Image").gameObject;
        imageOptionsObj    =
            transform.Find("EditedSkill/ImageInput/ImageOptionsScrollView").gameObject;
        stepsContainerObj      = transform.Find("EditedSkill/StepsContainer").gameObject;
        constructionOptionsObj =
            transform.Find("ComponentPlayground/ConstructionOptions").gameObject;
        editedComponentRootText = transform
                                  .Find("ComponentPlayground/EditedComponentRoot/Text")
                                  .GetComponent <Text>();
        availableComponentsContentObj = transform
                                        .Find("AvailableComponents/ScrollView/Viewport/Content").gameObject;

        // Update the skill name variable when the user types.
        skillNameInput.onValueChanged.AddListener(
            newValue => skillCreationState.setEditedName(newValue)
            );

        // Update the display when certain state changes.
        skillCreationState.addEditedComponentListener(updateEditedComponent);
        skillCreationState.addAvailableComponentsListener(updateAvailableComponents);
    }
Beispiel #2
0
 void Awake()
 {
     skillCreationCameraView =
         GameObject.Find("GeneralScripts").GetComponent <InterfightCameraView>();
 }