-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conflicts: Assets/QuickSheet/ExcelPlugin/Editor/Excel Settings.asset Assets/QuickSheet/GDataPlugin/Editor/Google Data Settings.asset Assets/QuickSheet/GDataPlugin/Editor/GoogleDataSettingsEditor.cs
- Loading branch information
Showing
58 changed files
with
678 additions
and
671 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,46 @@ | ||
**/.DS_Store | ||
# Supyrb .gitignore standalone v0.1.4 | ||
|
||
# Unity generated | ||
/Temp/** | ||
/Library/** | ||
/obj/** | ||
|
||
# Visual Studio / MonoDevelop generated | ||
/ExportedObj/** | ||
/obj | ||
/.vs/** | ||
*.svd | ||
*.userprefs | ||
*.csproj | ||
*.pidb | ||
*.suo | ||
*.sln | ||
*.user | ||
*.unityproj | ||
*.booproj | ||
|
||
*.csproj | ||
*.cache | ||
*Resharper* | ||
*ReSharper* | ||
*.orig | ||
*.orig.* | ||
*sln* | ||
.idea/** | ||
|
||
# OS generated | ||
.DS_Store | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
ehthumbs.db | ||
Thumbs.db | ||
report.xml | ||
~$* | ||
|
||
# Custom | ||
/Builds/** | ||
/Data/** | ||
/Assets/Temp/** | ||
/Assets/Temp.meta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
46 changes: 46 additions & 0 deletions
46
Assets/QuickSheet/Example/Data/Editor/ExcelExampleAssetPostProcessor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
using UnityEngine; | ||
using UnityEditor; | ||
using System.Collections; | ||
using System.IO; | ||
using UnityQuickSheet; | ||
|
||
/// | ||
/// !!! Machine generated code !!! | ||
/// | ||
public class ExcelExampleAssetPostprocessor : AssetPostprocessor | ||
{ | ||
private static readonly string filePath = "Assets/QuickSheet/Example/Excel/Example.xlsx"; | ||
private static readonly string assetFilePath = "Assets/QuickSheet/Example/Excel/ExcelExample.asset"; | ||
private static readonly string sheetName = "ExcelExample"; | ||
|
||
static void OnPostprocessAllAssets (string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) | ||
{ | ||
foreach (string asset in importedAssets) | ||
{ | ||
if (!filePath.Equals (asset)) | ||
continue; | ||
|
||
ExcelExample data = (ExcelExample)AssetDatabase.LoadAssetAtPath (assetFilePath, typeof(ExcelExample)); | ||
if (data == null) { | ||
data = ScriptableObject.CreateInstance<ExcelExample> (); | ||
data.SheetName = filePath; | ||
data.WorksheetName = sheetName; | ||
AssetDatabase.CreateAsset ((ScriptableObject)data, assetFilePath); | ||
//data.hideFlags = HideFlags.NotEditable; | ||
} | ||
|
||
//data.dataArray = new ExcelQuery(filePath, sheetName).Deserialize<ExcelExampleData>().ToArray(); | ||
|
||
//ScriptableObject obj = AssetDatabase.LoadAssetAtPath (assetFilePath, typeof(ScriptableObject)) as ScriptableObject; | ||
//EditorUtility.SetDirty (obj); | ||
|
||
ExcelQuery query = new ExcelQuery(filePath, sheetName); | ||
if (query != null && query.IsValid()) | ||
{ | ||
data.dataArray = query.Deserialize<ExcelExampleData>().ToArray(); | ||
ScriptableObject obj = AssetDatabase.LoadAssetAtPath (assetFilePath, typeof(ScriptableObject)) as ScriptableObject; | ||
EditorUtility.SetDirty (obj); | ||
} | ||
} | ||
} | ||
} |
6 changes: 5 additions & 1 deletion
6
.../.svn/text-base/Database.cs.meta.svn-base → ...or/ExcelExampleAssetPostProcessor.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.