コード例 #1
0
        private void DrawFavoriteButton(SceneData sceneAsset)
        {
            Texture buttonTexture = Favorites.IsSceneFavorite(sceneAsset) ? SceneBrowserResources.GetFullStarTexture() : SceneBrowserResources.GetEmptyStarTexture();


            bool clickOnFavoriteButton = GUILayout.Button(new GUIContent(buttonTexture), GUILayout.Height(EditorGUIUtility.singleLineHeight), GUILayout.Width(EditorGUIUtility.singleLineHeight + 15));

            if (clickOnFavoriteButton == true)
            {
                Favorites.ToggleFavorite(sceneAsset);
            }
        }
コード例 #2
0
 private SceneData[] GetOnlyFavoritesScenes()
 {
     return(_projectScenes.Where(x => Favorites.IsSceneFavorite(x) == true).ToArray());
 }
コード例 #3
0
 private SceneData[] GetNotFavoritesScenes()
 {
     return(_projectScenes.Where(x => Favorites.IsSceneFavorite(x) == false).ToArray());
 }