protected override IEnumerator SetUp() { yield return(SetUp_SceneController()); yield return(SetUp_CharacterController()); if (avatarShape == null) { avatarModel = new AvatarModel() { name = " test", hairColor = Color.white, eyeColor = Color.white, skinColor = Color.white, bodyShape = WearableLiterals.BodyShapes.FEMALE, wearables = new List <string>() { } }; catalog = AvatarTestHelpers.CreateTestCatalogLocal(); avatarShape = AvatarTestHelpers.CreateAvatarShape(scene, avatarModel); yield return(new DCL.WaitUntil(() => avatarShape.everythingIsLoaded, 20)); } }
protected override IEnumerator SetUp() { yield return(base.SetUp()); if (controller == null) { skinColorList = Resources.Load <ColorList>("SkinTone"); hairColorList = Resources.Load <ColorList>("HairColor"); eyeColorList = Resources.Load <ColorList>("EyeColor"); userProfile = ScriptableObject.CreateInstance <UserProfile>(); } catalog = AvatarTestHelpers.CreateTestCatalogLocal(); controller = new AvatarEditorHUDController_Mock(); controller.Initialize(userProfile, catalog); controller.SetVisibility(true); userProfile.UpdateData(new UserProfileModel() { name = "name", email = "mail", avatar = new AvatarModel() { bodyShape = WearableLiterals.BodyShapes.FEMALE, wearables = new List <string>() { }, } }, false); }
protected override IEnumerator SetUp() { yield return(base.SetUp()); bodyShapeController = Substitute.For <IBodyShapeController>(); bodyShapeController.bodyShapeId.Returns(WearableLiterals.BodyShapes.FEMALE); catalog = AvatarTestHelpers.CreateTestCatalogLocal(); }
protected override IEnumerator SetUp() { yield return(base.SetUp()); catalog = AvatarTestHelpers.CreateTestCatalogLocal(); toCleanUp.Clear(); wearableHolder = CreateTestGameObject("_Holder").transform; }
private void ProcessCatalog(WearableDictionary catalog) { wearablesByCategory.Clear(); view.RemoveAllWearables(); using (var iterator = catalog.GetEnumerator()) { while (iterator.MoveNext()) { AddWearable(iterator.Current.Key, iterator.Current.Value); } } }
public void SetCatalog(WearableDictionary catalog) { if (this.catalog != null) { this.catalog.OnAdded -= AddWearable; this.catalog.OnRemoved -= RemoveWearable; } this.catalog = catalog; ProcessCatalog(this.catalog); this.catalog.OnAdded += AddWearable; this.catalog.OnRemoved += RemoveWearable; }
public void Initialize(UserProfile userProfile, WearableDictionary catalog, bool bypassUpdateAvatarPreview = false) { this.userProfile = userProfile; this.bypassUpdateAvatarPreview = bypassUpdateAvatarPreview; view = AvatarEditorHUDView.Create(this); skinColorList = Resources.Load <ColorList>("SkinTone"); hairColorList = Resources.Load <ColorList>("HairColor"); eyeColorList = Resources.Load <ColorList>("EyeColor"); view.SetColors(skinColorList.colors, hairColorList.colors, eyeColorList.colors); SetCatalog(catalog); LoadUserProfile(userProfile, true); this.userProfile.OnUpdate += LoadUserProfile; }
private void Setup_AvatarEditorHUDController() { userProfile = ScriptableObject.CreateInstance <UserProfile>(); userProfile.UpdateData(new UserProfileModel() { name = "name", email = "mail", avatar = new AvatarModel() { bodyShape = WearableLiterals.BodyShapes.FEMALE, wearables = new List <string>() { }, } }, false); catalog = AvatarTestHelpers.CreateTestCatalogLocal(); controller = new AvatarEditorHUDController_Mock(); controller.Initialize(userProfile, catalog); }
protected override IEnumerator SetUp() { yield return(base.SetUp()); userProfile = ScriptableObject.CreateInstance <UserProfile>(); userProfile.UpdateData(new UserProfileModel() { name = "name", email = "mail", avatar = new AvatarModel() { bodyShape = WearableLiterals.BodyShapes.FEMALE, wearables = new List <string>() { } } }, false); catalog = AvatarTestHelpers.CreateTestCatalogLocal(); controller = new AvatarEditorHUDController_Mock(); controller.Initialize(userProfile, catalog); }
protected override IEnumerator SetUp() { yield return(base.SetUp()); avatarModel = new AvatarModel() { name = " test", hairColor = Color.white, eyeColor = Color.white, skinColor = Color.white, bodyShape = WearableLiterals.BodyShapes.FEMALE, wearables = new List <string>() { } }; catalog = AvatarTestHelpers.CreateTestCatalog(); var avatarShape = AvatarTestHelpers.CreateAvatarShape(scene, avatarModel); yield return(new DCL.WaitUntil(() => avatarShape.everythingIsLoaded, 20)); avatarRenderer = avatarShape.avatarRenderer; }