Skip to content

Commit 63e4d22

Browse files
committed
initial commit
0 parents  commit 63e4d22

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+2470
-0
lines changed

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
end_of_line = crlf
11+
12+
[*.md]
13+
max_line_length = off
14+
trim_trailing_whitespace = false
15+
16+
[*.cs]
17+
indent_size = 4

.gitignore

Lines changed: 240 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,240 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
4+
# User-specific files
5+
*.suo
6+
*.user
7+
*.userosscache
8+
*.sln.docstates
9+
10+
# User-specific files (MonoDevelop/Xamarin Studio)
11+
*.userprefs
12+
13+
# Build results
14+
[Dd]ebug/
15+
[Dd]ebugPublic/
16+
[Rr]elease/
17+
[Rr]eleases/
18+
[Xx]64/
19+
[Xx]86/
20+
[Bb]uild/
21+
bld/
22+
[Bb]in/
23+
[Oo]bj/
24+
25+
# Visual Studio 2015 cache/options directory
26+
.vs/
27+
# Uncomment if you have tasks that create the project's static files in wwwroot
28+
#wwwroot/
29+
30+
# MSTest test Results
31+
[Tt]est[Rr]esult*/
32+
[Bb]uild[Ll]og.*
33+
34+
# NUNIT
35+
*.VisualState.xml
36+
TestResult.xml
37+
38+
# Build Results of an ATL Project
39+
[Dd]ebugPS/
40+
[Rr]eleasePS/
41+
dlldata.c
42+
43+
# DNX
44+
project.lock.json
45+
artifacts/
46+
47+
*_i.c
48+
*_p.c
49+
*_i.h
50+
*.ilk
51+
*.obj
52+
*.pch
53+
*.pdb
54+
*.pgc
55+
*.pgd
56+
*.rsp
57+
*.sbr
58+
*.tlb
59+
*.tli
60+
*.tlh
61+
*.tmp
62+
*.tmp_proj
63+
*.log
64+
*.vspscc
65+
*.vssscc
66+
.builds
67+
*.pidb
68+
*.svclog
69+
*.scc
70+
71+
# Chutzpah Test files
72+
_Chutzpah*
73+
74+
# Visual C++ cache files
75+
ipch/
76+
*.aps
77+
*.ncb
78+
*.opendb
79+
*.opensdf
80+
*.sdf
81+
*.cachefile
82+
*.VC.db
83+
84+
# Visual Studio profiler
85+
*.psess
86+
*.vsp
87+
*.vspx
88+
*.sap
89+
90+
# TFS 2012 Local Workspace
91+
$tf/
92+
93+
# Guidance Automation Toolkit
94+
*.gpState
95+
96+
# ReSharper is a .NET coding add-in
97+
_ReSharper*/
98+
*.[Rr]e[Ss]harper
99+
*.DotSettings.user
100+
101+
# JustCode is a .NET coding add-in
102+
.JustCode
103+
104+
# TeamCity is a build add-in
105+
_TeamCity*
106+
107+
# DotCover is a Code Coverage Tool
108+
*.dotCover
109+
110+
# NCrunch
111+
_NCrunch_*
112+
.*crunch*.local.xml
113+
nCrunchTemp_*
114+
115+
# MightyMoose
116+
*.mm.*
117+
AutoTest.Net/
118+
119+
# Web workbench (sass)
120+
.sass-cache/
121+
122+
# Installshield output folder
123+
[Ee]xpress/
124+
125+
# DocProject is a documentation generator add-in
126+
DocProject/buildhelp/
127+
DocProject/Help/*.HxT
128+
DocProject/Help/*.HxC
129+
DocProject/Help/*.hhc
130+
DocProject/Help/*.hhk
131+
DocProject/Help/*.hhp
132+
DocProject/Help/Html2
133+
DocProject/Help/html
134+
135+
# Click-Once directory
136+
publish/
137+
138+
# Publish Web Output
139+
*.[Pp]ublish.xml
140+
*.azurePubxml
141+
#*.pubxml
142+
*.publishproj
143+
144+
# NuGet Packages
145+
*.nupkg
146+
# The packages folder can be ignored because of Package Restore
147+
**/packages/*
148+
# except build/, which is used as an MSBuild target.
149+
!**/packages/build/
150+
# Uncomment if necessary however generally it will be regenerated when needed
151+
#!**/packages/repositories.config
152+
# NuGet v3's project.json files produces more ignoreable files
153+
*.nuget.props
154+
*.nuget.targets
155+
156+
# Microsoft Azure Build Output
157+
csx/
158+
*.build.csdef
159+
160+
# Microsoft Azure Emulator
161+
ecf/
162+
rcf/
163+
164+
# Microsoft Azure ApplicationInsights config file
165+
ApplicationInsights.config
166+
167+
# Windows Store app package directory
168+
AppPackages/
169+
BundleArtifacts/
170+
171+
# Visual Studio cache files
172+
# files ending in .cache can be ignored
173+
*.[Cc]ache
174+
# but keep track of directories ending in .cache
175+
!*.[Cc]ache/
176+
177+
# Others
178+
ClientBin/
179+
[Ss]tyle[Cc]op.*
180+
~$*
181+
*~
182+
*.dbmdl
183+
*.dbproj.schemaview
184+
*.pfx
185+
*.publishsettings
186+
node_modules/
187+
orleans.codegen.cs
188+
189+
# RIA/Silverlight projects
190+
Generated_Code/
191+
192+
# Backup & report files from converting an old project file
193+
# to a newer Visual Studio version. Backup files are not needed,
194+
# because we have git ;-)
195+
_UpgradeReport_Files/
196+
Backup*/
197+
UpgradeLog*.XML
198+
UpgradeLog*.htm
199+
200+
# SQL Server files
201+
*.mdf
202+
*.ldf
203+
204+
# Business Intelligence projects
205+
*.rdl.data
206+
*.bim.layout
207+
*.bim_*.settings
208+
209+
# Microsoft Fakes
210+
FakesAssemblies/
211+
212+
# GhostDoc plugin setting file
213+
*.GhostDoc.xml
214+
215+
# Node.js Tools for Visual Studio
216+
.ntvs_analysis.dat
217+
218+
# Visual Studio 6 build log
219+
*.plg
220+
221+
# Visual Studio 6 workspace options file
222+
*.opt
223+
224+
# Visual Studio LightSwitch build output
225+
**/*.HTMLClient/GeneratedArtifacts
226+
**/*.DesktopClient/GeneratedArtifacts
227+
**/*.DesktopClient/ModelManifest.xml
228+
**/*.Server/GeneratedArtifacts
229+
**/*.Server/ModelManifest.xml
230+
_Pvt_Extensions
231+
232+
# LightSwitch generated files
233+
GeneratedArtifacts/
234+
ModelManifest.xml
235+
236+
# Paket dependency manager
237+
.paket/paket.exe
238+
239+
# FAKE - F# Make
240+
.fake/

Editor.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/ReactScriptDrawer.cs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using UnityEditor;
4+
using UnityEngine;
5+
6+
namespace ReactUnity.Editor
7+
{
8+
[CustomPropertyDrawer(typeof(ReactScript))]
9+
public class ReactScriptDrawer : PropertyDrawer
10+
{
11+
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
12+
{
13+
var source = property.FindPropertyRelative("ScriptSource");
14+
position.y += 2;
15+
position.height = 18;
16+
EditorGUI.PropertyField(position, source);
17+
18+
position.y += 20;
19+
position.height = 18;
20+
21+
if ((int)ScriptSource.TextAsset == source.intValue)
22+
EditorGUI.PropertyField(position, property.FindPropertyRelative("SourceAsset"));
23+
else if ((int)ScriptSource.Text == source.intValue)
24+
EditorGUI.PropertyField(position, property.FindPropertyRelative("SourceText"));
25+
else
26+
EditorGUI.PropertyField(position, property.FindPropertyRelative("SourcePath"));
27+
}
28+
29+
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
30+
{
31+
return 40;
32+
}
33+
}
34+
}

Editor/ReactScriptDrawer.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/ReactUnity.Editor.asmdef

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "ReactUnity.Editor",
3+
"references": [
4+
"GUID:ed4a920eac98dc342ba18a6baa202849"
5+
],
6+
"includePlatforms": [
7+
"Editor"
8+
],
9+
"excludePlatforms": [],
10+
"allowUnsafeCode": false,
11+
"overrideReferences": false,
12+
"precompiledReferences": [],
13+
"autoReferenced": true,
14+
"defineConstraints": [],
15+
"versionDefines": [],
16+
"noEngineReferences": false
17+
}

Editor/ReactUnity.Editor.asmdef.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Prefabs.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)