public IEnumerator BeVisibleByDefault() { avatarModel.wearables = new List <string>() { SUNGLASSES_ID }; yield return(avatarShape.ApplyChanges(JsonUtility.ToJson(avatarModel))); var sunglassesController = new WearableController_Mock(AvatarRenderer_Mock.GetWearableControllers(avatarShape.avatarRenderer)[SUNGLASSES_ID]); Assert.IsTrue(sunglassesController.myAssetRenderers.All(x => x.enabled)); }
public IEnumerator BeVisibleByDefault() { avatarModel.wearables = new List <string>() { SUNGLASSES_ID }; avatarShape.UpdateFromModel(avatarModel); yield return(avatarShape.routine); var sunglassesController = new WearableController_Mock(AvatarRenderer_Mock.GetWearableControllers(avatarShape.avatarRenderer)[SUNGLASSES_ID]); Assert.IsTrue(sunglassesController.myAssetRenderers.All(x => x.enabled)); }
public IEnumerator NotBeHiddenByWrongGeneralHides() { var bandana = catalog.Get(BLUE_BANDANA_ID); bandana.hides = new[] { "NonExistentCategory" }; avatarModel.wearables = new List <string>() { SUNGLASSES_ID, BLUE_BANDANA_ID }; yield return(avatarShape.ApplyChanges(JsonUtility.ToJson(avatarModel))); var sunglassesController = new WearableController_Mock(AvatarRenderer_Mock.GetWearableControllers(avatarShape.avatarRenderer)[SUNGLASSES_ID]); var bandanaController = new WearableController_Mock(AvatarRenderer_Mock.GetWearableControllers(avatarShape.avatarRenderer)[BLUE_BANDANA_ID]); Assert.IsTrue(sunglassesController.myAssetRenderers.All(x => x.enabled)); Assert.IsTrue(bandanaController.myAssetRenderers.All(x => x.enabled)); }
public IEnumerator NotBeHiddenByOverrideHides() { var sunglasses = catalog.Get(SUNGLASSES_ID); var bandana = catalog.Get(BLUE_BANDANA_ID); bandana.GetRepresentation(WearableLiterals.BodyShapes.MALE).overrideHides = new[] { sunglasses.category }; avatarModel.wearables = new List <string>() { SUNGLASSES_ID, BLUE_BANDANA_ID }; yield return(avatarShape.ApplyChanges(JsonUtility.ToJson(avatarModel))); var sunglassesController = new WearableController_Mock(AvatarRenderer_Mock.GetWearableControllers(avatarShape.avatarRenderer)[SUNGLASSES_ID]); var bandanaController = new WearableController_Mock(AvatarRenderer_Mock.GetWearableControllers(avatarShape.avatarRenderer)[BLUE_BANDANA_ID]); Assert.IsTrue(sunglassesController.myAssetRenderers.All(x => x.enabled)); Assert.IsTrue(bandanaController.myAssetRenderers.All(x => x.enabled)); }
public IEnumerator BeHiddenByGeneralHides() { var sunglasses = catalog.Get(SUNGLASSES_ID); var bandana = catalog.Get(BLUE_BANDANA_ID); bandana.hides = new[] { sunglasses.category }; avatarModel.wearables = new List <string>() { SUNGLASSES_ID, BLUE_BANDANA_ID }; avatarShape.UpdateFromModel(avatarModel); yield return(avatarShape.routine); var sunglassesController = new WearableController_Mock(AvatarRenderer_Mock.GetWearableControllers(avatarShape.avatarRenderer)[SUNGLASSES_ID]); var bandanaController = new WearableController_Mock(AvatarRenderer_Mock.GetWearableControllers(avatarShape.avatarRenderer)[BLUE_BANDANA_ID]); Assert.IsTrue(sunglassesController.myAssetRenderers.All(x => !x.enabled)); Assert.IsTrue(bandanaController.myAssetRenderers.All(x => x.enabled)); }