├── .gitignore ├── Assets ├── InspectorPlus.meta ├── InspectorPlus │ ├── Arrow-Down.png │ ├── Arrow-Down.png.meta │ ├── Arrow-Up.png │ ├── Arrow-Up.png.meta │ ├── Editor.meta │ ├── Editor │ │ ├── InspectorPlus.asset │ │ ├── InspectorPlus.asset.meta │ │ ├── InspectorPlus.cs │ │ ├── InspectorPlus.cs.meta │ │ ├── InspectorPlusFiler.cs │ │ ├── InspectorPlusFiler.cs.meta │ │ ├── InspectorPlusFilerStrings.cs │ │ ├── InspectorPlusFilerStrings.cs.meta │ │ ├── InspectorPlusManager.cs │ │ ├── InspectorPlusManager.cs.meta │ │ ├── InspectorPlusSummary.cs │ │ ├── InspectorPlusSummary.cs.meta │ │ ├── InspectorPlusTracker.cs │ │ ├── InspectorPlusTracker.cs.meta │ │ ├── InspectorPlusVar.cs │ │ ├── InspectorPlusVar.cs.meta │ │ ├── InspectorPlusWindow.cs │ │ └── InspectorPlusWindow.cs.meta │ ├── InspectorPlusType.cs │ └── InspectorPlusType.cs.meta ├── InspectorPlusTestScript.cs ├── InspectorPlusTestScript.cs.meta ├── test.unity └── test.unity.meta ├── LICENSE ├── MainGithub.PNG ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NavMeshLayers.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset └── UnityConnectSettings.asset └── ReadMe.md /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | 8 | # Visual Studio 2015 cache directory 9 | /.vs/ 10 | 11 | # Autogenerated VS/MD/Consulo solution and project files 12 | ExportedObj/ 13 | .consulo/ 14 | *.csproj 15 | *.unityproj 16 | *.sln 17 | *.suo 18 | *.tmp 19 | *.user 20 | *.userprefs 21 | *.pidb 22 | *.booproj 23 | *.svd 24 | *.pdb 25 | 26 | # Unity3D generated meta files 27 | *.pidb.meta 28 | 29 | # Unity3D Generated File On Crash Reports 30 | sysinfo.txt 31 | 32 | # Builds 33 | *.apk 34 | *.unitypackage 35 | Assets/Thumbs.db.meta 36 | Assets/Thumbs.db 37 | -------------------------------------------------------------------------------- /Assets/InspectorPlus.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a66ea795c7b892544918e96ee893dde3 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/InspectorPlus/Arrow-Down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArthurBrussee/InspectorPlusPlus/3dada193384ee4892d63cedb031c375f4aab78a1/Assets/InspectorPlus/Arrow-Down.png -------------------------------------------------------------------------------- /Assets/InspectorPlus/Arrow-Down.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc97ca9c78ffc114dab68ffa9e5223bd 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 1 8 | linearTexture: 0 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -1 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: -1 27 | aniso: -1 28 | mipBias: -1 29 | wrapMode: -1 30 | nPOTScale: 1 31 | lightmap: 0 32 | compressionQuality: 50 33 | spriteMode: 0 34 | spriteExtrude: 1 35 | alignment: 0 36 | spritePivot: {x: .5, y: .5} 37 | spritePixelsToUnits: 100 38 | alphaIsTransparency: 0 39 | textureType: -1 40 | buildTargetSettings: [] 41 | spriteSheet: 42 | sprites: [] 43 | spriteAtlasHint: 44 | userData: 45 | -------------------------------------------------------------------------------- /Assets/InspectorPlus/Arrow-Up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArthurBrussee/InspectorPlusPlus/3dada193384ee4892d63cedb031c375f4aab78a1/Assets/InspectorPlus/Arrow-Up.png -------------------------------------------------------------------------------- /Assets/InspectorPlus/Arrow-Up.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 54c6fd2073f9a2849b01a02dfd33cbf3 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 1 8 | linearTexture: 0 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -1 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: -1 27 | aniso: -1 28 | mipBias: -1 29 | wrapMode: -1 30 | nPOTScale: 1 31 | lightmap: 0 32 | compressionQuality: 50 33 | spriteMode: 0 34 | spriteExtrude: 1 35 | alignment: 0 36 | spritePivot: {x: .5, y: .5} 37 | spritePixelsToUnits: 100 38 | alphaIsTransparency: 0 39 | textureType: -1 40 | buildTargetSettings: [] 41 | spriteSheet: 42 | sprites: [] 43 | spriteAtlasHint: 44 | userData: 45 | -------------------------------------------------------------------------------- /Assets/InspectorPlus/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fbcb12c670f807942afa27b512058ddc 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/InspectorPlus/Editor/InspectorPlus.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 176de26f63e1773428c7efab48dac9f5, type: 3} 12 | m_Name: InspectorPlus 13 | m_EditorClassIdentifier: 14 | trackers: 15 | - name: InspectorPlusTestScript 16 | m_vars: 17 | - limitType: 0 18 | min: -0 19 | max: -0 20 | progressBar: 0 21 | iMin: 0 22 | iMax: 0 23 | active: 1 24 | type: Transform 25 | name: target 26 | vectorDrawType: 0 27 | relative: 0 28 | scale: 0 29 | space: 0 30 | labelEnabled: 00000000 31 | label: 32 | - 33 | - 34 | - 35 | - 36 | labelBold: 00000000 37 | buttonEnabled: 00000000000000000000000000000000 38 | buttonText: 39 | - 40 | - 41 | - 42 | - 43 | - 44 | - 45 | - 46 | - 47 | - 48 | - 49 | - 50 | - 51 | - 52 | - 53 | - 54 | - 55 | buttonCallback: 56 | - 57 | - 58 | - 59 | - 60 | - 61 | - 62 | - 63 | - 64 | - 65 | - 66 | - 67 | - 68 | - 69 | - 70 | - 71 | - 72 | buttonCondense: 00000000 73 | numSpace: 0 74 | classType: InspectorPlusTestScript 75 | isArray: 0 76 | offset: {x: 0.5, y: 0.5, z: 0} 77 | QuaternionHandle: 0 78 | canWrite: 1 79 | tooltip: Tooltip 80 | hasTooltip: 0 81 | fixedTip: 0 82 | toggleStart: 0 83 | toggleSize: 0 84 | toggleLevel: 0 85 | index: 0 86 | maxSize: 22 87 | largeTexture: 0 88 | textureSize: 70 89 | textFieldDefault: 90 | textArea: 0 91 | - limitType: 0 92 | min: -0 93 | max: -0 94 | progressBar: 0 95 | iMin: 0 96 | iMax: 0 97 | active: 1 98 | type: Vector3 99 | name: lookAtPoint 100 | vectorDrawType: 0 101 | relative: 0 102 | scale: 0 103 | space: 0 104 | labelEnabled: 00000000 105 | label: 106 | - 107 | - 108 | - 109 | - 110 | labelBold: 00000000 111 | buttonEnabled: 00000000000000000000000000000000 112 | buttonText: 113 | - 114 | - 115 | - 116 | - 117 | - 118 | - 119 | - 120 | - 121 | - 122 | - 123 | - 124 | - 125 | - 126 | - 127 | - 128 | - 129 | buttonCallback: 130 | - 131 | - 132 | - 133 | - 134 | - 135 | - 136 | - 137 | - 138 | - 139 | - 140 | - 141 | - 142 | - 143 | - 144 | - 145 | - 146 | buttonCondense: 00000000 147 | numSpace: 0 148 | classType: InspectorPlusTestScript 149 | isArray: 0 150 | offset: {x: 0.5, y: 0.5, z: 0} 151 | QuaternionHandle: 0 152 | canWrite: 1 153 | tooltip: Tooltip 154 | hasTooltip: 0 155 | fixedTip: 0 156 | toggleStart: 0 157 | toggleSize: 0 158 | toggleLevel: 0 159 | index: 1 160 | maxSize: 22 161 | largeTexture: 0 162 | textureSize: 70 163 | textFieldDefault: 164 | textArea: 0 165 | - limitType: 0 166 | min: -0 167 | max: -0 168 | progressBar: 0 169 | iMin: 0 170 | iMax: 0 171 | active: 1 172 | type: Vector3 173 | name: direction 174 | vectorDrawType: 0 175 | relative: 0 176 | scale: 0 177 | space: 0 178 | labelEnabled: 00000000 179 | label: 180 | - 181 | - 182 | - 183 | - 184 | labelBold: 00000000 185 | buttonEnabled: 00000000000000000000000000000000 186 | buttonText: 187 | - 188 | - 189 | - 190 | - 191 | - 192 | - 193 | - 194 | - 195 | - 196 | - 197 | - 198 | - 199 | - 200 | - 201 | - 202 | - 203 | buttonCallback: 204 | - 205 | - 206 | - 207 | - 208 | - 209 | - 210 | - 211 | - 212 | - 213 | - 214 | - 215 | - 216 | - 217 | - 218 | - 219 | - 220 | buttonCondense: 00000000 221 | numSpace: 0 222 | classType: InspectorPlusTestScript 223 | isArray: 0 224 | offset: {x: 0.5, y: 0.5, z: 0} 225 | QuaternionHandle: 0 226 | canWrite: 1 227 | tooltip: Tooltip 228 | hasTooltip: 0 229 | fixedTip: 0 230 | toggleStart: 0 231 | toggleSize: 0 232 | toggleLevel: 0 233 | index: 2 234 | maxSize: 22 235 | largeTexture: 0 236 | textureSize: 70 237 | textFieldDefault: 238 | textArea: 0 239 | - limitType: 0 240 | min: -0 241 | max: -0 242 | progressBar: 0 243 | iMin: 0 244 | iMax: 0 245 | active: 1 246 | type: Vector2 247 | name: screenPos 248 | vectorDrawType: 0 249 | relative: 0 250 | scale: 0 251 | space: 0 252 | labelEnabled: 00000000 253 | label: 254 | - 255 | - 256 | - 257 | - 258 | labelBold: 00000000 259 | buttonEnabled: 00000000000000000000000000000000 260 | buttonText: 261 | - 262 | - 263 | - 264 | - 265 | - 266 | - 267 | - 268 | - 269 | - 270 | - 271 | - 272 | - 273 | - 274 | - 275 | - 276 | - 277 | buttonCallback: 278 | - 279 | - 280 | - 281 | - 282 | - 283 | - 284 | - 285 | - 286 | - 287 | - 288 | - 289 | - 290 | - 291 | - 292 | - 293 | - 294 | buttonCondense: 00000000 295 | numSpace: 0 296 | classType: InspectorPlusTestScript 297 | isArray: 0 298 | offset: {x: 0.5, y: 0.5, z: 0} 299 | QuaternionHandle: 0 300 | canWrite: 1 301 | tooltip: Tooltip 302 | hasTooltip: 0 303 | fixedTip: 0 304 | toggleStart: 0 305 | toggleSize: 0 306 | toggleLevel: 0 307 | index: 3 308 | maxSize: 22 309 | largeTexture: 0 310 | textureSize: 70 311 | textFieldDefault: 312 | textArea: 0 313 | - limitType: 0 314 | min: -0 315 | max: -0 316 | progressBar: 0 317 | iMin: 0 318 | iMax: 0 319 | active: 1 320 | type: Single 321 | name: maxSpeed 322 | vectorDrawType: 0 323 | relative: 0 324 | scale: 0 325 | space: 0 326 | labelEnabled: 00000000 327 | label: 328 | - 329 | - 330 | - 331 | - 332 | labelBold: 00000000 333 | buttonEnabled: 00000000000000000000000000000000 334 | buttonText: 335 | - 336 | - 337 | - 338 | - 339 | - 340 | - 341 | - 342 | - 343 | - 344 | - 345 | - 346 | - 347 | - 348 | - 349 | - 350 | - 351 | buttonCallback: 352 | - 353 | - 354 | - 355 | - 356 | - 357 | - 358 | - 359 | - 360 | - 361 | - 362 | - 363 | - 364 | - 365 | - 366 | - 367 | - 368 | buttonCondense: 00000000 369 | numSpace: 0 370 | classType: InspectorPlusTestScript 371 | isArray: 0 372 | offset: {x: 0.5, y: 0.5, z: 0} 373 | QuaternionHandle: 0 374 | canWrite: 1 375 | tooltip: Tooltip 376 | hasTooltip: 0 377 | fixedTip: 0 378 | toggleStart: 0 379 | toggleSize: 0 380 | toggleLevel: 0 381 | index: 4 382 | maxSize: 22 383 | largeTexture: 0 384 | textureSize: 70 385 | textFieldDefault: 386 | textArea: 0 387 | - limitType: 0 388 | min: -0 389 | max: -0 390 | progressBar: 0 391 | iMin: 0 392 | iMax: 0 393 | active: 1 394 | type: Single 395 | name: health 396 | vectorDrawType: 0 397 | relative: 0 398 | scale: 0 399 | space: 0 400 | labelEnabled: 00000000 401 | label: 402 | - 403 | - 404 | - 405 | - 406 | labelBold: 00000000 407 | buttonEnabled: 00000000000000000000000000000000 408 | buttonText: 409 | - 410 | - 411 | - 412 | - 413 | - 414 | - 415 | - 416 | - 417 | - 418 | - 419 | - 420 | - 421 | - 422 | - 423 | - 424 | - 425 | buttonCallback: 426 | - 427 | - 428 | - 429 | - 430 | - 431 | - 432 | - 433 | - 434 | - 435 | - 436 | - 437 | - 438 | - 439 | - 440 | - 441 | - 442 | buttonCondense: 00000000 443 | numSpace: 0 444 | classType: InspectorPlusTestScript 445 | isArray: 0 446 | offset: {x: 0.5, y: 0.5, z: 0} 447 | QuaternionHandle: 0 448 | canWrite: 1 449 | tooltip: Tooltip 450 | hasTooltip: 0 451 | fixedTip: 0 452 | toggleStart: 0 453 | toggleSize: 0 454 | toggleLevel: 0 455 | index: 5 456 | maxSize: 22 457 | largeTexture: 0 458 | textureSize: 70 459 | textFieldDefault: 460 | textArea: 0 461 | - limitType: 0 462 | min: -0 463 | max: -0 464 | progressBar: 0 465 | iMin: 0 466 | iMax: 0 467 | active: 1 468 | type: Int32 469 | name: MyInt 470 | vectorDrawType: 0 471 | relative: 0 472 | scale: 0 473 | space: 0 474 | labelEnabled: 00000000 475 | label: 476 | - 477 | - 478 | - 479 | - 480 | labelBold: 00000000 481 | buttonEnabled: 00000000000000000000000000000000 482 | buttonText: 483 | - 484 | - 485 | - 486 | - 487 | - 488 | - 489 | - 490 | - 491 | - 492 | - 493 | - 494 | - 495 | - 496 | - 497 | - 498 | - 499 | buttonCallback: 500 | - 501 | - 502 | - 503 | - 504 | - 505 | - 506 | - 507 | - 508 | - 509 | - 510 | - 511 | - 512 | - 513 | - 514 | - 515 | - 516 | buttonCondense: 00000000 517 | numSpace: 0 518 | classType: InspectorPlusTestScript 519 | isArray: 0 520 | offset: {x: 0.5, y: 0.5, z: 0} 521 | QuaternionHandle: 0 522 | canWrite: 1 523 | tooltip: Tooltip 524 | hasTooltip: 0 525 | fixedTip: 0 526 | toggleStart: 0 527 | toggleSize: 0 528 | toggleLevel: 0 529 | index: 6 530 | maxSize: 22 531 | largeTexture: 0 532 | textureSize: 70 533 | textFieldDefault: 534 | textArea: 0 535 | - limitType: 0 536 | min: -0 537 | max: -0 538 | progressBar: 0 539 | iMin: 0 540 | iMax: 0 541 | active: 1 542 | type: Int32 543 | name: level 544 | vectorDrawType: 0 545 | relative: 0 546 | scale: 0 547 | space: 0 548 | labelEnabled: 00000000 549 | label: 550 | - 551 | - 552 | - 553 | - 554 | labelBold: 00000000 555 | buttonEnabled: 00000000000000000000000000000000 556 | buttonText: 557 | - 558 | - 559 | - 560 | - 561 | - 562 | - 563 | - 564 | - 565 | - 566 | - 567 | - 568 | - 569 | - 570 | - 571 | - 572 | - 573 | buttonCallback: 574 | - 575 | - 576 | - 577 | - 578 | - 579 | - 580 | - 581 | - 582 | - 583 | - 584 | - 585 | - 586 | - 587 | - 588 | - 589 | - 590 | buttonCondense: 00000000 591 | numSpace: 0 592 | classType: InspectorPlusTestScript 593 | isArray: 0 594 | offset: {x: 0.5, y: 0.5, z: 0} 595 | QuaternionHandle: 0 596 | canWrite: 1 597 | tooltip: Tooltip 598 | hasTooltip: 0 599 | fixedTip: 0 600 | toggleStart: 0 601 | toggleSize: 0 602 | toggleLevel: 0 603 | index: 7 604 | maxSize: 22 605 | largeTexture: 0 606 | textureSize: 70 607 | textFieldDefault: 608 | textArea: 0 609 | - limitType: 0 610 | min: -0 611 | max: -0 612 | progressBar: 0 613 | iMin: 0 614 | iMax: 0 615 | active: 1 616 | type: Int32 617 | name: myAwesomeInt 618 | vectorDrawType: 0 619 | relative: 0 620 | scale: 0 621 | space: 0 622 | labelEnabled: 00000000 623 | label: 624 | - 625 | - 626 | - 627 | - 628 | labelBold: 00000000 629 | buttonEnabled: 00000000000000000000000000000000 630 | buttonText: 631 | - 632 | - 633 | - 634 | - 635 | - 636 | - 637 | - 638 | - 639 | - 640 | - 641 | - 642 | - 643 | - 644 | - 645 | - 646 | - 647 | buttonCallback: 648 | - 649 | - 650 | - 651 | - 652 | - 653 | - 654 | - 655 | - 656 | - 657 | - 658 | - 659 | - 660 | - 661 | - 662 | - 663 | - 664 | buttonCondense: 00000000 665 | numSpace: 0 666 | classType: InspectorPlusTestScript 667 | isArray: 0 668 | offset: {x: 0.5, y: 0.5, z: 0} 669 | QuaternionHandle: 0 670 | canWrite: 1 671 | tooltip: Tooltip 672 | hasTooltip: 0 673 | fixedTip: 0 674 | toggleStart: 0 675 | toggleSize: 0 676 | toggleLevel: 0 677 | index: 8 678 | maxSize: 22 679 | largeTexture: 0 680 | textureSize: 70 681 | textFieldDefault: 682 | textArea: 0 683 | - limitType: 0 684 | min: -0 685 | max: -0 686 | progressBar: 0 687 | iMin: 0 688 | iMax: 0 689 | active: 1 690 | type: Transform[] 691 | name: myTransforms 692 | vectorDrawType: 0 693 | relative: 0 694 | scale: 0 695 | space: 0 696 | labelEnabled: 00000000 697 | label: 698 | - 699 | - 700 | - 701 | - 702 | labelBold: 00000000 703 | buttonEnabled: 00000000000000000000000000000000 704 | buttonText: 705 | - 706 | - 707 | - 708 | - 709 | - 710 | - 711 | - 712 | - 713 | - 714 | - 715 | - 716 | - 717 | - 718 | - 719 | - 720 | - 721 | buttonCallback: 722 | - 723 | - 724 | - 725 | - 726 | - 727 | - 728 | - 729 | - 730 | - 731 | - 732 | - 733 | - 734 | - 735 | - 736 | - 737 | - 738 | buttonCondense: 00000000 739 | numSpace: 0 740 | classType: InspectorPlusTestScript 741 | isArray: 1 742 | offset: {x: 0.5, y: 0.5, z: 0} 743 | QuaternionHandle: 0 744 | canWrite: 1 745 | tooltip: Tooltip 746 | hasTooltip: 0 747 | fixedTip: 0 748 | toggleStart: 0 749 | toggleSize: 0 750 | toggleLevel: 0 751 | index: 9 752 | maxSize: 22 753 | largeTexture: 0 754 | textureSize: 70 755 | textFieldDefault: 756 | textArea: 0 757 | - limitType: 0 758 | min: -0 759 | max: -0 760 | progressBar: 0 761 | iMin: 0 762 | iMax: 0 763 | active: 1 764 | type: Single 765 | name: dontHideMe 766 | vectorDrawType: 0 767 | relative: 0 768 | scale: 0 769 | space: 0 770 | labelEnabled: 00000000 771 | label: 772 | - 773 | - 774 | - 775 | - 776 | labelBold: 00000000 777 | buttonEnabled: 00000000000000000000000000000000 778 | buttonText: 779 | - 780 | - 781 | - 782 | - 783 | - 784 | - 785 | - 786 | - 787 | - 788 | - 789 | - 790 | - 791 | - 792 | - 793 | - 794 | - 795 | buttonCallback: 796 | - 797 | - 798 | - 799 | - 800 | - 801 | - 802 | - 803 | - 804 | - 805 | - 806 | - 807 | - 808 | - 809 | - 810 | - 811 | - 812 | buttonCondense: 00000000 813 | numSpace: 0 814 | classType: InspectorPlusTestScript 815 | isArray: 0 816 | offset: {x: 0.5, y: 0.5, z: 0} 817 | QuaternionHandle: 0 818 | canWrite: 1 819 | tooltip: This tooltip is a summary 820 | hasTooltip: 1 821 | fixedTip: 1 822 | toggleStart: 0 823 | toggleSize: 0 824 | toggleLevel: 0 825 | index: 10 826 | maxSize: 22 827 | largeTexture: 0 828 | textureSize: 70 829 | textFieldDefault: 830 | textArea: 0 831 | - limitType: 0 832 | min: -0 833 | max: -0 834 | progressBar: 0 835 | iMin: 0 836 | iMax: 0 837 | active: 1 838 | type: String 839 | name: stringTest 840 | vectorDrawType: 0 841 | relative: 0 842 | scale: 0 843 | space: 0 844 | labelEnabled: 00000000 845 | label: 846 | - 847 | - 848 | - 849 | - 850 | labelBold: 00000000 851 | buttonEnabled: 00000000000000000000000000000000 852 | buttonText: 853 | - 854 | - 855 | - 856 | - 857 | - 858 | - 859 | - 860 | - 861 | - 862 | - 863 | - 864 | - 865 | - 866 | - 867 | - 868 | - 869 | buttonCallback: 870 | - 871 | - 872 | - 873 | - 874 | - 875 | - 876 | - 877 | - 878 | - 879 | - 880 | - 881 | - 882 | - 883 | - 884 | - 885 | - 886 | buttonCondense: 00000000 887 | numSpace: 0 888 | classType: InspectorPlusTestScript 889 | isArray: 0 890 | offset: {x: 0.5, y: 0.5, z: 0} 891 | QuaternionHandle: 0 892 | canWrite: 1 893 | tooltip: Tooltip 894 | hasTooltip: 0 895 | fixedTip: 0 896 | toggleStart: 0 897 | toggleSize: 0 898 | toggleLevel: 0 899 | index: 11 900 | maxSize: 22 901 | largeTexture: 0 902 | textureSize: 70 903 | textFieldDefault: 904 | textArea: 0 905 | - limitType: 0 906 | min: -0 907 | max: -0 908 | progressBar: 0 909 | iMin: 0 910 | iMax: 0 911 | active: 1 912 | type: Quaternion 913 | name: rotation 914 | vectorDrawType: 0 915 | relative: 0 916 | scale: 0 917 | space: 0 918 | labelEnabled: 00000000 919 | label: 920 | - 921 | - 922 | - 923 | - 924 | labelBold: 00000000 925 | buttonEnabled: 00000000000000000000000000000000 926 | buttonText: 927 | - 928 | - 929 | - 930 | - 931 | - 932 | - 933 | - 934 | - 935 | - 936 | - 937 | - 938 | - 939 | - 940 | - 941 | - 942 | - 943 | buttonCallback: 944 | - 945 | - 946 | - 947 | - 948 | - 949 | - 950 | - 951 | - 952 | - 953 | - 954 | - 955 | - 956 | - 957 | - 958 | - 959 | - 960 | buttonCondense: 00000000 961 | numSpace: 0 962 | classType: InspectorPlusTestScript 963 | isArray: 0 964 | offset: {x: 0.5, y: 0.5, z: 0} 965 | QuaternionHandle: 0 966 | canWrite: 1 967 | tooltip: Rotation (with handle in scene) 968 | hasTooltip: 1 969 | fixedTip: 1 970 | toggleStart: 0 971 | toggleSize: 0 972 | toggleLevel: 0 973 | index: 12 974 | maxSize: 22 975 | largeTexture: 0 976 | textureSize: 70 977 | textFieldDefault: 978 | textArea: 0 979 | - limitType: 0 980 | min: -0 981 | max: -0 982 | progressBar: 0 983 | iMin: 0 984 | iMax: 0 985 | active: 1 986 | type: Boolean 987 | name: toggleField 988 | vectorDrawType: 0 989 | relative: 0 990 | scale: 0 991 | space: 0 992 | labelEnabled: 00000000 993 | label: 994 | - 995 | - 996 | - 997 | - 998 | labelBold: 00000000 999 | buttonEnabled: 00000000000000000000000000000000 1000 | buttonText: 1001 | - 1002 | - 1003 | - 1004 | - 1005 | - 1006 | - 1007 | - 1008 | - 1009 | - 1010 | - 1011 | - 1012 | - 1013 | - 1014 | - 1015 | - 1016 | - 1017 | buttonCallback: 1018 | - 1019 | - 1020 | - 1021 | - 1022 | - 1023 | - 1024 | - 1025 | - 1026 | - 1027 | - 1028 | - 1029 | - 1030 | - 1031 | - 1032 | - 1033 | - 1034 | buttonCondense: 00000000 1035 | numSpace: 0 1036 | classType: InspectorPlusTestScript 1037 | isArray: 0 1038 | offset: {x: 0.5, y: 0.5, z: 0} 1039 | QuaternionHandle: 0 1040 | canWrite: 1 1041 | tooltip: Tooltip 1042 | hasTooltip: 0 1043 | fixedTip: 0 1044 | toggleStart: 0 1045 | toggleSize: 1 1046 | toggleLevel: 0 1047 | index: 13 1048 | maxSize: 22 1049 | largeTexture: 0 1050 | textureSize: 70 1051 | textFieldDefault: 1052 | textArea: 0 1053 | - limitType: 0 1054 | min: -0 1055 | max: -0 1056 | progressBar: 0 1057 | iMin: 0 1058 | iMax: 0 1059 | active: 1 1060 | type: Boolean 1061 | name: toggle1 1062 | vectorDrawType: 0 1063 | relative: 0 1064 | scale: 0 1065 | space: 0 1066 | labelEnabled: 00000000 1067 | label: 1068 | - 1069 | - 1070 | - 1071 | - 1072 | labelBold: 00000000 1073 | buttonEnabled: 00000000000000000000000000000000 1074 | buttonText: 1075 | - 1076 | - 1077 | - 1078 | - 1079 | - 1080 | - 1081 | - 1082 | - 1083 | - 1084 | - 1085 | - 1086 | - 1087 | - 1088 | - 1089 | - 1090 | - 1091 | buttonCallback: 1092 | - 1093 | - 1094 | - 1095 | - 1096 | - 1097 | - 1098 | - 1099 | - 1100 | - 1101 | - 1102 | - 1103 | - 1104 | - 1105 | - 1106 | - 1107 | - 1108 | buttonCondense: 00000000 1109 | numSpace: 0 1110 | classType: InspectorPlusTestScript 1111 | isArray: 0 1112 | offset: {x: 0.5, y: 0.5, z: 0} 1113 | QuaternionHandle: 0 1114 | canWrite: 1 1115 | tooltip: Tooltip 1116 | hasTooltip: 0 1117 | fixedTip: 0 1118 | toggleStart: 0 1119 | toggleSize: 1 1120 | toggleLevel: 0 1121 | index: 14 1122 | maxSize: 22 1123 | largeTexture: 0 1124 | textureSize: 70 1125 | textFieldDefault: 1126 | textArea: 0 1127 | - limitType: 0 1128 | min: -0 1129 | max: -0 1130 | progressBar: 0 1131 | iMin: 0 1132 | iMax: 0 1133 | active: 1 1134 | type: Single 1135 | name: toggleStr 1136 | vectorDrawType: 0 1137 | relative: 0 1138 | scale: 0 1139 | space: 0 1140 | labelEnabled: 00000000 1141 | label: 1142 | - 1143 | - 1144 | - 1145 | - 1146 | labelBold: 00000000 1147 | buttonEnabled: 00000000000000000000000000000000 1148 | buttonText: 1149 | - 1150 | - 1151 | - 1152 | - 1153 | - 1154 | - 1155 | - 1156 | - 1157 | - 1158 | - 1159 | - 1160 | - 1161 | - 1162 | - 1163 | - 1164 | - 1165 | buttonCallback: 1166 | - 1167 | - 1168 | - 1169 | - 1170 | - 1171 | - 1172 | - 1173 | - 1174 | - 1175 | - 1176 | - 1177 | - 1178 | - 1179 | - 1180 | - 1181 | - 1182 | buttonCondense: 00000000 1183 | numSpace: 0 1184 | classType: InspectorPlusTestScript 1185 | isArray: 0 1186 | offset: {x: 0.5, y: 0.5, z: 0} 1187 | QuaternionHandle: 0 1188 | canWrite: 1 1189 | tooltip: Tooltip 1190 | hasTooltip: 0 1191 | fixedTip: 0 1192 | toggleStart: 0 1193 | toggleSize: 0 1194 | toggleLevel: 0 1195 | index: 15 1196 | maxSize: 22 1197 | largeTexture: 0 1198 | textureSize: 70 1199 | textFieldDefault: 1200 | textArea: 0 1201 | - limitType: 0 1202 | min: -0 1203 | max: -0 1204 | progressBar: 0 1205 | iMin: 0 1206 | iMax: 0 1207 | active: 1 1208 | type: Single 1209 | name: my_ugly_var 1210 | vectorDrawType: 0 1211 | relative: 0 1212 | scale: 0 1213 | space: 0 1214 | labelEnabled: 00000000 1215 | label: 1216 | - 1217 | - 1218 | - 1219 | - 1220 | labelBold: 00000000 1221 | buttonEnabled: 00000000000000000000000000000000 1222 | buttonText: 1223 | - 1224 | - 1225 | - 1226 | - 1227 | - 1228 | - 1229 | - 1230 | - 1231 | - 1232 | - 1233 | - 1234 | - 1235 | - 1236 | - 1237 | - 1238 | - 1239 | buttonCallback: 1240 | - 1241 | - 1242 | - 1243 | - 1244 | - 1245 | - 1246 | - 1247 | - 1248 | - 1249 | - 1250 | - 1251 | - 1252 | - 1253 | - 1254 | - 1255 | - 1256 | buttonCondense: 00000000 1257 | numSpace: 0 1258 | classType: InspectorPlusTestScript 1259 | isArray: 0 1260 | offset: {x: 0.5, y: 0.5, z: 0} 1261 | QuaternionHandle: 0 1262 | canWrite: 1 1263 | tooltip: Tooltip 1264 | hasTooltip: 0 1265 | fixedTip: 0 1266 | toggleStart: 0 1267 | toggleSize: 0 1268 | toggleLevel: 0 1269 | index: 16 1270 | maxSize: 22 1271 | largeTexture: 0 1272 | textureSize: 70 1273 | textFieldDefault: 1274 | textArea: 0 1275 | - limitType: 0 1276 | min: -0 1277 | max: -0 1278 | progressBar: 0 1279 | iMin: 0 1280 | iMax: 0 1281 | active: 1 1282 | type: Texture 1283 | name: myTextureWithLargePreview 1284 | vectorDrawType: 0 1285 | relative: 0 1286 | scale: 0 1287 | space: 0 1288 | labelEnabled: 00000000 1289 | label: 1290 | - 1291 | - 1292 | - 1293 | - 1294 | labelBold: 00000000 1295 | buttonEnabled: 00000000000000000000000000000000 1296 | buttonText: 1297 | - 1298 | - 1299 | - 1300 | - 1301 | - 1302 | - 1303 | - 1304 | - 1305 | - 1306 | - 1307 | - 1308 | - 1309 | - 1310 | - 1311 | - 1312 | - 1313 | buttonCallback: 1314 | - 1315 | - 1316 | - 1317 | - 1318 | - 1319 | - 1320 | - 1321 | - 1322 | - 1323 | - 1324 | - 1325 | - 1326 | - 1327 | - 1328 | - 1329 | - 1330 | buttonCondense: 00000000 1331 | numSpace: 0 1332 | classType: InspectorPlusTestScript 1333 | isArray: 0 1334 | offset: {x: 0.5, y: 0.5, z: 0} 1335 | QuaternionHandle: 0 1336 | canWrite: 1 1337 | tooltip: Tooltip 1338 | hasTooltip: 0 1339 | fixedTip: 0 1340 | toggleStart: 0 1341 | toggleSize: 0 1342 | toggleLevel: 0 1343 | index: 17 1344 | maxSize: 22 1345 | largeTexture: 0 1346 | textureSize: 70 1347 | textFieldDefault: 1348 | textArea: 0 1349 | - limitType: 0 1350 | min: -0 1351 | max: -0 1352 | progressBar: 0 1353 | iMin: 0 1354 | iMax: 0 1355 | active: 1 1356 | type: Texture 1357 | name: textureTest 1358 | vectorDrawType: 0 1359 | relative: 0 1360 | scale: 0 1361 | space: 0 1362 | labelEnabled: 00000000 1363 | label: 1364 | - 1365 | - 1366 | - 1367 | - 1368 | labelBold: 00000000 1369 | buttonEnabled: 00000000000000000000000000000000 1370 | buttonText: 1371 | - 1372 | - 1373 | - 1374 | - 1375 | - 1376 | - 1377 | - 1378 | - 1379 | - 1380 | - 1381 | - 1382 | - 1383 | - 1384 | - 1385 | - 1386 | - 1387 | buttonCallback: 1388 | - 1389 | - 1390 | - 1391 | - 1392 | - 1393 | - 1394 | - 1395 | - 1396 | - 1397 | - 1398 | - 1399 | - 1400 | - 1401 | - 1402 | - 1403 | - 1404 | buttonCondense: 00000000 1405 | numSpace: 0 1406 | classType: InspectorPlusTestScript 1407 | isArray: 0 1408 | offset: {x: 0.5, y: 0.5, z: 0} 1409 | QuaternionHandle: 0 1410 | canWrite: 1 1411 | tooltip: Tooltip 1412 | hasTooltip: 0 1413 | fixedTip: 0 1414 | toggleStart: 0 1415 | toggleSize: 0 1416 | toggleLevel: 0 1417 | index: 18 1418 | maxSize: 22 1419 | largeTexture: 0 1420 | textureSize: 70 1421 | textFieldDefault: 1422 | textArea: 0 1423 | - limitType: 0 1424 | min: -0 1425 | max: -0 1426 | progressBar: 0 1427 | iMin: 0 1428 | iMax: 0 1429 | active: 1 1430 | type: MyTestClass 1431 | name: myTestClass 1432 | vectorDrawType: 0 1433 | relative: 0 1434 | scale: 0 1435 | space: 0 1436 | labelEnabled: 00000000 1437 | label: 1438 | - 1439 | - 1440 | - 1441 | - 1442 | labelBold: 00000000 1443 | buttonEnabled: 00000000000000000000000000000000 1444 | buttonText: 1445 | - 1446 | - 1447 | - 1448 | - 1449 | - 1450 | - 1451 | - 1452 | - 1453 | - 1454 | - 1455 | - 1456 | - 1457 | - 1458 | - 1459 | - 1460 | - 1461 | buttonCallback: 1462 | - 1463 | - 1464 | - 1465 | - 1466 | - 1467 | - 1468 | - 1469 | - 1470 | - 1471 | - 1472 | - 1473 | - 1474 | - 1475 | - 1476 | - 1477 | - 1478 | buttonCondense: 00000000 1479 | numSpace: 0 1480 | classType: InspectorPlusTestScript 1481 | isArray: 0 1482 | offset: {x: 0.5, y: 0.5, z: 0} 1483 | QuaternionHandle: 0 1484 | canWrite: 1 1485 | tooltip: Tooltip 1486 | hasTooltip: 0 1487 | fixedTip: 0 1488 | toggleStart: 0 1489 | toggleSize: 0 1490 | toggleLevel: 0 1491 | index: 19 1492 | maxSize: 22 1493 | largeTexture: 0 1494 | textureSize: 70 1495 | textFieldDefault: 1496 | textArea: 0 1497 | - limitType: 0 1498 | min: -0 1499 | max: -0 1500 | progressBar: 0 1501 | iMin: 0 1502 | iMax: 0 1503 | active: 1 1504 | type: List`1 1505 | name: intList 1506 | vectorDrawType: 0 1507 | relative: 0 1508 | scale: 0 1509 | space: 0 1510 | labelEnabled: 00000000 1511 | label: 1512 | - 1513 | - 1514 | - 1515 | - 1516 | labelBold: 00000000 1517 | buttonEnabled: 00000000000000000000000000000000 1518 | buttonText: 1519 | - 1520 | - 1521 | - 1522 | - 1523 | - 1524 | - 1525 | - 1526 | - 1527 | - 1528 | - 1529 | - 1530 | - 1531 | - 1532 | - 1533 | - 1534 | - 1535 | buttonCallback: 1536 | - 1537 | - 1538 | - 1539 | - 1540 | - 1541 | - 1542 | - 1543 | - 1544 | - 1545 | - 1546 | - 1547 | - 1548 | - 1549 | - 1550 | - 1551 | - 1552 | buttonCondense: 00000000 1553 | numSpace: 0 1554 | classType: InspectorPlusTestScript 1555 | isArray: 0 1556 | offset: {x: 0.5, y: 0.5, z: 0} 1557 | QuaternionHandle: 0 1558 | canWrite: 1 1559 | tooltip: Tooltip 1560 | hasTooltip: 0 1561 | fixedTip: 0 1562 | toggleStart: 0 1563 | toggleSize: 0 1564 | toggleLevel: 0 1565 | index: 20 1566 | maxSize: 22 1567 | largeTexture: 0 1568 | textureSize: 70 1569 | textFieldDefault: 1570 | textArea: 0 1571 | - limitType: 0 1572 | min: -0 1573 | max: -0 1574 | progressBar: 0 1575 | iMin: 0 1576 | iMax: 0 1577 | active: 1 1578 | type: Rect 1579 | name: test 1580 | vectorDrawType: 0 1581 | relative: 0 1582 | scale: 0 1583 | space: 0 1584 | labelEnabled: 00000000 1585 | label: 1586 | - 1587 | - 1588 | - 1589 | - 1590 | labelBold: 00000000 1591 | buttonEnabled: 00000000000000000000000000000000 1592 | buttonText: 1593 | - 1594 | - 1595 | - 1596 | - 1597 | - 1598 | - 1599 | - 1600 | - 1601 | - 1602 | - 1603 | - 1604 | - 1605 | - 1606 | - 1607 | - 1608 | - 1609 | buttonCallback: 1610 | - 1611 | - 1612 | - 1613 | - 1614 | - 1615 | - 1616 | - 1617 | - 1618 | - 1619 | - 1620 | - 1621 | - 1622 | - 1623 | - 1624 | - 1625 | - 1626 | buttonCondense: 00000000 1627 | numSpace: 0 1628 | classType: InspectorPlusTestScript 1629 | isArray: 0 1630 | offset: {x: 0.5, y: 0.5, z: 0} 1631 | QuaternionHandle: 0 1632 | canWrite: 1 1633 | tooltip: Tooltip 1634 | hasTooltip: 0 1635 | fixedTip: 0 1636 | toggleStart: 0 1637 | toggleSize: 0 1638 | toggleLevel: 0 1639 | index: 21 1640 | maxSize: 22 1641 | largeTexture: 0 1642 | textureSize: 70 1643 | textFieldDefault: 1644 | textArea: 0 1645 | VarsProcessed: 1646 | - target 1647 | - lookAtPoint 1648 | - direction 1649 | - screenPos 1650 | - maxSpeed 1651 | - health 1652 | - MyInt 1653 | - level 1654 | - myAwesomeInt 1655 | - myTransforms 1656 | - dontHideMe 1657 | - stringTest 1658 | - rotation 1659 | - toggleField 1660 | - toggle1 1661 | - toggleStr 1662 | - my_ugly_var 1663 | - myTextureWithLargePreview 1664 | - textureTest 1665 | - myTestClass 1666 | - intList 1667 | - test 1668 | IgnoredProperties: [] 1669 | editName: InspectorPlusTestScript 1670 | arrowUp: {fileID: 2800000, guid: 54c6fd2073f9a2849b01a02dfd33cbf3, type: 3} 1671 | arrowDown: {fileID: 2800000, guid: dc97ca9c78ffc114dab68ffa9e5223bd, type: 3} 1672 | -------------------------------------------------------------------------------- /Assets/InspectorPlus/Editor/InspectorPlus.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 33c3e0bac84955049a8195548d6f8b30 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/InspectorPlus/Editor/InspectorPlus.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using System.Collections.Generic; 4 | using System.Reflection; 5 | using System.IO; 6 | 7 | [CustomEditor(typeof(MonoBehaviour), true)] 8 | public class InspectorPlus : Editor { 9 | string m_curName; 10 | string m_dispName; 11 | Rect m_tooltipRect; 12 | 13 | InspectorPlusManager m_manager; 14 | InspectorPlusTracker m_tracker; 15 | List m_vars; 16 | SerializedProperty[] m_properties; 17 | 18 | string AssetPath { 19 | get { return Path.GetDirectoryName(AssetDatabase.GetAssetPath(MonoScript.FromScriptableObject(this))); } 20 | } 21 | 22 | public void OnEnable() { 23 | //TODO: Get manager more efficiently 24 | m_manager = FindObjectOfType(typeof(InspectorPlusManager)) as InspectorPlusManager; 25 | if (m_manager == null) { 26 | m_manager = (InspectorPlusManager) AssetDatabase.LoadAssetAtPath(AssetPath + "/InspectorPlus.asset", 27 | typeof(InspectorPlusManager)); 28 | } 29 | 30 | m_tracker = m_manager.GetTracker(target.GetType().Name); 31 | 32 | if (m_tracker != null) { 33 | List vars = m_tracker.GetVars(); 34 | 35 | int count = vars.Count; 36 | m_properties = new SerializedProperty[count]; 37 | } 38 | } 39 | 40 | void ProgressBar(float value, string label) { 41 | GUILayout.Space(3.0f); 42 | Rect rect = GUILayoutUtility.GetRect(18, 18, "TextField"); 43 | EditorGUI.ProgressBar(rect, value, label); 44 | GUILayout.Space(3.0f); 45 | } 46 | 47 | void PropertyField(SerializedProperty sp, string propName) { 48 | if (sp.hasChildren) { 49 | 50 | GUILayout.BeginVertical(); 51 | while (true) { 52 | if (sp.propertyPath != propName && !sp.propertyPath.StartsWith(propName + ".")) { 53 | break; 54 | } 55 | 56 | EditorGUI.indentLevel = sp.depth; 57 | 58 | bool child = sp.depth == 0 59 | ? EditorGUILayout.PropertyField(sp, new GUIContent(m_dispName)) 60 | : EditorGUILayout.PropertyField(sp); 61 | 62 | if (!sp.NextVisible(child)) { 63 | break; 64 | } 65 | } 66 | EditorGUI.indentLevel = 0; 67 | GUILayout.EndVertical(); 68 | } 69 | else { 70 | EditorGUILayout.PropertyField(sp, new GUIContent(m_dispName)); 71 | } 72 | } 73 | 74 | void ArrayGUI(SerializedProperty sp, string name) { 75 | GUILayout.Space(4.0f); 76 | EditorGUILayout.BeginVertical("box", GUILayout.MaxWidth(Screen.width)); 77 | 78 | int i = 0; 79 | int del = -1; 80 | 81 | SerializedProperty array = sp.Copy(); 82 | SerializedProperty size = null; 83 | bool first = true; 84 | 85 | while (true) { 86 | if (sp.propertyPath != name && !sp.propertyPath.StartsWith(name + ".")) { 87 | break; 88 | } 89 | 90 | bool child; 91 | EditorGUI.indentLevel = sp.depth; 92 | 93 | if (sp.depth == 1 && !first) { 94 | EditorGUILayout.BeginHorizontal(); 95 | 96 | if (GUILayout.Button("", "OL Minus", GUILayout.Width(24.0f))) { 97 | del = i; 98 | } 99 | 100 | child = EditorGUILayout.PropertyField(sp); 101 | 102 | GUI.enabled = i > 0; 103 | if (GUILayout.Button(m_manager.arrowUp, "ButtonLeft", GUILayout.Width(22.0f), GUILayout.Height(18.0f))) { 104 | array.MoveArrayElement(i - 1, i); 105 | } 106 | 107 | GUI.enabled = i < array.arraySize - 1; 108 | if (GUILayout.Button(m_manager.arrowDown, "ButtonRight", GUILayout.Width(22.0f), GUILayout.Height(18.0f))) { 109 | array.MoveArrayElement(i + 1, i); 110 | } 111 | 112 | ++i; 113 | 114 | GUI.enabled = true; 115 | EditorGUILayout.EndHorizontal(); 116 | } 117 | else if (sp.depth == 1) { 118 | first = false; 119 | size = sp.Copy(); 120 | 121 | EditorGUILayout.BeginHorizontal(); 122 | 123 | if (!size.hasMultipleDifferentValues && GUILayout.Button("", "OL Plus", GUILayout.Width(24.0f))) { 124 | array.arraySize += 1; 125 | } 126 | 127 | child = EditorGUILayout.PropertyField(sp); 128 | EditorGUILayout.EndHorizontal(); 129 | } 130 | else { 131 | child = EditorGUILayout.PropertyField(sp); 132 | } 133 | 134 | if (!sp.NextVisible(child)) { 135 | break; 136 | } 137 | } 138 | 139 | sp.Reset(); 140 | 141 | if (del != -1) { 142 | array.DeleteArrayElementAtIndex(del); 143 | } 144 | 145 | if (array.isExpanded && !size.hasMultipleDifferentValues) { 146 | EditorGUILayout.BeginHorizontal(); 147 | 148 | if (GUILayout.Button("", "OL Plus", GUILayout.Width(24.0f))) 149 | array.arraySize += 1; 150 | 151 | if (array.arraySize > 0) { 152 | GUI.enabled = false; 153 | EditorGUILayout.PropertyField(array.GetArrayElementAtIndex(array.arraySize - 1), 154 | new GUIContent("" + array.arraySize)); 155 | GUI.enabled = true; 156 | } 157 | 158 | EditorGUILayout.EndHorizontal(); 159 | } 160 | 161 | EditorGUI.indentLevel = 0; 162 | EditorGUILayout.EndVertical(); 163 | } 164 | 165 | void RefreshVars() { 166 | m_vars = m_tracker.GetVars(); 167 | int count = m_vars.Count; 168 | 169 | if (count != m_properties.Length) { 170 | m_properties = new SerializedProperty[count]; 171 | } 172 | 173 | for (int i = 0; i < count; i += 1) { 174 | InspectorPlusVar v = m_vars[i]; 175 | m_properties[i] = serializedObject.FindProperty(v.name); 176 | } 177 | } 178 | 179 | void Vector2Field(SerializedProperty sp) { 180 | EditorGUI.BeginProperty(new Rect(0.0f, 0.0f, 0.0f, 0.0f), new GUIContent(), sp); 181 | EditorGUI.BeginChangeCheck(); 182 | var newValue = EditorGUILayout.Vector2Field(m_dispName, sp.vector2Value); 183 | 184 | if (EditorGUI.EndChangeCheck()) { 185 | sp.vector2Value = newValue; 186 | } 187 | 188 | EditorGUI.EndProperty(); 189 | } 190 | 191 | void FloatField(SerializedProperty sp, InspectorPlusVar v) { 192 | //TODO: Use begin property 193 | if (v.limitType == InspectorPlusVar.LimitType.Min && !sp.hasMultipleDifferentValues) { 194 | sp.floatValue = Mathf.Max(v.min, sp.floatValue); 195 | } else if (v.limitType == InspectorPlusVar.LimitType.Max && !sp.hasMultipleDifferentValues) { 196 | sp.floatValue = Mathf.Min(v.max, sp.floatValue); 197 | } 198 | 199 | if (v.limitType == InspectorPlusVar.LimitType.Range) { 200 | if (!v.progressBar) { 201 | EditorGUILayout.Slider(sp, v.min, v.max); 202 | } 203 | else { 204 | if (!sp.hasMultipleDifferentValues) { 205 | sp.floatValue = Mathf.Clamp(sp.floatValue, v.min, v.max); 206 | ProgressBar((sp.floatValue - v.min) / v.max, m_dispName); 207 | } 208 | else { 209 | ProgressBar((sp.floatValue - v.min) / v.max, m_dispName); 210 | } 211 | } 212 | } 213 | else { 214 | EditorGUILayout.PropertyField(sp, new GUIContent(m_dispName)); 215 | } 216 | } 217 | 218 | void IntField(SerializedProperty sp, InspectorPlusVar v) { 219 | if (v.limitType == InspectorPlusVar.LimitType.Min && !sp.hasMultipleDifferentValues) { 220 | sp.intValue = Mathf.Max(v.iMin, sp.intValue); 221 | } 222 | else if (v.limitType == InspectorPlusVar.LimitType.Max && !sp.hasMultipleDifferentValues) { 223 | sp.intValue = Mathf.Min(v.iMax, sp.intValue); 224 | } 225 | 226 | if (v.limitType == InspectorPlusVar.LimitType.Range) { 227 | if (!v.progressBar) { 228 | EditorGUI.BeginProperty(new Rect(0.0f, 0.0f, 0.0f, 0.0f), new GUIContent(), sp); 229 | EditorGUI.BeginChangeCheck(); 230 | 231 | var newValue = EditorGUI.IntSlider(GUILayoutUtility.GetRect(18.0f, 18.0f), new GUIContent(m_dispName), sp.intValue, 232 | v.iMin, v.iMax); 233 | 234 | if (EditorGUI.EndChangeCheck()) { 235 | sp.intValue = newValue; 236 | } 237 | 238 | EditorGUI.EndProperty(); 239 | } 240 | else { 241 | if (!sp.hasMultipleDifferentValues) { 242 | sp.intValue = Mathf.Clamp(sp.intValue, v.iMin, v.iMax); 243 | ProgressBar((float) (sp.intValue - v.iMin) / v.iMax, m_dispName); 244 | } 245 | else { 246 | ProgressBar((float) (sp.intValue - v.iMin) / v.iMax, m_dispName); 247 | } 248 | } 249 | } 250 | else { 251 | EditorGUILayout.PropertyField(sp, new GUIContent(m_dispName)); 252 | } 253 | } 254 | 255 | void QuaternionField(SerializedProperty sp) { 256 | EditorGUI.BeginProperty(new Rect(0.0f, 0.0f, 0.0f, 0.0f), new GUIContent(), sp); 257 | 258 | EditorGUI.BeginChangeCheck(); 259 | SerializedProperty x = sp.FindPropertyRelative("x"); 260 | SerializedProperty y = sp.FindPropertyRelative("y"); 261 | SerializedProperty z = sp.FindPropertyRelative("z"); 262 | SerializedProperty w = sp.FindPropertyRelative("w"); 263 | 264 | var q = new Quaternion(x.floatValue, y.floatValue, z.floatValue, w.floatValue); 265 | 266 | var newValue = EditorGUILayout.Vector3Field(m_dispName, q.eulerAngles); 267 | 268 | if (EditorGUI.EndChangeCheck()) { 269 | Quaternion r = Quaternion.Euler(newValue); 270 | x.floatValue = r.x; 271 | y.floatValue = r.y; 272 | z.floatValue = r.z; 273 | w.floatValue = r.w; 274 | } 275 | 276 | EditorGUI.EndProperty(); 277 | } 278 | 279 | int BoolField(SerializedProperty sp, InspectorPlusVar v) { 280 | if (v.toggleStart) { 281 | EditorGUI.BeginProperty(new Rect(0.0f, 0.0f, 0.0f, 0.0f), new GUIContent(), sp); 282 | 283 | EditorGUI.BeginChangeCheck(); 284 | var newValue = EditorGUILayout.Toggle(m_dispName, sp.boolValue); 285 | 286 | if (EditorGUI.EndChangeCheck()) { 287 | sp.boolValue = newValue; 288 | } 289 | 290 | EditorGUI.EndProperty(); 291 | 292 | if (!sp.boolValue) { 293 | return v.toggleSize; 294 | } 295 | } 296 | else { 297 | EditorGUILayout.PropertyField(sp, new GUIContent(m_dispName)); 298 | } 299 | 300 | return 0; 301 | } 302 | 303 | void TextureGUI(SerializedProperty sp, InspectorPlusVar v) { 304 | if (!v.largeTexture) { 305 | PropertyField(sp, m_curName); 306 | } else { 307 | EditorGUI.BeginProperty(new Rect(0.0f, 0.0f, 0.0f, 0.0f), new GUIContent(), sp); 308 | 309 | EditorGUI.BeginChangeCheck(); 310 | GUILayout.BeginHorizontal(); 311 | EditorGUILayout.PrefixLabel(m_dispName); 312 | var newValue = EditorGUILayout.ObjectField(sp.objectReferenceValue, typeof(Texture2D), false, 313 | GUILayout.Width(v.textureSize), GUILayout.Height(v.textureSize)); 314 | GUILayout.FlexibleSpace(); 315 | GUILayout.EndHorizontal(); 316 | 317 | if (EditorGUI.EndChangeCheck()) { 318 | sp.objectReferenceValue = newValue; 319 | } 320 | 321 | EditorGUI.EndProperty(); 322 | } 323 | } 324 | 325 | void TextGUI(SerializedProperty sp, InspectorPlusVar v) { 326 | if (v.textFieldDefault == "") { 327 | PropertyField(sp, m_curName); 328 | return; 329 | } 330 | 331 | string focusName = "_focusTextField" + v.name; 332 | 333 | GUI.SetNextControlName(focusName); 334 | 335 | EditorGUI.BeginProperty(new Rect(0.0f, 0.0f, 0.0f, 0.0f), new GUIContent(), sp); 336 | 337 | EditorGUI.BeginChangeCheck(); 338 | 339 | GUILayout.BeginHorizontal(); 340 | EditorGUILayout.PrefixLabel(m_dispName); 341 | 342 | string newValue = !v.textArea 343 | ? EditorGUILayout.TextField("", sp.stringValue, GUILayout.Width(Screen.width)) 344 | : EditorGUILayout.TextArea(sp.stringValue, GUILayout.Width(Screen.width)); 345 | 346 | if (GUI.GetNameOfFocusedControl() != focusName && !sp.hasMultipleDifferentValues && sp.stringValue == "") { 347 | GUI.color = new Color(0.7f, 0.7f, 0.7f); 348 | GUI.Label(GUILayoutUtility.GetLastRect(), v.textFieldDefault); 349 | GUI.color = Color.white; 350 | } 351 | 352 | GUILayout.FlexibleSpace(); 353 | GUILayout.EndHorizontal(); 354 | 355 | if (EditorGUI.EndChangeCheck()) { 356 | sp.stringValue = newValue; 357 | } 358 | 359 | EditorGUI.EndProperty(); 360 | } 361 | 362 | public override void OnInspectorGUI() { 363 | if (m_tracker == null) { 364 | DrawDefaultInspector(); 365 | return; 366 | } 367 | 368 | m_tracker.UpdateFields(); 369 | 370 | serializedObject.Update(); 371 | RefreshVars(); 372 | 373 | for (int i = 0; i < m_properties.Length; ++i) { 374 | InspectorPlusVar v = m_vars[i]; 375 | SerializedProperty prop = m_properties[i]; 376 | DrawProperty(v, prop, ref i); 377 | } 378 | 379 | if (!string.IsNullOrEmpty(GUI.tooltip)) { 380 | GUI.color = new Color(1.0f, 1.0f, 1.0f, 1.0f); 381 | GUI.Box(m_tooltipRect, new GUIContent()); 382 | EditorGUI.HelpBox(m_tooltipRect, GUI.tooltip, MessageType.Info); 383 | Repaint(); 384 | } 385 | 386 | GUI.tooltip = ""; 387 | 388 | serializedObject.ApplyModifiedProperties(); 389 | } 390 | 391 | int DrawProperty(InspectorPlusVar v, SerializedProperty prop, ref int i) { 392 | if (v.active && prop != null) { 393 | SerializedProperty sp = prop; 394 | string s = v.type; 395 | m_curName = v.name; 396 | m_dispName = v.dispName; 397 | 398 | GUI.enabled = v.canWrite; 399 | 400 | GUILayout.BeginHorizontal(); 401 | 402 | if (v.toggleLevel != 0) { 403 | GUILayout.Space(v.toggleLevel * 10.0f); 404 | } 405 | 406 | //TODO: This doesn't seem efficient? 407 | if (s == typeof(Vector2).Name) { 408 | Vector2Field(sp); 409 | } 410 | else if (s == typeof(float).Name) { 411 | FloatField(sp, v); 412 | } 413 | else if (s == typeof(int).Name) { 414 | IntField(sp, v); 415 | } 416 | else if (s == typeof(Quaternion).Name) { 417 | QuaternionField(sp); 418 | } 419 | else if (s == typeof(bool).Name) { 420 | i += BoolField(sp, v); 421 | } 422 | else if (s == typeof(Texture2D).Name || s == typeof(Texture).Name) { 423 | TextureGUI(sp, v); 424 | } 425 | else if (s == typeof(string).Name) { 426 | TextGUI(sp, v); 427 | } 428 | else if (sp.isArray) { 429 | ArrayGUI(sp, m_curName); 430 | } 431 | else { 432 | PropertyField(sp, m_curName); 433 | } 434 | 435 | GUILayout.EndHorizontal(); 436 | GUI.enabled = true; 437 | 438 | if (v.hasTooltip) { 439 | Rect last = GUILayoutUtility.GetLastRect(); 440 | GUI.Label(last, new GUIContent("", v.tooltip)); 441 | 442 | Vector2 size = new GUIStyle().CalcSize(new GUIContent(GUI.tooltip)); 443 | m_tooltipRect = new Rect(Event.current.mousePosition.x + 4.0f, Event.current.mousePosition.y + 12.0f, 28.0f + size.x, 444 | 9.0f + size.y); 445 | 446 | if (m_tooltipRect.width > 250.0f) { 447 | float delt = (m_tooltipRect.width - 250.0f); 448 | m_tooltipRect.width -= delt; 449 | m_tooltipRect.height += size.y * Mathf.CeilToInt(delt / 250.0f); 450 | } 451 | } 452 | } 453 | 454 | if (v.space == 0.0f) { 455 | return i; 456 | } 457 | 458 | float usedSpace = 0.0f; 459 | for (int j = 0; j < v.numSpace; j += 1) { 460 | bool buttonLine = false; 461 | for (int k = 0; k < 4; k += 1) { 462 | if (v.buttonEnabled[j * 4 + k]) { 463 | buttonLine = true; 464 | } 465 | } 466 | 467 | if (v.labelEnabled[j] || buttonLine) { 468 | usedSpace += 18.0f; 469 | } 470 | } 471 | 472 | if (v.space == 0.0f) { 473 | return i; 474 | } 475 | 476 | float space = Mathf.Max(0.0f, (v.space - usedSpace) / 2.0f); 477 | 478 | for (int j = 0; j < v.numSpace; ++j) { 479 | bool buttonLine = false; 480 | for (int k = 0; k < 4; k += 1) { 481 | if (v.buttonEnabled[j * 4 + k]) { 482 | buttonLine = true; 483 | } 484 | } 485 | 486 | if (v.labelEnabled[j] || buttonLine) { 487 | GUILayout.BeginHorizontal(); 488 | 489 | if (v.labelEnabled[j]) { 490 | GUILayout.Label(v.label[j], v.labelBold[j] ? EditorStyles.boldLabel : EditorStyles.label); 491 | } 492 | 493 | bool alignRight = v.labelEnabled[j] && buttonLine; 494 | 495 | if (!alignRight) { 496 | GUILayout.EndHorizontal(); 497 | GUILayout.BeginHorizontal(); 498 | } 499 | 500 | GUILayout.FlexibleSpace(); 501 | for (int k = 0; k < 4; k += 1) { 502 | if (v.buttonEnabled[j * 4 + k]) { 503 | if (!v.buttonCondense[j] && !alignRight) { 504 | GUILayout.FlexibleSpace(); 505 | } 506 | 507 | string style = "Button"; 508 | if (v.buttonCondense[j]) { 509 | bool hasLeft = false; 510 | bool hasRight = false; 511 | for (int p = k - 1; p >= 0; p -= 1) { 512 | if (v.buttonEnabled[j * 4 + p]) { 513 | hasLeft = true; 514 | } 515 | } 516 | for (int p = k + 1; p < 4; p += 1) { 517 | if (v.buttonEnabled[j * 4 + p]) { 518 | hasRight = true; 519 | } 520 | } 521 | 522 | if (!hasLeft && hasRight) { 523 | style = "ButtonLeft"; 524 | } 525 | else if (hasLeft && hasRight) { 526 | style = "ButtonMid"; 527 | } 528 | else if (hasLeft && !hasRight) { 529 | style = "ButtonRight"; 530 | } 531 | else if (!hasLeft && !hasRight) { 532 | style = "Button"; 533 | } 534 | } 535 | 536 | if (GUILayout.Button(v.buttonText[j * 4 + k], style, GUILayout.MinWidth(60.0f))) { 537 | foreach (object t in targets) { 538 | MethodInfo m = t.GetType().GetMethod(v.buttonCallback[j * 4 + k], 539 | BindingFlags.Public | BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.NonPublic); 540 | 541 | if (m != null) { 542 | m.Invoke(target, null); 543 | } 544 | } 545 | } 546 | 547 | if (!v.buttonCondense[j] && !alignRight) { 548 | GUILayout.FlexibleSpace(); 549 | } 550 | } 551 | } 552 | 553 | GUILayout.Space(4.0f); 554 | 555 | if (!(v.labelEnabled[j] && buttonLine)) { 556 | GUILayout.FlexibleSpace(); 557 | } 558 | 559 | GUILayout.EndHorizontal(); 560 | } 561 | 562 | if (j < v.numSpace - 1) { 563 | GUILayout.Space(space / v.numSpace); 564 | } 565 | } 566 | return i; 567 | } 568 | 569 | object GetTargetField(string fieldName) { 570 | return target.GetType().GetField(fieldName).GetValue(target); 571 | } 572 | 573 | void SetTargetField(string fieldName, object value) { 574 | target.GetType().GetField(fieldName).SetValue(target, value); 575 | } 576 | 577 | void VectorOnSceneGUI(InspectorPlusVar v, string s, Transform t) { 578 | Vector3 val; 579 | 580 | if (s == typeof(Vector3).Name) { 581 | val = (Vector3) GetTargetField(m_curName); 582 | } 583 | else { 584 | val = ((Vector2) GetTargetField(m_curName)); 585 | } 586 | 587 | Vector3 newVal = Vector3.zero; 588 | Vector3 curVal; 589 | bool setVal = false; 590 | bool relative = v.relative; 591 | bool scale = v.scale; 592 | 593 | switch (v.vectorDrawType) { 594 | case InspectorPlusVar.VectorDrawType.Direction: 595 | curVal = relative ? val : val - t.position; 596 | float size = scale ? Mathf.Min(2.0f, Mathf.Sqrt(curVal.magnitude) / 2.0f) : 1.0f; 597 | size *= HandleUtility.GetHandleSize(t.position); 598 | 599 | if (val.magnitude > 0) { 600 | Handles.ArrowHandleCap(0, t.position, 601 | curVal != Vector3.zero ? Quaternion.LookRotation(val.normalized) : Quaternion.identity, size, Event.current.type); 602 | } 603 | 604 | break; 605 | 606 | case InspectorPlusVar.VectorDrawType.Point: 607 | curVal = relative ? val : t.position + val; 608 | Handles.SphereHandleCap(0, curVal, Quaternion.identity, 0.1f, Event.current.type); 609 | break; 610 | 611 | case InspectorPlusVar.VectorDrawType.PositionHandle: 612 | curVal = relative ? t.position + val : val; 613 | setVal = true; 614 | newVal = Handles.PositionHandle(curVal, Quaternion.identity) - (relative ? t.position : Vector3.zero); 615 | break; 616 | 617 | case InspectorPlusVar.VectorDrawType.Scale: 618 | setVal = true; 619 | curVal = relative ? t.localScale + val : val; 620 | newVal = Handles.ScaleHandle(curVal, t.position + v.offset, t.rotation, 621 | HandleUtility.GetHandleSize(t.position + v.offset)) - (relative ? t.localScale : Vector3.zero); 622 | break; 623 | 624 | case InspectorPlusVar.VectorDrawType.Rotation: 625 | setVal = true; 626 | curVal = relative ? val + t.rotation.eulerAngles : val; 627 | newVal = Handles.RotationHandle(Quaternion.Euler(curVal), t.position + v.offset).eulerAngles - 628 | (relative ? t.rotation.eulerAngles : Vector3.zero); 629 | break; 630 | } 631 | 632 | if (setVal) { 633 | object newObjectVal = newVal; 634 | 635 | if (s == typeof(Vector2).Name) { 636 | newObjectVal = (Vector2) newVal; 637 | } 638 | else if (s == typeof(Quaternion).Name) { 639 | newObjectVal = Quaternion.Euler(newVal); 640 | } 641 | 642 | SetTargetField(m_curName, newObjectVal); 643 | } 644 | } 645 | 646 | void QuaternionOnSceneGUI(Transform t, Vector3 offset) { 647 | var val = (Quaternion) GetTargetField(m_curName); 648 | SetTargetField(m_curName, Handles.RotationHandle(val, t.position + offset)); 649 | } 650 | 651 | //some magic to draw the handles 652 | public void OnSceneGUI() { 653 | if (m_tracker == null) { 654 | return; 655 | } 656 | 657 | Transform t = ((MonoBehaviour) target).transform; 658 | 659 | foreach (InspectorPlusVar v in m_tracker.GetVars()) { 660 | if (!v.active) { 661 | continue; 662 | } 663 | 664 | string s = v.type; 665 | m_curName = v.name; 666 | 667 | if (s == typeof(Vector3).Name || s == typeof(Vector2).Name) { 668 | VectorOnSceneGUI(v, s, t); 669 | } else if (s == typeof(Quaternion).Name && v.QuaternionHandle) { 670 | QuaternionOnSceneGUI(t, v.offset); 671 | } 672 | } 673 | } 674 | } -------------------------------------------------------------------------------- /Assets/InspectorPlus/Editor/InspectorPlus.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 25a19c9e2d57b664d9c5975173af9184 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/InspectorPlus/Editor/InspectorPlusFiler.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.IO; 3 | using UnityEditor; 4 | using System; 5 | 6 | public class InspectorPlusFiler { 7 | string writeString; 8 | SerializedObject so; 9 | string name; 10 | InspectorPlusTracker tracker; 11 | string fileName; 12 | 13 | string BuildArgs(params object[] args) { 14 | string ret = ""; 15 | 16 | if (args.Length == 0) 17 | return ""; 18 | 19 | foreach (object s in args) { 20 | if (s == null) 21 | continue; 22 | 23 | string add = s.ToString(); 24 | 25 | if (s.GetType() == typeof(string)) { 26 | add = add.Replace("\"", "\\\""); 27 | add = "\"" + add + "\""; 28 | } 29 | 30 | if (s.GetType() == typeof(Vector3)) { 31 | Vector3 val = (Vector3) s; 32 | add = "new Vector3(" + val.x + "f," + val.y + "f," + val.z + "f)"; 33 | } 34 | 35 | if (s.GetType() == typeof(InspectorPlusVar.LimitType)) 36 | add = "InspectorPlusVar.LimitType." + add; 37 | 38 | if (s.GetType() == typeof(InspectorPlusVar.VectorDrawType)) 39 | add = "InspectorPlusVar.VectorDrawType." + add; 40 | 41 | if (s.GetType().IsArray) { 42 | Array arr = s as Array; 43 | add = "new " + add + "{"; 44 | for (int i = 0; i < ((Array) s).Length; i += 1) { 45 | add += BuildArgs(arr.GetValue(i)); 46 | if (i + 1 < ((Array) s).Length) 47 | add += ","; 48 | } 49 | add += "}"; 50 | } 51 | 52 | ret += "," + add; 53 | } 54 | 55 | return ret.Substring(1); 56 | } 57 | 58 | string BuildVar(InspectorPlusVar v) { 59 | return @" 60 | vars.Add(new InspectorPlusVar(" + BuildArgs(v.limitType, v.min, v.max, v.progressBar, v.iMin, v.iMax, v.active, 61 | v.type, v.name, v.dispName, v.vectorDrawType, v.relative, v.scale, 62 | v.space, v.labelEnabled, v.label, v.labelBold, v.buttonEnabled, v.buttonText, 63 | v.buttonCallback, v.buttonCondense, v.numSpace, v.classType, 64 | v.offset, v.QuaternionHandle, v.canWrite, v.tooltip, v.hasTooltip, v.toggleStart, v.toggleSize, v.toggleLevel, 65 | v.largeTexture, v.textureSize, v.textFieldDefault, v.textArea) + "));"; 66 | } 67 | 68 | string BuildVars() { 69 | string ret = ""; 70 | foreach (InspectorPlusVar v in tracker.GetVars()) { 71 | ret += BuildVar(v); 72 | } 73 | return ret; 74 | } 75 | 76 | bool hasInspector; 77 | bool hasFloat; 78 | bool hasInt; 79 | bool hasProgressBar; 80 | bool hasArray; 81 | bool hasVector2; 82 | bool hasQuaternion; 83 | bool hasBool; 84 | bool hasScene; 85 | bool hasVectorScene; 86 | bool hasQuaternionScene; 87 | bool hasSpace; 88 | bool hasTooltip; 89 | bool hasTexture; 90 | bool hasText; 91 | 92 | void CheckExists() { 93 | hasInspector = false; 94 | hasFloat = false; 95 | hasInt = false; 96 | hasProgressBar = false; 97 | hasArray = false; 98 | hasVector2 = false; 99 | hasQuaternion = false; 100 | hasBool = false; 101 | 102 | hasScene = false; 103 | hasVectorScene = false; 104 | hasQuaternionScene = false; 105 | 106 | hasSpace = false; 107 | hasTooltip = false; 108 | 109 | foreach (InspectorPlusVar v in tracker.GetVars()) { 110 | if (!v.active) { 111 | continue; 112 | } 113 | hasInspector = true; 114 | if (v.type == typeof(float).Name) { 115 | hasFloat = true; 116 | } 117 | else if (v.type == typeof(int).Name) { 118 | hasInt = true; 119 | } 120 | if (hasFloat || hasInt) { 121 | hasProgressBar = true; 122 | } 123 | 124 | if (v.isArray) { 125 | hasArray = true; 126 | } 127 | 128 | if (v.type == typeof(Vector2).Name) { 129 | hasVector2 = true; 130 | } 131 | else if (v.type == typeof(Quaternion).Name) { 132 | hasQuaternion = true; 133 | } 134 | else if (v.type == typeof(bool).Name) { 135 | hasBool = true; 136 | } 137 | 138 | if (v.vectorDrawType != InspectorPlusVar.VectorDrawType.None || v.QuaternionHandle) { 139 | hasScene = true; 140 | } 141 | if (v.vectorDrawType != InspectorPlusVar.VectorDrawType.None) { 142 | hasVectorScene = true; 143 | } 144 | if (v.QuaternionHandle) { 145 | hasQuaternionScene = true; 146 | } 147 | if (v.hasTooltip) { 148 | hasTooltip = true; 149 | } 150 | if (v.space != 0.0f) { 151 | hasSpace = true; 152 | } 153 | if (v.largeTexture) { 154 | hasTexture = true; 155 | } 156 | if (v.textFieldDefault != "" || v.textArea == true) { 157 | hasText = true; 158 | } 159 | } 160 | } 161 | 162 | void Write() { 163 | CheckExists(); 164 | InspectorPlusFilerStrings s = new InspectorPlusFilerStrings(name, name + "Inspector", hasInspector); 165 | writeString += s.header; 166 | if (hasInspector || hasScene) { 167 | writeString += s.inspectorPlusVar; 168 | writeString += s.vars; 169 | writeString += BuildVars(); 170 | writeString += s.onEnable; 171 | if (hasProgressBar) { 172 | writeString += s.progressBar; 173 | } 174 | if (hasArray) { 175 | writeString += s.arrayGUI; 176 | } 177 | if (hasVector2) { 178 | writeString += s.vector2Field; 179 | } 180 | if (hasFloat) { 181 | writeString += s.floatField; 182 | } 183 | if (hasInt) { 184 | writeString += s.intField; 185 | } 186 | if (hasQuaternion) { 187 | writeString += s.quaternionField; 188 | } 189 | if (hasBool) { 190 | writeString += s.boolField; 191 | } 192 | if (hasTexture) { 193 | writeString += s.textureGUI; 194 | } 195 | if (hasText) { 196 | writeString += s.textGUI; 197 | } 198 | /*if (hasProperty)*/ 199 | writeString += s.propertyField; 200 | if (hasInspector) { 201 | writeString += s.GetOnGUI(hasFloat, hasInt, hasProgressBar, hasArray, hasVector2, hasQuaternion, hasBool, 202 | hasTooltip, hasSpace, hasTexture, hasText); 203 | } 204 | if (hasInspector) { 205 | writeString += s.watermark; 206 | } 207 | if (hasVectorScene) { 208 | writeString += s.vectorScene; 209 | } 210 | if (hasQuaternionScene) { 211 | writeString += s.quaternionScene; 212 | } 213 | if (hasScene) { 214 | writeString += s.GetSceneString(hasScene, hasVectorScene, hasQuaternionScene); 215 | } 216 | } 217 | else { 218 | writeString += @" 219 | public override void OnInspectorGUI (){}"; 220 | } 221 | 222 | writeString += @" 223 | }"; 224 | } 225 | 226 | public void WriteToFile(string _name, InspectorPlusTracker _tracker, string folder) { 227 | _tracker.UpdateFields(); 228 | name = _name; 229 | fileName = name + "Inspector"; 230 | tracker = _tracker; 231 | writeString = ""; 232 | Write(); 233 | 234 | writeString = writeString.Trim(); 235 | 236 | 237 | if (!Directory.Exists(Application.dataPath + "/" + folder + "/")) { 238 | Directory.CreateDirectory(Application.dataPath + "/" + folder + "/"); 239 | } 240 | 241 | File.WriteAllText(Application.dataPath + "/" + folder + "/" + fileName + ".cs", writeString); 242 | } 243 | } -------------------------------------------------------------------------------- /Assets/InspectorPlus/Editor/InspectorPlusFiler.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fcd0638a9b7c99e4fbb3a437451793a4 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/InspectorPlus/Editor/InspectorPlusFilerStrings.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using UnityEngine; 3 | using System.Collections; 4 | 5 | public class InspectorPlusFilerStrings { 6 | static string q = "\""; 7 | 8 | static string Quot(string toQuout) { 9 | return q + toQuout + q; 10 | } 11 | 12 | public string header; 13 | 14 | #region inspectorPlusVar 15 | 16 | public string inspectorPlusVar = @" 17 | public class InspectorPlusVar 18 | { 19 | public enum LimitType { None, Max, Min, Range }; 20 | public enum VectorDrawType { None, Direction, Point, PositionHandle, Scale, Rotation }; 21 | public LimitType limitType = LimitType.None; 22 | public float min = -0.0f; 23 | public float max = -0.0f; 24 | public bool progressBar; 25 | public int iMin = -0; 26 | public int iMax = -0; 27 | public bool active = true; 28 | public string type; 29 | public string name; 30 | public string dispName; 31 | public VectorDrawType vectorDrawType; 32 | public bool relative = false; 33 | public bool scale = false; 34 | public float space = 0.0f; 35 | public bool[] labelEnabled = new bool[4]; 36 | public string[] label = new string[4]; 37 | public bool[] labelBold = new bool[4]; 38 | public bool[] labelItalic = new bool[4]; 39 | public int[] labelAlign = new int[4]; 40 | public bool[] buttonEnabled = new bool[16]; 41 | public string[] buttonText = new string[16]; 42 | public string[] buttonCallback = new string[16]; 43 | public bool[] buttonCondense = new bool[4]; 44 | 45 | public int numSpace = 0; 46 | public string classType; 47 | public Vector3 offset = new Vector3(0.5f, 0.5f); 48 | public bool QuaternionHandle; 49 | public bool canWrite = true; 50 | public string tooltip; 51 | public bool hasTooltip = false; 52 | public bool toggleStart = false; 53 | public int toggleSize = 0; 54 | public int toggleLevel = 0; 55 | public bool largeTexture; 56 | public float textureSize; 57 | 58 | public string textFieldDefault; 59 | public bool textArea; 60 | 61 | public InspectorPlusVar(LimitType _limitType, float _min, float _max, bool _progressBar, int _iMin, int _iMax, bool _active, string _type, string _name, string _dispName, 62 | VectorDrawType _vectorDrawType, bool _relative, bool _scale, float _space, bool[] _labelEnabled, string[] _label, bool[] _labelBold, bool[] _labelItalic, int[] _labelAlign, bool[] _buttonEnabled, string[] _buttonText, 63 | string[] _buttonCallback, bool[] buttonCondense, int _numSpace, string _classType, Vector3 _offset, bool _QuaternionHandle, bool _canWrite, string _tooltip, bool _hasTooltip, 64 | bool _toggleStart, int _toggleSize, int _toggleLevel, bool _largeTexture, float _textureSize, string _textFieldDefault, bool _textArea) 65 | { 66 | limitType = _limitType; 67 | min = _min; 68 | max = _max; 69 | progressBar = _progressBar; 70 | iMax = _iMax; 71 | iMin = _iMin; 72 | active = _active; 73 | type = _type; 74 | name = _name; 75 | dispName = _dispName; 76 | vectorDrawType = _vectorDrawType; 77 | relative = _relative; 78 | scale = _scale; 79 | space = _space; 80 | labelEnabled = _labelEnabled; 81 | label = _label; 82 | labelBold = _labelBold; 83 | labelItalic = _labelItalic; 84 | labelAlign = _labelAlign; 85 | buttonEnabled = _buttonEnabled; 86 | buttonText = _buttonText; 87 | buttonCallback = _buttonCallback; 88 | numSpace = _numSpace; 89 | classType = _classType; 90 | offset = _offset; 91 | QuaternionHandle = _QuaternionHandle; 92 | canWrite = _canWrite; 93 | tooltip = _tooltip; 94 | hasTooltip = _hasTooltip; 95 | toggleStart = _toggleStart; 96 | toggleSize = _toggleSize; 97 | toggleLevel = _toggleLevel; 98 | largeTexture = _largeTexture; 99 | textureSize = _textureSize; 100 | textFieldDefault = _textFieldDefault; 101 | textArea = _textArea; 102 | } 103 | }"; 104 | 105 | #endregion 106 | 107 | #region vars 108 | 109 | public string vars = @" 110 | SerializedObject so; 111 | SerializedProperty[] properties; 112 | new string name; 113 | string dispName; 114 | Rect tooltipRect; 115 | List vars; 116 | void RefreshVars(){for (int i = 0; i < vars.Count; i += 1) properties[i] = so.FindProperty (vars[i].name);} 117 | void OnEnable () 118 | { 119 | vars = new List(); 120 | so = serializedObject;"; 121 | 122 | #endregion 123 | 124 | #region onEnable 125 | 126 | public string onEnable = @" 127 | int count = vars.Count; 128 | properties = new SerializedProperty[count]; 129 | } 130 | "; 131 | 132 | #endregion 133 | 134 | #region progressBar 135 | 136 | public string progressBar = @" 137 | void ProgressBar (float value, string label) 138 | { 139 | GUILayout.Space (3.0f); 140 | Rect rect = GUILayoutUtility.GetRect (18, 18, " + Quot("TextField") + @"); 141 | EditorGUI.ProgressBar (rect, value, label); 142 | GUILayout.Space (3.0f); 143 | }"; 144 | 145 | #endregion 146 | 147 | #region propertyField 148 | 149 | public string propertyField = @" 150 | void PropertyField (SerializedProperty sp, string name) 151 | { 152 | if (sp.hasChildren) { 153 | GUILayout.BeginVertical(); 154 | while (true) { 155 | if (sp.propertyPath != name && !sp.propertyPath.StartsWith (name + " + Quot(".") + @")) 156 | break; 157 | 158 | EditorGUI.indentLevel = sp.depth; 159 | bool child = false; 160 | 161 | if (sp.depth == 0) 162 | child = EditorGUILayout.PropertyField(sp, new GUIContent(dispName)); 163 | else 164 | child = EditorGUILayout.PropertyField(sp); 165 | 166 | if (!sp.NextVisible (child)) 167 | break; 168 | } 169 | EditorGUI.indentLevel = 0; 170 | GUILayout.EndVertical(); 171 | } else EditorGUILayout.PropertyField(sp, new GUIContent(dispName)); 172 | }"; 173 | 174 | #endregion 175 | 176 | #region arrayGUI 177 | 178 | public string arrayGUI = @" 179 | void ArrayGUI (SerializedProperty sp, string name) 180 | { 181 | EditorGUIUtility.LookLikeControls (120.0f, 40.0f); 182 | GUILayout.Space (4.0f); 183 | EditorGUILayout.BeginVertical (" + Quot("box") + @", GUILayout.MaxWidth(Screen.width)); 184 | 185 | int i = 0; 186 | int del = -1; 187 | 188 | SerializedProperty array = sp.Copy (); 189 | SerializedProperty size = null; 190 | bool first = true; 191 | 192 | while (true) { 193 | if (sp.propertyPath != name && !sp.propertyPath.StartsWith (name + " + Quot(".") + @")) 194 | break; 195 | 196 | bool child; 197 | EditorGUI.indentLevel = sp.depth; 198 | 199 | if (sp.depth == 1 && !first) { 200 | EditorGUILayout.BeginHorizontal (); 201 | 202 | if (GUILayout.Button (" + Quot("") + ", " + Quot("OL Minus") + @", GUILayout.Width (24.0f))) 203 | del = i; 204 | 205 | child = EditorGUILayout.PropertyField (sp); 206 | 207 | GUI.enabled = i > 0; 208 | 209 | if (GUILayout.Button (" + Quot("U") + @", " + Quot("ButtonLeft") + 210 | @", GUILayout.Width (24.0f), GUILayout.Height(18.0f))) 211 | array.MoveArrayElement (i - 1, i); 212 | 213 | GUI.enabled = i < array.arraySize - 1; 214 | if (GUILayout.Button(" + Quot("D") + @", " + Quot("ButtonRight") + 215 | @", GUILayout.Width(24.0f), GUILayout.Height(18.0f))) 216 | array.MoveArrayElement (i + 1, i); 217 | 218 | ++i; 219 | 220 | GUI.enabled = true; 221 | EditorGUILayout.EndHorizontal (); 222 | } else if (sp.depth == 1) { 223 | first = false; 224 | size = sp.Copy (); 225 | 226 | EditorGUILayout.BeginHorizontal (); 227 | 228 | if (!size.hasMultipleDifferentValues && GUILayout.Button(" + Quot("") + @", " + Quot("OL Plus") + 229 | @", GUILayout.Width(24.0f))) 230 | array.arraySize += 1; 231 | 232 | 233 | child = EditorGUILayout.PropertyField (sp); 234 | 235 | EditorGUILayout.EndHorizontal (); 236 | } else { 237 | child = EditorGUILayout.PropertyField(sp); 238 | } 239 | 240 | if (!sp.NextVisible (child)) 241 | break; 242 | } 243 | 244 | sp.Reset (); 245 | 246 | if (del != -1) 247 | array.DeleteArrayElementAtIndex (del); 248 | 249 | if (array.isExpanded && !size.hasMultipleDifferentValues) { 250 | EditorGUILayout.BeginHorizontal (); 251 | 252 | if (GUILayout.Button(" + Quot("") + @", " + Quot("OL Plus") + @", GUILayout.Width(24.0f))) 253 | array.arraySize += 1; 254 | 255 | GUI.enabled = false; 256 | EditorGUILayout.PropertyField (array.GetArrayElementAtIndex (array.arraySize - 1), new GUIContent (" + Quot("") + 257 | @" + array.arraySize)); 258 | GUI.enabled = true; 259 | 260 | EditorGUILayout.EndHorizontal (); 261 | } 262 | 263 | 264 | EditorGUI.indentLevel = 0; 265 | EditorGUILayout.EndVertical (); 266 | EditorGUIUtility.LookLikeControls (170.0f, 80.0f); 267 | }"; 268 | 269 | #endregion 270 | 271 | #region vector2Field 272 | 273 | public string vector2Field = @" 274 | void Vector2Field(SerializedProperty sp) 275 | { 276 | EditorGUI.BeginProperty(new Rect(0.0f, 0.0f, 0.0f, 0.0f), new GUIContent(), sp); 277 | EditorGUI.BeginChangeCheck (); 278 | var newValue = EditorGUILayout.Vector2Field (dispName, sp.vector2Value); 279 | 280 | if (EditorGUI.EndChangeCheck ()) 281 | sp.vector2Value = newValue; 282 | 283 | EditorGUI.EndProperty (); 284 | }"; 285 | 286 | #endregion 287 | 288 | #region floatField 289 | 290 | public string floatField = @" 291 | void FloatField(SerializedProperty sp, InspectorPlusVar v) 292 | { 293 | if (v.limitType == InspectorPlusVar.LimitType.Min && !sp.hasMultipleDifferentValues) 294 | sp.floatValue = Mathf.Max (v.min, sp.floatValue); 295 | else if (v.limitType == InspectorPlusVar.LimitType.Max && !sp.hasMultipleDifferentValues) 296 | sp.floatValue = Mathf.Min (v.max, sp.floatValue); 297 | 298 | if (v.limitType == InspectorPlusVar.LimitType.Range) { 299 | if (!v.progressBar) 300 | EditorGUILayout.Slider (sp, v.min, v.max); 301 | else { 302 | if (!sp.hasMultipleDifferentValues) { 303 | sp.floatValue = Mathf.Clamp (sp.floatValue, v.min, v.max); 304 | ProgressBar ((sp.floatValue - v.min) / v.max, dispName); 305 | } else 306 | ProgressBar ((sp.floatValue - v.min) / v.max, dispName); 307 | } 308 | } 309 | else EditorGUILayout.PropertyField(sp, new GUIContent(dispName)); 310 | }"; 311 | 312 | #endregion 313 | 314 | #region intField 315 | 316 | public string intField = @" 317 | void IntField(SerializedProperty sp, InspectorPlusVar v) 318 | { 319 | if (v.limitType == InspectorPlusVar.LimitType.Min && !sp.hasMultipleDifferentValues) 320 | sp.intValue = Mathf.Max (v.iMin, sp.intValue); 321 | else if (v.limitType == InspectorPlusVar.LimitType.Max && !sp.hasMultipleDifferentValues) 322 | sp.intValue = Mathf.Min (v.iMax, sp.intValue); 323 | 324 | if (v.limitType == InspectorPlusVar.LimitType.Range) 325 | { 326 | if (!v.progressBar) 327 | { 328 | EditorGUI.BeginProperty(new Rect(0.0f, 0.0f, 0.0f, 0.0f), new GUIContent(), sp); 329 | EditorGUI.BeginChangeCheck (); 330 | 331 | var newValue = EditorGUI.IntSlider(GUILayoutUtility.GetRect(18.0f, 18.0f), new GUIContent(dispName), sp.intValue, v.iMin, v.iMax); 332 | 333 | if (EditorGUI.EndChangeCheck ()) 334 | sp.intValue = newValue; 335 | EditorGUI.EndProperty (); 336 | } 337 | else { 338 | if (!sp.hasMultipleDifferentValues) { 339 | sp.intValue = Mathf.Clamp (sp.intValue, v.iMin, v.iMax); 340 | ProgressBar ((float)(sp.intValue - v.iMin) / v.iMax, dispName); 341 | } else 342 | ProgressBar ((float)(sp.intValue - v.iMin) / v.iMax, dispName); 343 | } 344 | } 345 | else EditorGUILayout.PropertyField(sp, new GUIContent(dispName)); 346 | }"; 347 | 348 | #endregion 349 | 350 | #region quaternionField 351 | 352 | public string quaternionField = @" 353 | void QuaternionField(SerializedProperty sp) 354 | { 355 | EditorGUI.BeginProperty(new Rect(0.0f, 0.0f, 0.0f, 0.0f), new GUIContent(), sp); 356 | 357 | EditorGUI.BeginChangeCheck (); 358 | SerializedProperty x = sp.FindPropertyRelative (" + Quot("x") + @"); 359 | SerializedProperty y = sp.FindPropertyRelative (" + Quot("y") + @"); 360 | SerializedProperty z = sp.FindPropertyRelative (" + Quot("z") + @"); 361 | SerializedProperty w = sp.FindPropertyRelative (" + Quot("w") + @"); 362 | 363 | Quaternion q = new Quaternion (x.floatValue, y.floatValue, z.floatValue, w.floatValue); 364 | 365 | var newValue = EditorGUILayout.Vector3Field (dispName, q.eulerAngles); 366 | 367 | if (EditorGUI.EndChangeCheck ()) { 368 | Quaternion r = Quaternion.Euler (newValue); 369 | x.floatValue = r.x; 370 | y.floatValue = r.y; 371 | z.floatValue = r.z; 372 | w.floatValue = r.w; 373 | } 374 | 375 | EditorGUI.EndProperty (); 376 | }"; 377 | 378 | #endregion 379 | 380 | public string boolField = @" 381 | int BoolField(SerializedProperty sp, InspectorPlusVar v) 382 | { 383 | if (v.toggleStart) 384 | { 385 | EditorGUI.BeginProperty(new Rect(0.0f, 0.0f, 0.0f, 0.0f), new GUIContent(), sp); 386 | 387 | EditorGUI.BeginChangeCheck(); 388 | var newValue = EditorGUILayout.Toggle(dispName, sp.boolValue); 389 | 390 | if (EditorGUI.EndChangeCheck()) 391 | sp.boolValue = newValue; 392 | 393 | EditorGUI.EndProperty(); 394 | 395 | if (!sp.boolValue) 396 | return v.toggleSize; 397 | } 398 | else EditorGUILayout.PropertyField(sp, new GUIContent(dispName)); 399 | 400 | return 0; 401 | }"; 402 | 403 | public string textureGUI = @" 404 | void TextureGUI(SerializedProperty sp, InspectorPlusVar v) 405 | { 406 | if (!v.largeTexture) 407 | PropertyField(sp, name); 408 | else 409 | { 410 | GUILayout.Label(dispName, GUILayout.Width(145.0f)); 411 | 412 | EditorGUI.BeginProperty(new Rect(0.0f, 0.0f, 0.0f, 0.0f), new GUIContent(), sp); 413 | 414 | EditorGUI.BeginChangeCheck(); 415 | GUILayout.BeginHorizontal(); 416 | GUILayout.FlexibleSpace(); 417 | var newValue = EditorGUILayout.ObjectField(sp.objectReferenceValue, typeof(Texture2D), false, GUILayout.Width(v.textureSize), GUILayout.Height(v.textureSize)); 418 | GUILayout.FlexibleSpace(); 419 | GUILayout.EndHorizontal(); 420 | if (EditorGUI.EndChangeCheck()) 421 | sp.objectReferenceValue = newValue; 422 | 423 | EditorGUI.EndProperty(); 424 | } 425 | }"; 426 | 427 | public string textGUI = @" 428 | void TextGUI(SerializedProperty sp, InspectorPlusVar v) 429 | { 430 | if (v.textFieldDefault == " + Quot("") + @") 431 | { 432 | PropertyField(sp, name); 433 | return; 434 | } 435 | 436 | string focusName = " + Quot("_focusTextField") + @"+ v.name; 437 | 438 | GUI.SetNextControlName(focusName); 439 | 440 | EditorGUI.BeginProperty(new Rect(0.0f, 0.0f, 0.0f, 0.0f), new GUIContent(), sp); 441 | 442 | EditorGUI.BeginChangeCheck(); 443 | 444 | GUILayout.BeginHorizontal(); 445 | EditorGUILayout.PrefixLabel(dispName); 446 | 447 | string newValue = " + Quot("") + @"; 448 | 449 | if (!v.textArea) 450 | newValue = EditorGUILayout.TextField(" + Quot("") + @", sp.stringValue, GUILayout.Width(Screen.width)); 451 | else 452 | newValue = EditorGUILayout.TextArea(sp.stringValue, GUILayout.Width(Screen.width)); 453 | 454 | if (GUI.GetNameOfFocusedControl() != focusName && !sp.hasMultipleDifferentValues && sp.stringValue == " + Quot("") + 455 | @") 456 | { 457 | GUI.color = new Color(0.7f, 0.7f, 0.7f); 458 | GUI.Label(GUILayoutUtility.GetLastRect(), v.textFieldDefault); 459 | GUI.color = Color.white; 460 | } 461 | 462 | GUILayout.FlexibleSpace(); 463 | GUILayout.EndHorizontal(); 464 | 465 | if (EditorGUI.EndChangeCheck()) 466 | sp.stringValue = newValue; 467 | 468 | EditorGUI.EndProperty(); 469 | }"; 470 | 471 | public string GetOnGUI(bool hasFloat, 472 | bool hasInt, 473 | bool hasProgressBar, 474 | bool hasArray, 475 | bool hasVector2, 476 | bool hasQuaternion, 477 | bool hasBool, 478 | bool hasTooltip, 479 | bool hasSpace, 480 | bool hasTexture, 481 | bool hasText) { 482 | string ret = ""; 483 | ret += @" 484 | public override void OnInspectorGUI () 485 | { 486 | so.Update (); 487 | RefreshVars(); 488 | 489 | EditorGUIUtility.LookLikeControls (135.0f, 50.0f); 490 | 491 | for (int i = 0; i < properties.Length; i += 1) 492 | { 493 | InspectorPlusVar v = vars[i]; 494 | 495 | if (v.active && properties[i] != null) 496 | { 497 | SerializedProperty sp = properties [i];"; 498 | 499 | bool any = hasFloat || hasInt || hasProgressBar || hasArray || hasVector2 || hasQuaternion || hasBool || hasSpace || 500 | hasTexture || hasText; 501 | 502 | if (any) { 503 | ret += @"string s = v.type; 504 | bool skip = false;"; 505 | } 506 | 507 | ret += @" 508 | name = v.name; 509 | dispName = v.dispName; 510 | 511 | GUI.enabled = v.canWrite; 512 | 513 | GUILayout.BeginHorizontal(); 514 | 515 | if (v.toggleLevel != 0) 516 | GUILayout.Space(v.toggleLevel * 10.0f); 517 | "; 518 | 519 | if (hasVector2) 520 | ret += @" 521 | if (s == typeof(Vector2).Name){ 522 | Vector2Field(sp); 523 | skip = true; 524 | }"; 525 | if (hasFloat) 526 | ret += @" 527 | if (s == typeof(float).Name){ 528 | FloatField(sp, v); 529 | skip = true; 530 | }"; 531 | if (hasInt) 532 | ret += @" 533 | if (s == typeof(int).Name){ 534 | IntField(sp, v); 535 | skip = true; 536 | }"; 537 | if (hasQuaternion) 538 | ret += @" 539 | if (s == typeof(Quaternion).Name){ 540 | QuaternionField(sp); 541 | skip = true; 542 | }"; 543 | if (hasBool) 544 | ret += @" 545 | if (s == typeof(bool).Name){ 546 | i += BoolField(sp, v); 547 | skip = true; 548 | }"; 549 | if (hasTexture) 550 | ret += @" 551 | if (s == typeof(Texture2D).Name || s == typeof(Texture).Name){ 552 | TextureGUI(sp, v); 553 | skip = true; 554 | }"; 555 | 556 | if (hasText) 557 | ret += @" 558 | if (s == typeof(string).Name){ 559 | TextGUI(sp, v); 560 | skip = true; 561 | }"; 562 | 563 | if (hasArray) 564 | ret += @" 565 | if (sp.isArray && s != typeof(string).Name){ 566 | ArrayGUI(sp, name); 567 | skip = true; 568 | }"; 569 | 570 | 571 | if (hasVector2 || hasFloat || hasInt || hasQuaternion || hasBool || hasArray) 572 | ret += @" 573 | if (!skip)"; 574 | ret += @" 575 | PropertyField(sp, name); 576 | GUILayout.EndHorizontal(); 577 | GUI.enabled = true;"; 578 | 579 | if (hasTooltip) 580 | ret += @" 581 | if (v.hasTooltip) 582 | { 583 | Rect last = GUILayoutUtility.GetLastRect(); 584 | GUI.Label(last, new GUIContent(" + Quot("") + @", v.tooltip)); 585 | 586 | GUIStyle style = new GUIStyle(); 587 | style.fixedWidth = 250.0f; 588 | style.wordWrap = true; 589 | 590 | Vector2 size = new GUIStyle().CalcSize(new GUIContent(GUI.tooltip)); 591 | tooltipRect = new Rect(Event.current.mousePosition.x + 4.0f, Event.current.mousePosition.y + 12.0f, 28.0f + size.x, 9.0f + size.y); 592 | 593 | if (tooltipRect.width > 250.0f) 594 | { 595 | float delt = (tooltipRect.width - 250.0f); 596 | tooltipRect.width -= delt; 597 | tooltipRect.height += size.y * Mathf.CeilToInt(delt / 250.0f); 598 | } 599 | }"; 600 | ret += @" 601 | }"; 602 | if (hasSpace) 603 | ret += @" 604 | if (v.space == 0.0f) 605 | continue; 606 | float usedSpace = 0.0f; 607 | for (int j = 0; j < v.numSpace; j += 1) { 608 | if (v.labelEnabled [j] || v.buttonEnabled [j]) 609 | usedSpace += 18.0f; 610 | } 611 | if (v.space == 0.0f) 612 | continue; 613 | float space = Mathf.Max (0.0f, (v.space - usedSpace) / 2.0f); 614 | GUILayout.Space (space); 615 | for (int j = 0; j < v.numSpace; j += 1) { 616 | bool buttonLine = false; 617 | for (int k = 0; k < 4; k += 1) if (v.buttonEnabled[j * 4 + k]) buttonLine = true; 618 | if (!v.labelEnabled[j] && !buttonLine) 619 | continue; 620 | 621 | 622 | GUILayout.BeginHorizontal(); 623 | if (v.labelEnabled[j]) 624 | { 625 | GUIStyle boldItalic = new GUIStyle(); 626 | boldItalic.margin = new RectOffset(5, 5, 5, 5); 627 | 628 | if (v.labelAlign[j] == 0) 629 | boldItalic.alignment = TextAnchor.MiddleLeft; 630 | else if (v.labelAlign[j] == 1) 631 | boldItalic.alignment = TextAnchor.MiddleCenter; 632 | else if (v.labelAlign[j] == 2) 633 | boldItalic.alignment = TextAnchor.MiddleRight; 634 | 635 | if (v.labelBold[j] && v.labelItalic[j]) 636 | boldItalic.fontStyle = FontStyle.BoldAndItalic; 637 | else if (v.labelBold[j]) 638 | boldItalic.fontStyle = FontStyle.Bold; 639 | else if (v.labelItalic[j]) 640 | boldItalic.fontStyle = FontStyle.Italic; 641 | 642 | GUILayout.Label(v.label[j], boldItalic); 643 | boldItalic.alignment = TextAnchor.MiddleLeft; 644 | } 645 | bool alignRight = (v.labelEnabled[j] && buttonLine); 646 | 647 | if (!alignRight) 648 | { 649 | GUILayout.EndHorizontal(); 650 | GUILayout.BeginHorizontal(); 651 | } 652 | 653 | GUILayout.FlexibleSpace(); 654 | for (int k = 0; k < 4; k += 1) 655 | { 656 | if (v.buttonEnabled[j * 4 + k]) 657 | { 658 | if (!v.buttonCondense[j] && !alignRight) 659 | GUILayout.FlexibleSpace(); 660 | 661 | string style = " + Quot("Button") + @"; 662 | if (v.buttonCondense[j]) 663 | { 664 | bool hasLeft = false; 665 | bool hasRight = false; 666 | for(int p = k - 1; p >= 0; p -= 1) 667 | if (v.buttonEnabled[j * 4 + p]) 668 | hasLeft = true; 669 | for (int p = k + 1; p < 4; p += 1) 670 | if (v.buttonEnabled[j * 4 + p]) 671 | hasRight = true; 672 | 673 | if (!hasLeft && hasRight) 674 | style = " + Quot("ButtonLeft") + @"; 675 | else if (hasLeft && hasRight) 676 | style = " + Quot("ButtonMid") + @"; 677 | else if (hasLeft && !hasRight) 678 | style = " + Quot("ButtonRight") + @"; 679 | else if (!hasLeft && !hasRight) 680 | style = " + Quot("Button") + @"; 681 | } 682 | 683 | if (GUILayout.Button(v.buttonText[j * 4 + k], style, GUILayout.MinWidth(60.0f))) 684 | { 685 | foreach (object t in targets) 686 | { 687 | MethodInfo m = t.GetType().GetMethod(v.buttonCallback[j * 4 + k], BindingFlags.Public | BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.NonPublic); 688 | if (m != null) 689 | m.Invoke(target, null); 690 | } 691 | } 692 | 693 | if (!v.buttonCondense[j] && !alignRight) 694 | GUILayout.FlexibleSpace(); 695 | 696 | 697 | } 698 | } 699 | GUILayout.FlexibleSpace(); 700 | GUILayout.EndHorizontal (); 701 | } 702 | GUILayout.Space (space);"; 703 | ret += @" 704 | } 705 | so.ApplyModifiedProperties (); "; 706 | if (hasTooltip) 707 | ret += @" 708 | if (!string.IsNullOrEmpty(GUI.tooltip)) 709 | { 710 | GUI.color = new Color(1.0f, 1.0f, 1.0f, 1.0f); 711 | GUI.Box(tooltipRect, new GUIContent()); 712 | EditorGUI.HelpBox(tooltipRect, GUI.tooltip, MessageType.Info); 713 | Repaint(); 714 | } 715 | GUI.tooltip = " + Quot("") + ";"; 716 | 717 | 718 | return ret; 719 | } 720 | 721 | 722 | public string watermark = @" 723 | //NOTE NOTE NOTE: WATERMARK HERE 724 | //You are free to remove this 725 | //START REMOVE HERE 726 | GUILayout.BeginHorizontal(); 727 | GUI.color = new Color(1.0f, 1.0f, 1.0f, 0.3f); 728 | GUILayout.FlexibleSpace(); 729 | GUILayout.Label(" + Quot("Created with") + @"); 730 | GUI.color = new Color(1.0f, 1.0f, 1.0f, 0.6f); 731 | if (GUILayout.Button(" + Quot("Inspector++") + @")) 732 | Application.OpenURL(" + Quot("http://forum.unity3d.com/threads/136727-Inspector-Meh-to-WOW-inspectors") + 733 | @"); 734 | GUI.color = new Color(1.0f, 1.0f, 1.0f); 735 | GUILayout.EndHorizontal(); 736 | //END REMOVE HERE 737 | }"; 738 | 739 | 740 | public string vectorScene = @" 741 | void VectorScene(InspectorPlusVar v, string s, Transform t) 742 | { 743 | Vector3 val; 744 | 745 | if (s == typeof(Vector3).Name) 746 | val = (Vector3)GetTargetField(name); 747 | else 748 | val = (Vector3)((Vector2)GetTargetField(name)); 749 | 750 | Vector3 newVal = Vector3.zero; 751 | Vector3 curVal = Vector3.zero; 752 | bool setVal = false; 753 | bool relative = v.relative; 754 | bool scale = v.scale; 755 | 756 | switch (v.vectorDrawType) { 757 | case InspectorPlusVar.VectorDrawType.Direction: 758 | curVal = relative ? val:val - t.position; 759 | float size = scale ? Mathf.Min(2.0f, Mathf.Sqrt(curVal.magnitude) / 2.0f) : 1.0f; 760 | size *= HandleUtility.GetHandleSize(t.position); 761 | Handles.ArrowCap (0, t.position, curVal != Vector3.zero ? Quaternion.LookRotation (val.normalized) : Quaternion.identity, size); 762 | break; 763 | 764 | case InspectorPlusVar.VectorDrawType.Point: 765 | curVal = relative ? val:t.position + val; 766 | Handles.SphereCap (0, curVal, Quaternion.identity, 0.1f); 767 | break; 768 | 769 | case InspectorPlusVar.VectorDrawType.PositionHandle: 770 | curVal = relative ? t.position + val:val; 771 | setVal = true; 772 | newVal = Handles.PositionHandle (curVal, Quaternion.identity) - (relative ? t.position : Vector3.zero); 773 | break; 774 | 775 | case InspectorPlusVar.VectorDrawType.Scale: 776 | setVal = true; 777 | curVal = relative ? t.localScale + val :val; 778 | newVal = Handles.ScaleHandle(curVal, t.position + v.offset, t.rotation, HandleUtility.GetHandleSize(t.position + v.offset)) - (relative ? t.localScale : Vector3.zero); 779 | break; 780 | 781 | case InspectorPlusVar.VectorDrawType.Rotation: 782 | setVal = true; 783 | curVal = relative ? val + t.rotation.eulerAngles : val; 784 | newVal = Handles.RotationHandle(Quaternion.Euler(curVal), t.position + v.offset).eulerAngles - (relative?t.rotation.eulerAngles:Vector3.zero); 785 | break; 786 | } 787 | 788 | if (setVal) 789 | { 790 | object newObjectVal = newVal; 791 | 792 | if (s==typeof(Vector2).Name) 793 | newObjectVal = (Vector2)newVal; 794 | else if (s == typeof(Quaternion).Name) 795 | newObjectVal = Quaternion.Euler(newVal); 796 | 797 | SetTargetField(name, newObjectVal); 798 | } 799 | }"; 800 | 801 | public string quaternionScene = @" 802 | void QuaternionScene(Transform t, Vector3 offset) 803 | { 804 | Quaternion val = (Quaternion)GetTargetField(name); 805 | SetTargetField(name, Handles.RotationHandle (val, t.position + offset)); 806 | }"; 807 | 808 | 809 | public string GetSceneString(bool hasScene, bool hasVectorScene, bool hasQuaternionScene) { 810 | string ret = ""; 811 | ret += @" 812 | object GetTargetField(string name){return target.GetType ().GetField (name).GetValue (target);} 813 | void SetTargetField(string name, object value){target.GetType ().GetField (name).SetValue (target, value);} 814 | //some magic to draw the handles 815 | public void OnSceneGUI () 816 | { 817 | Transform t = ((MonoBehaviour)target).transform; 818 | 819 | foreach (InspectorPlusVar v in vars) { 820 | if (!v.active) 821 | continue; 822 | 823 | string s = v.type; 824 | name = v.name;"; 825 | 826 | if (hasVectorScene) 827 | ret += @" 828 | if (s == typeof(Vector3).Name || s == typeof(Vector2).Name) 829 | VectorScene(v, s, t);"; 830 | if (hasQuaternionScene) 831 | ret += @" 832 | if (s == typeof(Quaternion).Name && v.QuaternionHandle) 833 | QuaternionScene(t, v.offset);"; 834 | 835 | ret += @" 836 | } 837 | }"; 838 | return ret; 839 | } 840 | 841 | 842 | 843 | public InspectorPlusFilerStrings(string name, string fileName, bool hasInspector) { 844 | header = @" 845 | using UnityEngine; 846 | using System.Collections.Generic; 847 | using UnityEditor; 848 | using System.Reflection; 849 | using System; 850 | using Object = UnityEngine.Object;"; 851 | if (hasInspector) 852 | header += @" 853 | using InspectorPlusVar = " + fileName + @".InspectorPlusVar;"; 854 | header += @" 855 | 856 | [CanEditMultipleObjects] 857 | [CustomEditor(typeof(" + name + @"))] 858 | public class " + fileName + @" : Editor {"; 859 | } 860 | } 861 | #endif -------------------------------------------------------------------------------- /Assets/InspectorPlus/Editor/InspectorPlusFilerStrings.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d2752c0dc984b041889d9da38c63e54 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/InspectorPlus/Editor/InspectorPlusManager.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using UnityEngine; 3 | using System.Collections.Generic; 4 | using System; 5 | using System.IO; 6 | using UnityEditor; 7 | 8 | [Serializable] 9 | public class InspectorPlusManager : ScriptableObject { 10 | public List trackers = new List(); 11 | 12 | public string editName = "Name"; 13 | 14 | public Texture2D arrowUp; 15 | public Texture2D arrowDown; 16 | 17 | int check; 18 | 19 | 20 | string assetPath { 21 | get { return Path.GetDirectoryName(AssetDatabase.GetAssetPath(MonoScript.FromScriptableObject(this))); } 22 | } 23 | 24 | public List GetNames(string filter) { 25 | List ret = new List(); 26 | 27 | foreach (InspectorPlusTracker t in trackers) { 28 | if (filter == "") { 29 | ret.Add(t.name); 30 | } 31 | else if (t.name.IndexOf(filter, StringComparison.OrdinalIgnoreCase) >= 0) { 32 | ret.Add(t.name); 33 | } 34 | } 35 | 36 | return ret; 37 | } 38 | 39 | void OnEnable() { 40 | arrowUp = (Texture2D) AssetDatabase.LoadAssetAtPath(Directory.GetParent(assetPath) + "/Arrow-up.png", 41 | typeof(Texture)); 42 | arrowDown = (Texture2D) AssetDatabase.LoadAssetAtPath(Directory.GetParent(assetPath) + "/Arrow-down.png", 43 | typeof(Texture)); 44 | } 45 | 46 | public void AddInspector(string name, string filePathTracker) { 47 | InspectorPlusTracker newTracker = new InspectorPlusTracker(name, filePathTracker); 48 | trackers.Add(newTracker); 49 | newTracker.UpdateTarget(); 50 | EditorUtility.SetDirty(this); 51 | } 52 | 53 | public void DeleteInspector(string name) { 54 | //deselect objects with a custom edtior, or unity crashes. Yeah, unity, sometimes... :-) 55 | Selection.activeObject = null; 56 | InspectorPlusTracker t = GetTracker(name); 57 | trackers.Remove(t); 58 | EditorUtility.SetDirty(this); 59 | } 60 | 61 | public InspectorPlusTracker GetTracker(string name) { 62 | bool refreshNeeded = false; 63 | InspectorPlusTracker found = null; 64 | foreach (InspectorPlusTracker t in trackers) { 65 | if (t.dirty) { 66 | refreshNeeded = true; 67 | } 68 | 69 | if (t.name == name) { 70 | found = t; 71 | } 72 | } 73 | 74 | if (refreshNeeded) { 75 | EditorUtility.SetDirty(this); 76 | } 77 | 78 | return found; 79 | } 80 | 81 | void OnDestroy() { 82 | Save(); 83 | } 84 | 85 | void OnDisable() { 86 | Save(); 87 | } 88 | 89 | public void Save() { 90 | bool refreshNeeded = false; 91 | 92 | foreach (InspectorPlusTracker t in trackers) { 93 | if (t.dirty) { 94 | refreshNeeded = true; 95 | } 96 | } 97 | 98 | if (refreshNeeded) { 99 | EditorUtility.SetDirty(this); 100 | } 101 | } 102 | } 103 | #endif -------------------------------------------------------------------------------- /Assets/InspectorPlus/Editor/InspectorPlusManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 176de26f63e1773428c7efab48dac9f5 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/InspectorPlus/Editor/InspectorPlusSummary.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using System.Collections.Generic; 3 | using System.IO; 4 | 5 | public class InspectorPlusSummary { 6 | Dictionary summaries = new Dictionary(); 7 | List lines = new List(); 8 | 9 | string FindVarName(int index) { 10 | int i = index + 1; 11 | 12 | if (lines[i].EndsWith(";")) { 13 | string[] words = lines[i].Split(' '); 14 | 15 | if (!lines[i].Contains("=")) 16 | return words[words.Length - 1].Replace(";", ""); 17 | for (int j = words.Length - 1; j >= 0; j -= 1) { 18 | if (words[j].Contains("=")) { 19 | return words[j - 1]; 20 | } 21 | } 22 | } 23 | 24 | return ""; 25 | } 26 | 27 | public void ReadSummaries(string file) { 28 | if (file == "" || !File.Exists(file)) { 29 | return; 30 | } 31 | 32 | StreamReader reader = new StreamReader(file); 33 | string contents = reader.ReadToEnd(); 34 | string[] linesRaw = contents.Split('\n'); 35 | 36 | //format lines. 37 | foreach (string l in linesRaw) { 38 | string addString = l; 39 | addString = addString.Trim(); 40 | 41 | if (addString.Length < 1) { 42 | continue; 43 | } 44 | 45 | lines.Add(addString); 46 | } 47 | 48 | //format summaries 49 | bool summary = false; 50 | string curSum = ""; 51 | int count = 0; 52 | 53 | for (int i = 0; i < lines.Count; i += 1) { 54 | if (summary) { 55 | curSum += lines[i].Replace("///", "").Trim(); 56 | } 57 | 58 | if (lines[i].Contains("")) { 59 | summary = true; 60 | } 61 | 62 | if (lines[i].Contains("") && summary) { 63 | summary = false; 64 | count += 1; 65 | 66 | string name = FindVarName(i); 67 | if (name != "") 68 | summaries.Add(name, curSum.Replace("", "")); 69 | 70 | curSum = ""; 71 | } 72 | } 73 | 74 | reader.Close(); 75 | } 76 | 77 | public string GetSummary(string name) { 78 | if (summaries.ContainsKey(name)) 79 | return summaries[name]; 80 | 81 | return ""; 82 | } 83 | } 84 | 85 | #endif -------------------------------------------------------------------------------- /Assets/InspectorPlus/Editor/InspectorPlusSummary.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 500b9f88797cebc4a93bbc5dd12980ed 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/InspectorPlus/Editor/InspectorPlusTracker.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using UnityEngine; 3 | using System.Collections.Generic; 4 | using UnityEditor; 5 | using System.Reflection; 6 | using System; 7 | using UnityEditorInternal; 8 | 9 | [Serializable] 10 | public class InspectorPlusTracker { 11 | public string name; 12 | 13 | Type AttachedType { 14 | get { 15 | Type t1 = InspectorPlusType.Get(name); 16 | if (t1 != null) 17 | return t1; 18 | return Type.GetType(name); 19 | } 20 | } 21 | 22 | [SerializeField] 23 | List m_vars = new List(); 24 | 25 | [SerializeField] protected List VarsProcessed = new List(); 26 | [SerializeField] protected List IgnoredProperties = new List(); 27 | 28 | double m_lastTime; 29 | bool m_dirty; 30 | 31 | 32 | public bool dirty { 33 | get { 34 | bool temp = m_dirty; 35 | m_dirty = false; 36 | return temp; 37 | } 38 | set { m_dirty = value; } 39 | } 40 | 41 | string m_filePath; 42 | bool m_first = true; 43 | 44 | public InspectorPlusTracker(string _name, string _filePath) { 45 | name = _name; 46 | m_filePath = _filePath; 47 | UpdateFields(); 48 | } 49 | 50 | public void UpdateFields() { 51 | if (EditorApplication.timeSinceStartup - m_lastTime < 1.0 || AttachedType == null) { 52 | return; 53 | } 54 | 55 | //UpdateFilePath(); 56 | int count = -1; 57 | Type t = AttachedType; 58 | FieldInfo[] fields = t.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); 59 | 60 | List varsCollected = new List(); 61 | InspectorPlusSummary s = new InspectorPlusSummary(); 62 | s.ReadSummaries(m_filePath); 63 | 64 | foreach (FieldInfo fieldInfo in fields) { 65 | if (IgnoredProperties.Contains(fieldInfo.Name)) { 66 | continue; 67 | } 68 | 69 | if (fieldInfo.IsPrivate && !fieldInfo.IsDefined(typeof(SerializeField), false)) { 70 | continue; 71 | } 72 | 73 | if (fieldInfo.IsDefined(typeof(HideInInspector), false)) { 74 | continue; 75 | } 76 | 77 | ++count; 78 | varsCollected.Add(fieldInfo.Name); 79 | 80 | if (VarsProcessed.Contains(fieldInfo.Name)) 81 | continue; 82 | 83 | if (!m_first) { 84 | VarsProcessed.Insert(count, fieldInfo.Name); 85 | } 86 | else { 87 | VarsProcessed.Add(fieldInfo.Name); 88 | } 89 | 90 | InspectorPlusVar newVar = new InspectorPlusVar(); 91 | newVar.name = fieldInfo.Name; 92 | newVar.SetDispName(); 93 | newVar.type = fieldInfo.FieldType.Name; 94 | newVar.isArray = fieldInfo.FieldType.IsArray; 95 | newVar.classType = AttachedType.Name; 96 | 97 | if (!m_first) { 98 | m_vars.Insert(count, newVar); 99 | } 100 | else { 101 | m_vars.Add(newVar); 102 | } 103 | } 104 | 105 | foreach (FieldInfo fieldInfo in fields) { 106 | string newTooltip = s.GetSummary(fieldInfo.Name); 107 | InspectorPlusVar ipv = m_vars.Find(i => i.name == fieldInfo.Name); 108 | 109 | if (ipv == null) { 110 | continue; 111 | } 112 | 113 | if (fieldInfo.IsDefined(typeof(TooltipAttribute), false)) { 114 | object[] tips = fieldInfo.GetCustomAttributes(typeof(TooltipAttribute), false); 115 | newTooltip = ((TooltipAttribute) tips[tips.Length - 1]).tooltip; 116 | } 117 | 118 | if (newTooltip != "") { 119 | ipv.hasTooltip = true; 120 | ipv.tooltip = newTooltip; 121 | ipv.fixedTip = true; 122 | } 123 | else { 124 | ipv.fixedTip = false; 125 | } 126 | } 127 | 128 | m_vars.RemoveAll(v => !varsCollected.Contains(v.name)); 129 | VarsProcessed.RemoveAll(n => !varsCollected.Contains(n)); 130 | 131 | m_lastTime = EditorApplication.timeSinceStartup; 132 | m_first = false; 133 | } 134 | 135 | public List GetVars() { 136 | return m_vars; 137 | } 138 | 139 | public void UpdateTarget() { 140 | foreach (UnityEngine.Object o in Selection.objects) { 141 | GameObject g = o as GameObject; 142 | 143 | if (g != null && g.GetComponent(name)) { 144 | EditorUtility.SetDirty(g); 145 | } 146 | } 147 | } 148 | 149 | void UpdateVarLevel() { 150 | for (int i = 0; i < m_vars.Count; i += 1) { 151 | m_vars[i].toggleLevel = 0; 152 | m_vars[i].index = i; 153 | m_vars[i].maxSize = m_vars.Count; 154 | } 155 | 156 | for (int i = 0; i < m_vars.Count; i += 1) { 157 | if (m_vars[i].toggleStart && m_vars[i].active) { 158 | for (int j = i + 1; j <= i + m_vars[i].toggleSize; j += 1) { 159 | if (j < m_vars.Count) 160 | m_vars[j].toggleLevel += 1; 161 | } 162 | } 163 | } 164 | } 165 | 166 | ReorderableList list; 167 | 168 | public void DrawGUI() { 169 | UpdateFields(); 170 | UpdateVarLevel(); 171 | 172 | if (list == null) { 173 | list = new ReorderableList(m_vars, typeof(InspectorPlusVar)); 174 | list.drawElementCallback += DrawElement; 175 | 176 | list.displayAdd = false; 177 | list.displayRemove = false; 178 | list.elementHeightCallback += ElementHeightCallback; 179 | list.elementHeight += 15.0f; 180 | list.headerHeight = 0; 181 | } 182 | 183 | list.showDefaultBackground = false; 184 | list.DoLayoutList(); 185 | } 186 | 187 | float ElementHeightCallback(int index) { 188 | InspectorPlusVar ipv = m_vars[index]; 189 | return EditorGUIUtility.singleLineHeight + 10.0f + ipv.space; 190 | } 191 | 192 | 193 | Rect currentRect; 194 | public Rect GetRect(float width) { 195 | Rect newRect = currentRect; 196 | newRect.width = width; 197 | currentRect.x += width; 198 | return newRect; 199 | } 200 | 201 | public void Line(float height) { 202 | currentRect.x = 0; 203 | currentRect.y += height; 204 | } 205 | 206 | void DrawElement(Rect rect, int i, bool isActive, bool isFocused) { 207 | InspectorPlusVar ipv = m_vars[i]; 208 | 209 | currentRect = rect; 210 | currentRect.height = EditorGUIUtility.singleLineHeight; 211 | 212 | GetRect(ipv.toggleLevel * 15.0f); 213 | 214 | ipv.active = GUI.Toggle(GetRect(15.0f), ipv.active, ""); 215 | 216 | GUI.enabled = ipv.active; 217 | ipv.dispName = GUI.TextField(GetRect(100.0f), ipv.dispName); 218 | 219 | GetRect(5.0f); 220 | 221 | GUI.enabled = !ipv.fixedTip; 222 | ipv.hasTooltip = GUI.Toggle(GetRect(40.0f), ipv.hasTooltip, ""); 223 | GUI.enabled = ipv.hasTooltip && GUI.enabled; 224 | ipv.tooltip = GUI.TextField(GetRect(100.0f), ipv.tooltip); 225 | 226 | GUI.enabled = true; 227 | 228 | 229 | GUI.enabled = i - 1 >= 0; 230 | 231 | GUI.enabled = true; 232 | ipv.canWrite = GUI.Toggle(GetRect(15.0f), ipv.canWrite, new GUIContent("")); 233 | 234 | ipv.DrawFieldGUI(this); 235 | ipv.DrawDragBox(this); 236 | 237 | if (!ipv.active) { 238 | GUI.enabled = true; 239 | } 240 | 241 | if (GUI.changed) { 242 | UpdateTarget(); 243 | dirty = true; 244 | } 245 | } 246 | } 247 | #endif -------------------------------------------------------------------------------- /Assets/InspectorPlus/Editor/InspectorPlusTracker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b47e894f4897aa049b49a11a8801657e 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/InspectorPlus/Editor/InspectorPlusVar.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using UnityEngine; 3 | using UnityEditor; 4 | using System; 5 | using UnityEngine.Collections; 6 | 7 | [Serializable] 8 | public class InspectorPlusVar { 9 | public enum LimitType { 10 | None, 11 | Max, 12 | Min, 13 | Range 14 | }; 15 | 16 | public enum VectorDrawType { 17 | None, 18 | Direction, 19 | Point, 20 | PositionHandle, 21 | Scale, 22 | Rotation 23 | }; 24 | 25 | public LimitType limitType = LimitType.None; 26 | public float min = -0.0f; 27 | public float max = -0.0f; 28 | 29 | public bool progressBar; 30 | 31 | 32 | public int iMin = -0; 33 | public int iMax = -0; 34 | 35 | public bool active = true; 36 | 37 | public string type; 38 | public string name; 39 | bool setName; 40 | 41 | public string dispName { 42 | get { 43 | if (!setName) { 44 | setName = true; 45 | SetDispName(); 46 | } 47 | return _dispName; 48 | } 49 | set { _dispName = value; } 50 | } 51 | 52 | string _dispName = ""; 53 | public VectorDrawType vectorDrawType; 54 | public bool relative = false; 55 | public bool scale = false; 56 | 57 | public float space = 0.0f; 58 | 59 | public bool[] labelEnabled = new bool[4]; 60 | public string[] label = new string[4]; 61 | public bool[] labelBold = new bool[4]; 62 | 63 | public bool[] buttonEnabled = new bool[16]; 64 | public string[] buttonText = new string[16]; 65 | public string[] buttonCallback = new string[16]; 66 | public bool[] buttonCondense = new bool[4]; 67 | 68 | 69 | public int numSpace = 0; 70 | public string classType; 71 | public bool isArray; 72 | 73 | public Vector3 offset = new Vector3(0.5f, 0.5f); 74 | 75 | public bool QuaternionHandle; 76 | 77 | Vector2 startpos; 78 | bool pressed; 79 | 80 | public bool canWrite = true; 81 | public string tooltip = "Tooltip"; 82 | public bool hasTooltip = false; 83 | public bool fixedTip = false; 84 | 85 | public bool toggleStart = false; 86 | public int toggleSize = 0; 87 | public int toggleLevel = 0; 88 | 89 | public int index; 90 | public int maxSize; 91 | 92 | public bool largeTexture; 93 | public float textureSize = 70; 94 | 95 | public string textFieldDefault; 96 | public bool textArea; 97 | 98 | public InspectorPlusVar() { 99 | for (int i = 0; i < 4; ++i) { 100 | label[i] = ""; 101 | for (int j = 0; j < 4; j += 1) { 102 | buttonText[i * 4 + j] = ""; 103 | buttonCallback[i * 4 + j] = ""; 104 | } 105 | } 106 | } 107 | 108 | public void SetDispName() { 109 | string output = ""; 110 | 111 | foreach (char letter in name) { 112 | if (Char.IsUpper(letter) && output.Length > 0) { 113 | output += " " + letter; 114 | } 115 | else if (letter == '_') { 116 | output += " "; 117 | } 118 | else { 119 | output += letter; 120 | } 121 | } 122 | 123 | _dispName = output; 124 | _dispName = char.ToUpper(_dispName[0]) + _dispName.Substring(1); 125 | setName = true; 126 | } 127 | 128 | public void DrawFieldGUI(InspectorPlusTracker gui) { 129 | if (canWrite) { 130 | gui.GetRect(30.0f); 131 | 132 | if (type == typeof(float).Name) { 133 | GUI.Label(gui.GetRect(80.0f), "Limit: "); 134 | limitType = (LimitType) EditorGUI.EnumPopup(gui.GetRect(80.0f), limitType); 135 | 136 | bool oldEnabled = GUI.enabled; 137 | 138 | GUI.enabled = limitType == LimitType.Min || limitType == LimitType.Range; 139 | min = EditorGUI.FloatField(gui.GetRect(80.0f), min); 140 | 141 | GUI.enabled = limitType == LimitType.Max || limitType == LimitType.Range; 142 | max = EditorGUI.FloatField(gui.GetRect(80.0f), max); 143 | 144 | if (limitType == LimitType.Range) { 145 | GUI.Label(gui.GetRect(80.0f), "ProgressBar: "); 146 | progressBar = GUI.Toggle(gui.GetRect(80.0f), progressBar, ""); 147 | } 148 | 149 | GUI.enabled = oldEnabled; 150 | } 151 | else if (type == typeof(int).Name) { 152 | GUI.Label(gui.GetRect(80.0f), "Limit: "); 153 | limitType = (LimitType) EditorGUI.EnumPopup(gui.GetRect(80.0f), limitType); 154 | 155 | bool oldEnabled = GUI.enabled; 156 | 157 | GUI.enabled = limitType == LimitType.Min || limitType == LimitType.Range; 158 | iMin = EditorGUI.IntField(gui.GetRect(80.0f), iMin); 159 | 160 | GUI.enabled = limitType == LimitType.Max || limitType == LimitType.Range; 161 | iMax = EditorGUI.IntField(gui.GetRect(80.0f), iMax); 162 | 163 | if (limitType == LimitType.Range) { 164 | GUI.Label(gui.GetRect(80.0f), "ProgressBar: "); 165 | progressBar = GUI.Toggle(gui.GetRect(80.0f), progressBar, ""); 166 | } 167 | 168 | GUI.enabled = oldEnabled; 169 | } 170 | else if (type == typeof(Vector3).Name || type == typeof(Vector2).Name) { 171 | GUI.Label(gui.GetRect(80.0f), "Draw: "); 172 | vectorDrawType = (VectorDrawType) EditorGUI.EnumPopup(gui.GetRect(80.0f), vectorDrawType); 173 | 174 | bool oldEnabled = GUI.enabled; 175 | 176 | GUI.enabled = vectorDrawType != VectorDrawType.None; 177 | GUI.Label(gui.GetRect(80.0f), "Relative: "); 178 | relative = GUI.Toggle(gui.GetRect(80.0f), relative, ""); 179 | 180 | if (vectorDrawType == VectorDrawType.Direction) { 181 | GUI.Label(gui.GetRect(80.0f), "Scale: "); 182 | scale = GUI.Toggle(gui.GetRect(80.0f), scale, ""); 183 | } 184 | 185 | if (vectorDrawType == VectorDrawType.Scale || vectorDrawType == VectorDrawType.Rotation) { 186 | GUI.Label(gui.GetRect(80.0f), "Offset: "); 187 | offset.x = EditorGUI.FloatField(gui.GetRect(40.0f), offset.x); 188 | offset.y = EditorGUI.FloatField(gui.GetRect(40.0f), offset.y); 189 | offset.z = EditorGUI.FloatField(gui.GetRect(40.0f), offset.z); 190 | } 191 | 192 | GUI.enabled = oldEnabled; 193 | } 194 | else if (type == typeof(Quaternion).Name) { 195 | QuaternionHandle = GUI.Toggle(gui.GetRect(80.0f), QuaternionHandle, new GUIContent("handle")); 196 | gui.GetRect(20.0f); 197 | 198 | GUI.enabled = QuaternionHandle; 199 | GUI.Label(gui.GetRect(80.0f), "Offset: "); 200 | offset.x = EditorGUI.FloatField(gui.GetRect(40.0f), offset.x); 201 | offset.y = EditorGUI.FloatField(gui.GetRect(40.0f), offset.y); 202 | offset.z = EditorGUI.FloatField(gui.GetRect(40.0f), offset.z); 203 | GUI.enabled = true; 204 | } 205 | else if (type == typeof(bool).Name) { 206 | toggleStart = GUI.Toggle(gui.GetRect(150.0f), toggleStart, "Toggle group"); 207 | GUI.enabled = toggleStart; 208 | toggleSize = EditorGUI.IntSlider(gui.GetRect(120.0f), toggleSize, 1, 209 | Mathf.Max(1, (maxSize - index) - 1)); 210 | GUI.enabled = true; 211 | } 212 | else if (type == typeof(Texture).Name || type == typeof(Texture2D).Name) { 213 | largeTexture = GUI.Toggle(gui.GetRect(120.0f), largeTexture, new GUIContent("large preview")); 214 | GUI.enabled = largeTexture; 215 | textureSize = EditorGUI.Slider(gui.GetRect(80.0f), textureSize, 35.0f, 300.0f); 216 | GUI.enabled = true; 217 | } 218 | else if (type == typeof(string).Name) { 219 | GUI.Label(gui.GetRect(80.0f), "Default text"); 220 | textFieldDefault = GUI.TextField(gui.GetRect(180.0f), textFieldDefault); 221 | 222 | GUI.Label(gui.GetRect(80.0f), "Text area: "); 223 | textArea = GUI.Toggle(gui.GetRect(80.0f), textArea, ""); 224 | } 225 | } 226 | else { 227 | GUI.Label(gui.GetRect(80.0f), "Read only"); 228 | } 229 | } 230 | 231 | public void DrawDragBox(InspectorPlusTracker gui) { 232 | gui.Line(EditorGUIUtility.singleLineHeight + 5.0f); 233 | var boxRect = gui.GetRect(900.0f); 234 | boxRect.height = space; 235 | GUI.Box(boxRect, ""); 236 | 237 | 238 | gui.Line(0); 239 | 240 | bool guiEnabled = GUI.enabled; 241 | 242 | numSpace = Mathf.Min(4, Mathf.FloorToInt(space / EditorGUIUtility.singleLineHeight)); 243 | 244 | for (int i = 0; i < numSpace; i += 1) { 245 | GUI.enabled = true; 246 | 247 | gui.GetRect(10.0f); 248 | labelEnabled[i] = GUI.Toggle(gui.GetRect(40.0f), labelEnabled[i], ""); 249 | 250 | GUI.enabled = labelEnabled[i]; 251 | GUI.Label(gui.GetRect(80.0f), "Label "); 252 | label[i] = EditorGUI.TextField(gui.GetRect(140.0f), "", label[i]); 253 | labelBold[i] = EditorGUI.Toggle(gui.GetRect(40.0f), labelBold[i]); 254 | 255 | GUI.enabled = true; 256 | 257 | for (int j = 0; j < 4; j += 1) { 258 | GUI.enabled = true; 259 | 260 | gui.GetRect(80.0f); 261 | 262 | //button 263 | buttonEnabled[i * 4 + j] = GUI.Toggle(gui.GetRect(40.0f), buttonEnabled[i * 4 + j], ""); 264 | 265 | 266 | GUI.enabled = buttonEnabled[i * 4 + j]; 267 | GUI.Label(gui.GetRect(80.0f), "Button "); 268 | buttonText[i * 4 + j] = EditorGUI.TextField(gui.GetRect(80.0f), "", buttonText[i * 4 + j]); 269 | 270 | GUI.Label(gui.GetRect(80.0f), "Callback "); 271 | buttonCallback[i * 4 + j] = EditorGUI.TextField(gui.GetRect(80.0f), "", buttonCallback[i * 4 + j]); 272 | 273 | bool buttonToCome = false; 274 | for (int k = j; k < 4; k += 1) 275 | if (buttonEnabled[i * 4 + k]) 276 | buttonToCome = true; 277 | 278 | if (!buttonToCome || j == 3) { 279 | GUI.enabled = true; 280 | if (j > 1) { 281 | buttonCondense[i] = GUI.Toggle(gui.GetRect(40.0f), buttonCondense[i], new GUIContent("Condense")); 282 | } 283 | break; 284 | } 285 | } 286 | 287 | gui.Line(space / numSpace); 288 | } 289 | 290 | 291 | GUI.enabled = guiEnabled; 292 | 293 | boxRect.y += boxRect.height; 294 | boxRect.height = 5.0f; 295 | 296 | EditorGUIUtility.AddCursorRect(boxRect, MouseCursor.ResizeVertical); 297 | 298 | if (Event.current.type == EventType.mouseDown) { 299 | pressed = false; 300 | if (boxRect.Contains(Event.current.mousePosition)) { 301 | startpos = Event.current.mousePosition; 302 | pressed = true; 303 | 304 | Event.current.Use(); 305 | } 306 | } 307 | 308 | if (Event.current.type == EventType.mouseDrag && pressed) { 309 | space += (Event.current.mousePosition - startpos).y; 310 | startpos = Event.current.mousePosition; 311 | 312 | EditorWindow.GetWindow(typeof(InspectorPlusWindow)).Repaint(); 313 | space = Mathf.Clamp(space, 0.0f, 4 * 25.0f); 314 | 315 | GUI.changed = true; 316 | } 317 | 318 | if (Event.current.type == EventType.mouseUp) { 319 | pressed = false; 320 | } 321 | } 322 | } 323 | #endif -------------------------------------------------------------------------------- /Assets/InspectorPlus/Editor/InspectorPlusVar.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e42a4081743096244b5ab6b282e5945b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/InspectorPlus/Editor/InspectorPlusWindow.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using UnityEngine; 3 | using System.Collections.Generic; 4 | using UnityEditor; 5 | using System; 6 | using System.IO; 7 | 8 | public class InspectorPlusWindow : EditorWindow { 9 | public bool editing; 10 | public InspectorPlusManager manager; 11 | List names; 12 | InspectorPlusTracker editComp; 13 | Vector2 scrollPosition; 14 | Vector2 openScrollPosition; 15 | string searchFilter = ""; 16 | 17 | string AssetPath { 18 | get { return Path.GetDirectoryName(AssetDatabase.GetAssetPath(MonoScript.FromScriptableObject(this))); } 19 | } 20 | 21 | void OnEnable() { 22 | manager = (InspectorPlusManager) AssetDatabase.LoadAssetAtPath(AssetPath + "/InspectorPlus.asset", 23 | typeof(InspectorPlusManager)); 24 | 25 | if (manager != null) { 26 | return; 27 | } 28 | 29 | manager = (InspectorPlusManager) CreateInstance(typeof(InspectorPlusManager)); 30 | AssetDatabase.CreateAsset(manager, AssetPath + "/InspectorPlus.asset"); 31 | } 32 | 33 | void OnDisable() { 34 | manager.Save(); 35 | } 36 | 37 | [MenuItem("Window/Inspector++")] 38 | static void ShowWindow() { 39 | GetWindow(typeof(InspectorPlusWindow)); 40 | } 41 | 42 | void CreateNew(string name, string path, Type t) { 43 | if (manager.GetTracker(name) != null) { 44 | return; 45 | } 46 | 47 | manager.AddInspector(name, path); 48 | } 49 | 50 | void OnSelectionChange() { 51 | Repaint(); 52 | } 53 | 54 | public void OnGUI() { 55 | if (!editing) { 56 | DrawOpen(); 57 | } 58 | else { 59 | DrawEditor(); 60 | } 61 | } 62 | 63 | bool CanHaveEditor(MonoScript m) { 64 | if (m.GetClass() == null) { 65 | return false; 66 | } 67 | 68 | if (m.GetClass().IsSubclassOf(typeof(MonoBehaviour))) { 69 | return true; 70 | } 71 | 72 | if (m.GetClass().IsSubclassOf(typeof(ScriptableObject))) { 73 | if (!m.GetClass().IsSubclassOf(typeof(Editor)) && !m.GetClass().IsSubclassOf(typeof(EditorWindow))) { 74 | return true; 75 | } 76 | } 77 | 78 | return false; 79 | } 80 | 81 | void DrawOpenNameList(List names) { 82 | foreach (string n in names) { 83 | EditorGUILayout.BeginHorizontal(); 84 | 85 | GUILayout.Label(n, GUILayout.Width(200.0f)); 86 | GUILayout.Space(100.0f); 87 | 88 | if (GUILayout.Button("Edit", GUILayout.Width(180.0f))) { 89 | editing = true; 90 | manager.editName = n; 91 | } 92 | 93 | if (GUILayout.Button("Save to file", GUILayout.Width(100.0f))) { 94 | var filer = new InspectorPlusFiler(); 95 | filer.WriteToFile(n, manager.GetTracker(n), "InspectorPlusOutput/Editor"); 96 | AssetDatabase.Refresh(); 97 | EditorUtility.DisplayDialog("Inspector save to file", @" 98 | Your inspector has been saved to " + n + @"InspectorPlus.cs. Feel free to distribute this file!", 99 | "Ok"); 100 | } 101 | 102 | if (GUILayout.Button("Delete", GUILayout.Width(100.0f))) { 103 | manager.DeleteInspector(n); 104 | AssetDatabase.Refresh(); 105 | Repaint(); 106 | } 107 | 108 | EditorGUILayout.EndHorizontal(); 109 | } 110 | } 111 | 112 | void DrawOpen() { 113 | //gets only existing editors. 114 | GUILayout.BeginHorizontal(GUILayout.Width(Screen.width)); 115 | GUILayout.FlexibleSpace(); //left sidebar 116 | 117 | GUILayout.BeginVertical(); 118 | GUILayout.Space(50.0f); 119 | GUILayout.BeginVertical("Box", GUILayout.Width(700.0f)); 120 | 121 | 122 | GUILayout.BeginHorizontal(); 123 | searchFilter = GUILayout.TextField(searchFilter, "SearchTextField", GUILayout.Width(670.0f)); 124 | if (GUILayout.Button("", "SearchCancelButton", GUILayout.Width(20.0f))) { 125 | searchFilter = ""; 126 | } 127 | GUILayout.EndHorizontal(); 128 | 129 | GUILayout.BeginVertical(GUILayout.Width(700.0f)); 130 | openScrollPosition = GUILayout.BeginScrollView(openScrollPosition, false, false, GUIStyle.none, GUI.skin.GetStyle("verticalScrollbar"), GUILayout.Width(700.0f)); 131 | 132 | //draw existing editors 133 | DrawOpenNameList(manager.GetNames(searchFilter)); 134 | 135 | GUILayout.Space(20.0f); 136 | 137 | GUILayout.EndScrollView(); 138 | GUILayout.EndVertical(); 139 | 140 | GUILayout.EndVertical(); 141 | GUILayout.Space(40.0f); 142 | 143 | GUILayout.BeginHorizontal(GUILayout.Width(700.0f)); 144 | GUILayout.FlexibleSpace(); 145 | 146 | GUILayout.BeginVertical("Button", GUILayout.Width(180.0f)); 147 | 148 | UnityEngine.Object[] objs = Selection.GetFiltered(typeof(MonoScript), SelectionMode.Assets); 149 | var selected = new List(); 150 | 151 | foreach (UnityEngine.Object o in objs) { 152 | var m = (MonoScript) o; 153 | 154 | if (m != null && CanHaveEditor(m)) { 155 | GUILayout.BeginHorizontal(); 156 | GUILayout.FlexibleSpace(); 157 | GUILayout.Label(m.GetClass().Name); 158 | GUILayout.FlexibleSpace(); 159 | GUILayout.EndHorizontal(); 160 | selected.Add(m); 161 | } 162 | } 163 | 164 | if (selected.Count == 0) { 165 | GUILayout.Label("Select scripts from the project view that need Inspector++'s magic!"); 166 | GUI.enabled = false; 167 | } 168 | 169 | if (GUILayout.Button("Create")) { 170 | foreach (MonoScript m in selected) { 171 | CreateNew(m.GetClass().Name, Application.dataPath + AssetDatabase.GetAssetPath(m).Replace("Assets", ""), 172 | m.GetClass()); 173 | } 174 | 175 | AssetDatabase.Refresh(); 176 | } 177 | 178 | GUI.enabled = true; 179 | 180 | GUILayout.EndVertical(); 181 | GUILayout.FlexibleSpace(); 182 | GUILayout.EndHorizontal(); 183 | 184 | GUILayout.EndVertical(); 185 | 186 | //right sidebar 187 | GUILayout.FlexibleSpace(); 188 | GUILayout.EndHorizontal(); 189 | } 190 | 191 | void DrawEditor() { 192 | editComp = manager.GetTracker(manager.editName); 193 | 194 | scrollPosition = GUILayout.BeginScrollView(scrollPosition); 195 | editComp.DrawGUI(); 196 | GUILayout.EndScrollView(); 197 | 198 | GUILayout.Space(10.0f); 199 | GUILayout.FlexibleSpace(); 200 | 201 | GUILayout.BeginHorizontal(); 202 | GUILayout.FlexibleSpace(); 203 | 204 | if (GUILayout.Button("Back")) { 205 | editing = false; 206 | } 207 | 208 | GUILayout.FlexibleSpace(); 209 | GUILayout.EndHorizontal(); 210 | GUILayout.Space(10.0f); 211 | GUILayout.FlexibleSpace(); 212 | } 213 | } 214 | #endif -------------------------------------------------------------------------------- /Assets/InspectorPlus/Editor/InspectorPlusWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3a88d4bd8ae0e34cb60c89b5a07a850 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/InspectorPlus/InspectorPlusType.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using UnityEngine; 3 | using System.Collections; 4 | using System; 5 | using System.Reflection; 6 | 7 | public class InspectorPlusType { 8 | static AppDomain app = AppDomain.CurrentDomain; 9 | 10 | public static Type Get(string name) 11 | { 12 | foreach(Assembly a in app.GetAssemblies()) { 13 | var types = a.GetTypes(); 14 | 15 | foreach (var type in types) { 16 | if (type.Name.ToLower() == name.ToLower()) { 17 | return type; 18 | } 19 | } 20 | } 21 | 22 | return null; 23 | } 24 | } 25 | #endif -------------------------------------------------------------------------------- /Assets/InspectorPlus/InspectorPlusType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b336007cdf6ee24fba11eb413ba82ad 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/InspectorPlusTestScript.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | 6 | 7 | namespace TestSpace 8 | { 9 | [Serializable] 10 | public class MyTestClass2 11 | { 12 | public int x; 13 | public float y; 14 | public bool z; 15 | } 16 | 17 | 18 | [Serializable] 19 | public class MyTestClass 20 | { 21 | public int x; 22 | public float y; 23 | public bool z; 24 | 25 | public MyTestClass2 tc; 26 | } 27 | 28 | 29 | public class InspectorPlusTestScript : MonoBehaviour 30 | { 31 | public Transform target; 32 | public Vector3 lookAtPoint; 33 | public Vector3 direction; 34 | 35 | public Vector2 screenPos; 36 | 37 | public float maxSpeed; 38 | public float health; 39 | 40 | public int MyInt; 41 | 42 | public int level; 43 | public int myAwesomeInt; 44 | 45 | public Transform[] myTransforms = new Transform[5]; 46 | 47 | 48 | /// 49 | /// This tooltip is a summary 50 | /// 51 | [SerializeField] private float dontHideMe; 52 | 53 | public string stringTest; 54 | 55 | /// 56 | /// Rotation (with handle in scene) 57 | /// 58 | public Quaternion rotation; 59 | 60 | public bool toggleField = false; 61 | public bool toggle1 = true; 62 | public float toggleStr = 0.0f; 63 | 64 | public float my_ugly_var; 65 | 66 | public Texture myTextureWithLargePreview; 67 | 68 | public Texture textureTest; 69 | public MyTestClass myTestClass; 70 | public List intList; 71 | 72 | public Rect test; 73 | 74 | 75 | // Use this for initialization 76 | private void Start() 77 | { 78 | 79 | } 80 | 81 | // Update is called once per frame 82 | private void Update() 83 | { 84 | 85 | } 86 | 87 | 88 | 89 | private void OnButton() 90 | { 91 | Debug.Log("Button!"); 92 | } 93 | 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /Assets/InspectorPlusTestScript.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 60d9de1fdfa01f3438827c713f86b05a 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/test.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 8 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1} 42 | --- !u!157 &3 43 | LightmapSettings: 44 | m_ObjectHideFlags: 0 45 | serializedVersion: 11 46 | m_GIWorkflowMode: 0 47 | m_GISettings: 48 | serializedVersion: 2 49 | m_BounceScale: 1 50 | m_IndirectOutputScale: 1 51 | m_AlbedoBoost: 1 52 | m_TemporalCoherenceThreshold: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 9 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_TextureWidth: 1024 61 | m_TextureHeight: 1024 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 1 65 | m_CompAOExponentDirect: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVRFiltering: 0 81 | m_PVRFilteringMode: 1 82 | m_PVRCulling: 1 83 | m_PVRFilteringGaussRadiusDirect: 1 84 | m_PVRFilteringGaussRadiusIndirect: 5 85 | m_PVRFilteringGaussRadiusAO: 2 86 | m_PVRFilteringAtrousColorSigma: 1 87 | m_PVRFilteringAtrousNormalSigma: 1 88 | m_PVRFilteringAtrousPositionSigma: 1 89 | m_LightingDataAsset: {fileID: 0} 90 | m_UseShadowmask: 1 91 | --- !u!196 &4 92 | NavMeshSettings: 93 | serializedVersion: 2 94 | m_ObjectHideFlags: 0 95 | m_BuildSettings: 96 | serializedVersion: 2 97 | agentTypeID: 0 98 | agentRadius: 0.5 99 | agentHeight: 2 100 | agentSlope: 45 101 | agentClimb: 0.4 102 | ledgeDropHeight: 0 103 | maxJumpAcrossDistance: 0 104 | minRegionArea: 2 105 | manualCellSize: 0 106 | cellSize: 0.16666667 107 | manualTileSize: 0 108 | tileSize: 256 109 | accuratePlacement: 0 110 | m_NavMeshData: {fileID: 0} 111 | --- !u!1 &179896887 112 | GameObject: 113 | m_ObjectHideFlags: 0 114 | m_PrefabParentObject: {fileID: 0} 115 | m_PrefabInternal: {fileID: 0} 116 | serializedVersion: 5 117 | m_Component: 118 | - component: {fileID: 179896893} 119 | - component: {fileID: 179896892} 120 | - component: {fileID: 179896891} 121 | - component: {fileID: 179896890} 122 | - component: {fileID: 179896889} 123 | - component: {fileID: 179896888} 124 | m_Layer: 0 125 | m_Name: Main Camera 126 | m_TagString: MainCamera 127 | m_Icon: {fileID: 0} 128 | m_NavMeshLayer: 0 129 | m_StaticEditorFlags: 0 130 | m_IsActive: 1 131 | --- !u!114 &179896888 132 | MonoBehaviour: 133 | m_ObjectHideFlags: 0 134 | m_PrefabParentObject: {fileID: 0} 135 | m_PrefabInternal: {fileID: 0} 136 | m_GameObject: {fileID: 179896887} 137 | m_Enabled: 1 138 | m_EditorHideFlags: 0 139 | m_Script: {fileID: 11500000, guid: 60d9de1fdfa01f3438827c713f86b05a, type: 3} 140 | m_Name: 141 | m_EditorClassIdentifier: 142 | target: {fileID: 0} 143 | lookAtPoint: {x: 0, y: 0, z: 0} 144 | direction: {x: 0, y: 0, z: 0} 145 | screenPos: {x: 0, y: 0} 146 | maxSpeed: 0 147 | health: 0 148 | MyInt: 0 149 | level: 0 150 | myAwesomeInt: 0 151 | myTransforms: 152 | - {fileID: 0} 153 | - {fileID: 0} 154 | - {fileID: 0} 155 | - {fileID: 0} 156 | - {fileID: 0} 157 | dontHideMe: 0 158 | stringTest: 159 | rotation: {x: 0, y: 0, z: 0, w: 0} 160 | toggleField: 0 161 | toggle1: 1 162 | toggleStr: 0 163 | my_ugly_var: 0 164 | myTextureWithLargePreview: {fileID: 0} 165 | textureTest: {fileID: 0} 166 | myTestClass: 167 | x: 0 168 | y: 0 169 | z: 0 170 | tc: 171 | x: 0 172 | y: 0 173 | z: 0 174 | intList: [] 175 | test: 176 | serializedVersion: 2 177 | x: 0 178 | y: 0 179 | width: 0 180 | height: 0 181 | --- !u!81 &179896889 182 | AudioListener: 183 | m_ObjectHideFlags: 0 184 | m_PrefabParentObject: {fileID: 0} 185 | m_PrefabInternal: {fileID: 0} 186 | m_GameObject: {fileID: 179896887} 187 | m_Enabled: 1 188 | --- !u!124 &179896890 189 | Behaviour: 190 | m_ObjectHideFlags: 0 191 | m_PrefabParentObject: {fileID: 0} 192 | m_PrefabInternal: {fileID: 0} 193 | m_GameObject: {fileID: 179896887} 194 | m_Enabled: 1 195 | --- !u!92 &179896891 196 | Behaviour: 197 | m_ObjectHideFlags: 0 198 | m_PrefabParentObject: {fileID: 0} 199 | m_PrefabInternal: {fileID: 0} 200 | m_GameObject: {fileID: 179896887} 201 | m_Enabled: 1 202 | --- !u!20 &179896892 203 | Camera: 204 | m_ObjectHideFlags: 0 205 | m_PrefabParentObject: {fileID: 0} 206 | m_PrefabInternal: {fileID: 0} 207 | m_GameObject: {fileID: 179896887} 208 | m_Enabled: 1 209 | serializedVersion: 2 210 | m_ClearFlags: 1 211 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 212 | m_NormalizedViewPortRect: 213 | serializedVersion: 2 214 | x: 0 215 | y: 0 216 | width: 1 217 | height: 1 218 | near clip plane: 0.3 219 | far clip plane: 1000 220 | field of view: 60 221 | orthographic: 0 222 | orthographic size: 5 223 | m_Depth: -1 224 | m_CullingMask: 225 | serializedVersion: 2 226 | m_Bits: 4294967295 227 | m_RenderingPath: -1 228 | m_TargetTexture: {fileID: 0} 229 | m_TargetDisplay: 0 230 | m_TargetEye: 3 231 | m_HDR: 1 232 | m_AllowMSAA: 1 233 | m_ForceIntoRT: 0 234 | m_OcclusionCulling: 1 235 | m_StereoConvergence: 10 236 | m_StereoSeparation: 0.022 237 | m_StereoMirrorMode: 0 238 | --- !u!4 &179896893 239 | Transform: 240 | m_ObjectHideFlags: 0 241 | m_PrefabParentObject: {fileID: 0} 242 | m_PrefabInternal: {fileID: 0} 243 | m_GameObject: {fileID: 179896887} 244 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 245 | m_LocalPosition: {x: 0, y: 1, z: -10} 246 | m_LocalScale: {x: 1, y: 1, z: 1} 247 | m_Children: [] 248 | m_Father: {fileID: 0} 249 | m_RootOrder: 0 250 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 251 | --- !u!1 &1482824189 252 | GameObject: 253 | m_ObjectHideFlags: 0 254 | m_PrefabParentObject: {fileID: 0} 255 | m_PrefabInternal: {fileID: 0} 256 | serializedVersion: 5 257 | m_Component: 258 | - component: {fileID: 1482824191} 259 | - component: {fileID: 1482824190} 260 | m_Layer: 0 261 | m_Name: Directional Light 262 | m_TagString: Untagged 263 | m_Icon: {fileID: 0} 264 | m_NavMeshLayer: 0 265 | m_StaticEditorFlags: 0 266 | m_IsActive: 1 267 | --- !u!108 &1482824190 268 | Light: 269 | m_ObjectHideFlags: 0 270 | m_PrefabParentObject: {fileID: 0} 271 | m_PrefabInternal: {fileID: 0} 272 | m_GameObject: {fileID: 1482824189} 273 | m_Enabled: 1 274 | serializedVersion: 8 275 | m_Type: 1 276 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 277 | m_Intensity: 1 278 | m_Range: 10 279 | m_SpotAngle: 30 280 | m_CookieSize: 10 281 | m_Shadows: 282 | m_Type: 2 283 | m_Resolution: -1 284 | m_CustomResolution: -1 285 | m_Strength: 1 286 | m_Bias: 0.05 287 | m_NormalBias: 0.4 288 | m_NearPlane: 0.2 289 | m_Cookie: {fileID: 0} 290 | m_DrawHalo: 0 291 | m_Flare: {fileID: 0} 292 | m_RenderMode: 0 293 | m_CullingMask: 294 | serializedVersion: 2 295 | m_Bits: 4294967295 296 | m_Lightmapping: 4 297 | m_AreaSize: {x: 1, y: 1} 298 | m_BounceIntensity: 1 299 | m_FalloffTable: 300 | m_Table[0]: 0 301 | m_Table[1]: 0 302 | m_Table[2]: 0 303 | m_Table[3]: 0 304 | m_Table[4]: 0 305 | m_Table[5]: 0 306 | m_Table[6]: 0 307 | m_Table[7]: 0 308 | m_Table[8]: 0 309 | m_Table[9]: 0 310 | m_Table[10]: 0 311 | m_Table[11]: 0 312 | m_Table[12]: 0 313 | m_ColorTemperature: 6570 314 | m_UseColorTemperature: 0 315 | m_ShadowRadius: 0 316 | m_ShadowAngle: 0 317 | --- !u!4 &1482824191 318 | Transform: 319 | m_ObjectHideFlags: 0 320 | m_PrefabParentObject: {fileID: 0} 321 | m_PrefabInternal: {fileID: 0} 322 | m_GameObject: {fileID: 1482824189} 323 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 324 | m_LocalPosition: {x: 0, y: 3, z: 0} 325 | m_LocalScale: {x: 1, y: 1, z: 1} 326 | m_Children: [] 327 | m_Father: {fileID: 0} 328 | m_RootOrder: 1 329 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 330 | -------------------------------------------------------------------------------- /Assets/test.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b92c40d1559676409c391f74c2a61d0 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Arthur Brussee 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MainGithub.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArthurBrussee/InspectorPlusPlus/3dada193384ee4892d63cedb031c375f4aab78a1/MainGithub.PNG -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | m_SpeedOfSound: 347 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_DSPBufferSize: 0 12 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | m_Gravity: {x: 0, y: -9.81000042, z: 0} 7 | m_DefaultMaterial: {fileID: 0} 8 | m_BounceThreshold: 2 9 | m_SleepVelocity: .150000006 10 | m_SleepAngularVelocity: .140000001 11 | m_MaxAngularVelocity: 7 12 | m_MinPenetrationForPenalty: .00999999978 13 | m_SolverIterationCount: 6 14 | m_RaycastsHitTriggers: 1 15 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 16 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_WebSecurityEmulationEnabled: 0 10 | m_WebSecurityEmulationHostUrl: http://www.mydomain.com/mygame.unity3d 11 | m_DefaultBehaviorMode: 1702065251 12 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 9 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0} 39 | m_PreloadedShaders: [] 40 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 41 | type: 0} 42 | m_TierSettings_Tier1: 43 | renderingPath: 1 44 | useCascadedShadowMaps: 1 45 | m_TierSettings_Tier2: 46 | renderingPath: 1 47 | useCascadedShadowMaps: 1 48 | m_TierSettings_Tier3: 49 | renderingPath: 1 50 | useCascadedShadowMaps: 1 51 | m_DefaultRenderingPath: 1 52 | m_DefaultMobileRenderingPath: 1 53 | m_TierSettings: [] 54 | m_LightmapStripping: 0 55 | m_FogStripping: 0 56 | m_LightmapKeepPlain: 1 57 | m_LightmapKeepDirCombined: 1 58 | m_LightmapKeepDirSeparate: 1 59 | m_LightmapKeepDynamicPlain: 1 60 | m_LightmapKeepDynamicDirCombined: 1 61 | m_LightmapKeepDynamicDirSeparate: 1 62 | m_FogKeepLinear: 1 63 | m_FogKeepExp: 1 64 | m_FogKeepExp2: 1 65 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | m_Axes: 7 | - serializedVersion: 3 8 | m_Name: Horizontal 9 | descriptiveName: 10 | descriptiveNegativeName: 11 | negativeButton: left 12 | positiveButton: right 13 | altNegativeButton: a 14 | altPositiveButton: d 15 | gravity: 3 16 | dead: .00100000005 17 | sensitivity: 3 18 | snap: 1 19 | invert: 0 20 | type: 0 21 | axis: 0 22 | joyNum: 0 23 | - serializedVersion: 3 24 | m_Name: Vertical 25 | descriptiveName: 26 | descriptiveNegativeName: 27 | negativeButton: down 28 | positiveButton: up 29 | altNegativeButton: s 30 | altPositiveButton: w 31 | gravity: 3 32 | dead: .00100000005 33 | sensitivity: 3 34 | snap: 1 35 | invert: 0 36 | type: 0 37 | axis: 0 38 | joyNum: 0 39 | - serializedVersion: 3 40 | m_Name: Fire1 41 | descriptiveName: 42 | descriptiveNegativeName: 43 | negativeButton: 44 | positiveButton: left ctrl 45 | altNegativeButton: 46 | altPositiveButton: mouse 0 47 | gravity: 1000 48 | dead: .00100000005 49 | sensitivity: 1000 50 | snap: 0 51 | invert: 0 52 | type: 0 53 | axis: 0 54 | joyNum: 0 55 | - serializedVersion: 3 56 | m_Name: Fire2 57 | descriptiveName: 58 | descriptiveNegativeName: 59 | negativeButton: 60 | positiveButton: left alt 61 | altNegativeButton: 62 | altPositiveButton: mouse 1 63 | gravity: 1000 64 | dead: .00100000005 65 | sensitivity: 1000 66 | snap: 0 67 | invert: 0 68 | type: 0 69 | axis: 0 70 | joyNum: 0 71 | - serializedVersion: 3 72 | m_Name: Fire3 73 | descriptiveName: 74 | descriptiveNegativeName: 75 | negativeButton: 76 | positiveButton: left cmd 77 | altNegativeButton: 78 | altPositiveButton: mouse 2 79 | gravity: 1000 80 | dead: .00100000005 81 | sensitivity: 1000 82 | snap: 0 83 | invert: 0 84 | type: 0 85 | axis: 0 86 | joyNum: 0 87 | - serializedVersion: 3 88 | m_Name: Jump 89 | descriptiveName: 90 | descriptiveNegativeName: 91 | negativeButton: 92 | positiveButton: space 93 | altNegativeButton: 94 | altPositiveButton: 95 | gravity: 1000 96 | dead: .00100000005 97 | sensitivity: 1000 98 | snap: 0 99 | invert: 0 100 | type: 0 101 | axis: 0 102 | joyNum: 0 103 | - serializedVersion: 3 104 | m_Name: Mouse X 105 | descriptiveName: 106 | descriptiveNegativeName: 107 | negativeButton: 108 | positiveButton: 109 | altNegativeButton: 110 | altPositiveButton: 111 | gravity: 0 112 | dead: 0 113 | sensitivity: .100000001 114 | snap: 0 115 | invert: 0 116 | type: 1 117 | axis: 0 118 | joyNum: 0 119 | - serializedVersion: 3 120 | m_Name: Mouse Y 121 | descriptiveName: 122 | descriptiveNegativeName: 123 | negativeButton: 124 | positiveButton: 125 | altNegativeButton: 126 | altPositiveButton: 127 | gravity: 0 128 | dead: 0 129 | sensitivity: .100000001 130 | snap: 0 131 | invert: 0 132 | type: 1 133 | axis: 1 134 | joyNum: 0 135 | - serializedVersion: 3 136 | m_Name: Mouse ScrollWheel 137 | descriptiveName: 138 | descriptiveNegativeName: 139 | negativeButton: 140 | positiveButton: 141 | altNegativeButton: 142 | altPositiveButton: 143 | gravity: 0 144 | dead: 0 145 | sensitivity: .100000001 146 | snap: 0 147 | invert: 0 148 | type: 1 149 | axis: 2 150 | joyNum: 0 151 | - serializedVersion: 3 152 | m_Name: Horizontal 153 | descriptiveName: 154 | descriptiveNegativeName: 155 | negativeButton: 156 | positiveButton: 157 | altNegativeButton: 158 | altPositiveButton: 159 | gravity: 0 160 | dead: .189999998 161 | sensitivity: 1 162 | snap: 0 163 | invert: 0 164 | type: 2 165 | axis: 0 166 | joyNum: 0 167 | - serializedVersion: 3 168 | m_Name: Vertical 169 | descriptiveName: 170 | descriptiveNegativeName: 171 | negativeButton: 172 | positiveButton: 173 | altNegativeButton: 174 | altPositiveButton: 175 | gravity: 0 176 | dead: .189999998 177 | sensitivity: 1 178 | snap: 0 179 | invert: 1 180 | type: 2 181 | axis: 1 182 | joyNum: 0 183 | - serializedVersion: 3 184 | m_Name: Fire1 185 | descriptiveName: 186 | descriptiveNegativeName: 187 | negativeButton: 188 | positiveButton: joystick button 0 189 | altNegativeButton: 190 | altPositiveButton: 191 | gravity: 1000 192 | dead: .00100000005 193 | sensitivity: 1000 194 | snap: 0 195 | invert: 0 196 | type: 0 197 | axis: 0 198 | joyNum: 0 199 | - serializedVersion: 3 200 | m_Name: Fire2 201 | descriptiveName: 202 | descriptiveNegativeName: 203 | negativeButton: 204 | positiveButton: joystick button 1 205 | altNegativeButton: 206 | altPositiveButton: 207 | gravity: 1000 208 | dead: .00100000005 209 | sensitivity: 1000 210 | snap: 0 211 | invert: 0 212 | type: 0 213 | axis: 0 214 | joyNum: 0 215 | - serializedVersion: 3 216 | m_Name: Fire3 217 | descriptiveName: 218 | descriptiveNegativeName: 219 | negativeButton: 220 | positiveButton: joystick button 2 221 | altNegativeButton: 222 | altPositiveButton: 223 | gravity: 1000 224 | dead: .00100000005 225 | sensitivity: 1000 226 | snap: 0 227 | invert: 0 228 | type: 0 229 | axis: 0 230 | joyNum: 0 231 | - serializedVersion: 3 232 | m_Name: Jump 233 | descriptiveName: 234 | descriptiveNegativeName: 235 | negativeButton: 236 | positiveButton: joystick button 3 237 | altNegativeButton: 238 | altPositiveButton: 239 | gravity: 1000 240 | dead: .00100000005 241 | sensitivity: 1000 242 | snap: 0 243 | invert: 0 244 | type: 0 245 | axis: 0 246 | joyNum: 0 247 | - serializedVersion: 3 248 | m_Name: PS3ControllerRightX 249 | descriptiveName: 250 | descriptiveNegativeName: 251 | negativeButton: 252 | positiveButton: 253 | altNegativeButton: 254 | altPositiveButton: 255 | gravity: 0 256 | dead: .189999998 257 | sensitivity: 1 258 | snap: 0 259 | invert: 0 260 | type: 2 261 | axis: 2 262 | joyNum: 0 263 | - serializedVersion: 3 264 | m_Name: PS3ControllerRightY 265 | descriptiveName: 266 | descriptiveNegativeName: 267 | negativeButton: 268 | positiveButton: 269 | altNegativeButton: 270 | altPositiveButton: 271 | gravity: 0 272 | dead: .189999998 273 | sensitivity: 1 274 | snap: 0 275 | invert: 0 276 | type: 2 277 | axis: 3 278 | joyNum: 0 279 | - serializedVersion: 3 280 | m_Name: Xbox360ControllerRightX 281 | descriptiveName: 282 | descriptiveNegativeName: 283 | negativeButton: 284 | positiveButton: 285 | altNegativeButton: 286 | altPositiveButton: 287 | gravity: 0 288 | dead: .189999998 289 | sensitivity: 1 290 | snap: 0 291 | invert: 0 292 | type: 2 293 | axis: 3 294 | joyNum: 0 295 | - serializedVersion: 3 296 | m_Name: Xbox360ControllerRightY 297 | descriptiveName: 298 | descriptiveNegativeName: 299 | negativeButton: 300 | positiveButton: 301 | altNegativeButton: 302 | altPositiveButton: 303 | gravity: 0 304 | dead: .189999998 305 | sensitivity: 1 306 | snap: 0 307 | invert: 0 308 | type: 2 309 | axis: 4 310 | joyNum: 0 311 | - serializedVersion: 3 312 | m_Name: Xbox360ControllerDPadX 313 | descriptiveName: 314 | descriptiveNegativeName: 315 | negativeButton: 316 | positiveButton: 317 | altNegativeButton: 318 | altPositiveButton: 319 | gravity: 0 320 | dead: .189999998 321 | sensitivity: 1 322 | snap: 0 323 | invert: 0 324 | type: 2 325 | axis: 5 326 | joyNum: 0 327 | - serializedVersion: 3 328 | m_Name: Xbox360ControllerDPadY 329 | descriptiveName: 330 | descriptiveNegativeName: 331 | negativeButton: 332 | positiveButton: 333 | altNegativeButton: 334 | altPositiveButton: 335 | gravity: 0 336 | dead: .189999998 337 | sensitivity: 1 338 | snap: 0 339 | invert: 0 340 | type: 2 341 | axis: 6 342 | joyNum: 0 343 | - serializedVersion: 3 344 | m_Name: Xbox360ControllerTriggers 345 | descriptiveName: 346 | descriptiveNegativeName: 347 | negativeButton: 348 | positiveButton: 349 | altNegativeButton: 350 | altPositiveButton: 351 | gravity: 0 352 | dead: .189999998 353 | sensitivity: 1 354 | snap: 0 355 | invert: 0 356 | type: 2 357 | axis: 2 358 | joyNum: 0 359 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshLayers: 5 | m_ObjectHideFlags: 0 6 | Built-in Layer 0: 7 | name: Default 8 | cost: 1 9 | editType: 2 10 | Built-in Layer 1: 11 | name: Not Walkable 12 | cost: 1 13 | editType: 0 14 | Built-in Layer 2: 15 | name: Jump 16 | cost: 2 17 | editType: 2 18 | User Layer 0: 19 | name: Terrain 20 | cost: 50 21 | editType: 3 22 | User Layer 1: 23 | name: 24 | cost: 1 25 | editType: 3 26 | User Layer 2: 27 | name: 28 | cost: 1 29 | editType: 3 30 | User Layer 3: 31 | name: 32 | cost: 1 33 | editType: 3 34 | User Layer 4: 35 | name: 36 | cost: 1 37 | editType: 3 38 | User Layer 5: 39 | name: 40 | cost: 1 41 | editType: 3 42 | User Layer 6: 43 | name: 44 | cost: 1 45 | editType: 3 46 | User Layer 7: 47 | name: 48 | cost: 1 49 | editType: 3 50 | User Layer 8: 51 | name: 52 | cost: 1 53 | editType: 3 54 | User Layer 9: 55 | name: 56 | cost: 1 57 | editType: 3 58 | User Layer 10: 59 | name: 60 | cost: 1 61 | editType: 3 62 | User Layer 11: 63 | name: 64 | cost: 1 65 | editType: 3 66 | User Layer 12: 67 | name: 68 | cost: 1 69 | editType: 3 70 | User Layer 13: 71 | name: 72 | cost: 1 73 | editType: 3 74 | User Layer 14: 75 | name: 76 | cost: 1 77 | editType: 3 78 | User Layer 15: 79 | name: 80 | cost: 1 81 | editType: 3 82 | User Layer 16: 83 | name: 84 | cost: 1 85 | editType: 3 86 | User Layer 17: 87 | name: 88 | cost: 1 89 | editType: 3 90 | User Layer 18: 91 | name: 92 | cost: 1 93 | editType: 3 94 | User Layer 19: 95 | name: 96 | cost: 1 97 | editType: 3 98 | User Layer 20: 99 | name: 100 | cost: 1 101 | editType: 3 102 | User Layer 21: 103 | name: 104 | cost: 1 105 | editType: 3 106 | User Layer 22: 107 | name: 108 | cost: 1 109 | editType: 3 110 | User Layer 23: 111 | name: 112 | cost: 1 113 | editType: 3 114 | User Layer 24: 115 | name: 116 | cost: 1 117 | editType: 3 118 | User Layer 25: 119 | name: 120 | cost: 1 121 | editType: 3 122 | User Layer 26: 123 | name: 124 | cost: 1 125 | editType: 3 126 | User Layer 27: 127 | name: 128 | cost: 1 129 | editType: 3 130 | User Layer 28: 131 | name: 132 | cost: 1 133 | editType: 3 134 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshLayers.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshLayers: 5 | m_ObjectHideFlags: 0 6 | Built-in Layer 0: 7 | name: Default 8 | cost: 1 9 | editType: 2 10 | Built-in Layer 1: 11 | name: Not Walkable 12 | cost: 1 13 | editType: 0 14 | Built-in Layer 2: 15 | name: Jump 16 | cost: 2 17 | editType: 2 18 | User Layer 0: 19 | name: Terrain 20 | cost: 50 21 | editType: 3 22 | User Layer 1: 23 | name: 24 | cost: 1 25 | editType: 3 26 | User Layer 2: 27 | name: 28 | cost: 1 29 | editType: 3 30 | User Layer 3: 31 | name: 32 | cost: 1 33 | editType: 3 34 | User Layer 4: 35 | name: 36 | cost: 1 37 | editType: 3 38 | User Layer 5: 39 | name: 40 | cost: 1 41 | editType: 3 42 | User Layer 6: 43 | name: 44 | cost: 1 45 | editType: 3 46 | User Layer 7: 47 | name: 48 | cost: 1 49 | editType: 3 50 | User Layer 8: 51 | name: 52 | cost: 1 53 | editType: 3 54 | User Layer 9: 55 | name: 56 | cost: 1 57 | editType: 3 58 | User Layer 10: 59 | name: 60 | cost: 1 61 | editType: 3 62 | User Layer 11: 63 | name: 64 | cost: 1 65 | editType: 3 66 | User Layer 12: 67 | name: 68 | cost: 1 69 | editType: 3 70 | User Layer 13: 71 | name: 72 | cost: 1 73 | editType: 3 74 | User Layer 14: 75 | name: 76 | cost: 1 77 | editType: 3 78 | User Layer 15: 79 | name: 80 | cost: 1 81 | editType: 3 82 | User Layer 16: 83 | name: 84 | cost: 1 85 | editType: 3 86 | User Layer 17: 87 | name: 88 | cost: 1 89 | editType: 3 90 | User Layer 18: 91 | name: 92 | cost: 1 93 | editType: 3 94 | User Layer 19: 95 | name: 96 | cost: 1 97 | editType: 3 98 | User Layer 20: 99 | name: 100 | cost: 1 101 | editType: 3 102 | User Layer 21: 103 | name: 104 | cost: 1 105 | editType: 3 106 | User Layer 22: 107 | name: 108 | cost: 1 109 | editType: 3 110 | User Layer 23: 111 | name: 112 | cost: 1 113 | editType: 3 114 | User Layer 24: 115 | name: 116 | cost: 1 117 | editType: 3 118 | User Layer 25: 119 | name: 120 | cost: 1 121 | editType: 3 122 | User Layer 26: 123 | name: 124 | cost: 1 125 | editType: 3 126 | User Layer 27: 127 | name: 128 | cost: 1 129 | editType: 3 130 | User Layer 28: 131 | name: 132 | cost: 1 133 | editType: 3 134 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | m_Gravity: {x: 0, y: -9.81000042} 7 | m_DefaultMaterial: {fileID: 0} 8 | m_VelocityIterations: 8 9 | m_PositionIterations: 3 10 | m_RaycastsHitTriggers: 1 11 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 12 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | productGUID: 07a996f3a1fa743948c9913c0cac8a72 8 | AndroidProfiler: 0 9 | defaultScreenOrientation: 3 10 | targetDevice: 2 11 | useOnDemandResources: 0 12 | accelerometerFrequency: 60 13 | companyName: Unity 14 | productName: Sample Assets 15 | defaultCursor: {fileID: 0} 16 | cursorHotspot: {x: 0, y: 0} 17 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 18 | m_ShowUnitySplashScreen: 1 19 | m_ShowUnitySplashLogo: 1 20 | m_SplashScreenOverlayOpacity: 1 21 | m_SplashScreenAnimation: 1 22 | m_SplashScreenLogoStyle: 1 23 | m_SplashScreenDrawMode: 0 24 | m_SplashScreenBackgroundAnimationZoom: 1 25 | m_SplashScreenLogoAnimationZoom: 1 26 | m_SplashScreenBackgroundLandscapeAspect: 1 27 | m_SplashScreenBackgroundPortraitAspect: 1 28 | m_SplashScreenBackgroundLandscapeUvs: 29 | serializedVersion: 2 30 | x: 0 31 | y: 0 32 | width: 1 33 | height: 1 34 | m_SplashScreenBackgroundPortraitUvs: 35 | serializedVersion: 2 36 | x: 0 37 | y: 0 38 | width: 1 39 | height: 1 40 | m_SplashScreenLogos: [] 41 | m_SplashScreenBackgroundLandscape: {fileID: 0} 42 | m_SplashScreenBackgroundPortrait: {fileID: 0} 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 1024 48 | defaultScreenHeightWeb: 576 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 1 51 | m_MTRendering: 1 52 | m_MobileMTRendering: 0 53 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 54 | iosShowActivityIndicatorOnLoading: -1 55 | androidShowActivityIndicatorOnLoading: -1 56 | tizenShowActivityIndicatorOnLoading: -1 57 | iosAppInBackgroundBehavior: 0 58 | displayResolutionDialog: 1 59 | iosAllowHTTPDownload: 1 60 | allowedAutorotateToPortrait: 1 61 | allowedAutorotateToPortraitUpsideDown: 1 62 | allowedAutorotateToLandscapeRight: 1 63 | allowedAutorotateToLandscapeLeft: 1 64 | useOSAutorotation: 1 65 | use32BitDisplayBuffer: 1 66 | disableDepthAndStencilBuffers: 0 67 | defaultIsFullScreen: 0 68 | defaultIsNativeResolution: 1 69 | runInBackground: 0 70 | captureSingleScreen: 0 71 | muteOtherAudioSources: 0 72 | Prepare IOS For Recording: 0 73 | Force IOS Speakers When Recording: 0 74 | submitAnalytics: 1 75 | usePlayerLog: 1 76 | bakeCollisionMeshes: 0 77 | forceSingleInstance: 0 78 | resizableWindow: 0 79 | useMacAppStoreValidation: 0 80 | macAppStoreCategory: public.app-category.games 81 | gpuSkinning: 1 82 | graphicsJobs: 0 83 | xboxPIXTextureCapture: 0 84 | xboxEnableAvatar: 0 85 | xboxEnableKinect: 0 86 | xboxEnableKinectAutoTracking: 0 87 | xboxEnableFitness: 0 88 | visibleInBackground: 0 89 | allowFullscreenSwitch: 1 90 | graphicsJobMode: 0 91 | macFullscreenMode: 2 92 | d3d9FullscreenMode: 1 93 | d3d11FullscreenMode: 1 94 | xboxSpeechDB: 0 95 | xboxEnableHeadOrientation: 0 96 | xboxEnableGuest: 0 97 | xboxEnablePIXSampling: 0 98 | n3dsDisableStereoscopicView: 0 99 | n3dsEnableSharedListOpt: 1 100 | n3dsEnableVSync: 0 101 | ignoreAlphaClear: 0 102 | xboxOneResolution: 0 103 | xboxOneMonoLoggingLevel: 0 104 | xboxOneLoggingLevel: 1 105 | xboxOneDisableEsram: 0 106 | videoMemoryForVertexBuffers: 0 107 | psp2PowerMode: 0 108 | psp2AcquireBGM: 1 109 | wiiUTVResolution: 0 110 | wiiUGamePadMSAA: 1 111 | wiiUSupportsNunchuk: 0 112 | wiiUSupportsClassicController: 0 113 | wiiUSupportsBalanceBoard: 0 114 | wiiUSupportsMotionPlus: 0 115 | wiiUSupportsProController: 0 116 | wiiUAllowScreenCapture: 1 117 | wiiUControllerCount: 0 118 | m_SupportedAspectRatios: 119 | 4:3: 1 120 | 5:4: 1 121 | 16:10: 1 122 | 16:9: 1 123 | Others: 1 124 | bundleVersion: 1.0 125 | preloadedAssets: [] 126 | metroInputSource: 0 127 | m_HolographicPauseOnTrackingLoss: 1 128 | xboxOneDisableKinectGpuReservation: 0 129 | xboxOneEnable7thCore: 0 130 | vrSettings: 131 | cardboard: 132 | depthFormat: 0 133 | enableTransitionView: 0 134 | daydream: 135 | depthFormat: 0 136 | useSustainedPerformanceMode: 0 137 | hololens: 138 | depthFormat: 1 139 | protectGraphicsMemory: 0 140 | useHDRDisplay: 0 141 | targetPixelDensity: 0 142 | resolutionScalingMode: 0 143 | applicationIdentifier: 144 | Android: com.unity3d.tester 145 | Standalone: unity.Unity.Sample Assets 146 | Tizen: com.unity3d.tester 147 | iOS: com.unity3d.tester 148 | tvOS: com.unity3d.tester 149 | buildNumber: 150 | iOS: 0 151 | AndroidBundleVersionCode: 1 152 | AndroidMinSdkVersion: 16 153 | AndroidTargetSdkVersion: 0 154 | AndroidPreferredInstallLocation: 1 155 | aotOptions: 156 | stripEngineCode: 1 157 | iPhoneStrippingLevel: 0 158 | iPhoneScriptCallOptimization: 0 159 | ForceInternetPermission: 0 160 | ForceSDCardPermission: 0 161 | CreateWallpaper: 0 162 | APKExpansionFiles: 0 163 | keepLoadedShadersAlive: 0 164 | StripUnusedMeshComponents: 0 165 | VertexChannelCompressionMask: 166 | serializedVersion: 2 167 | m_Bits: 238 168 | iPhoneSdkVersion: 988 169 | iOSTargetOSVersionString: 6.0 170 | tvOSSdkVersion: 0 171 | tvOSRequireExtendedGameController: 0 172 | tvOSTargetOSVersionString: 9.0 173 | uIPrerenderedIcon: 0 174 | uIRequiresPersistentWiFi: 0 175 | uIRequiresFullScreen: 1 176 | uIStatusBarHidden: 1 177 | uIExitOnSuspend: 0 178 | uIStatusBarStyle: 0 179 | iPhoneSplashScreen: {fileID: 0} 180 | iPhoneHighResSplashScreen: {fileID: 0} 181 | iPhoneTallHighResSplashScreen: {fileID: 0} 182 | iPhone47inSplashScreen: {fileID: 0} 183 | iPhone55inPortraitSplashScreen: {fileID: 0} 184 | iPhone55inLandscapeSplashScreen: {fileID: 0} 185 | iPadPortraitSplashScreen: {fileID: 0} 186 | iPadHighResPortraitSplashScreen: {fileID: 0} 187 | iPadLandscapeSplashScreen: {fileID: 0} 188 | iPadHighResLandscapeSplashScreen: {fileID: 0} 189 | appleTVSplashScreen: {fileID: 0} 190 | tvOSSmallIconLayers: [] 191 | tvOSLargeIconLayers: [] 192 | tvOSTopShelfImageLayers: [] 193 | tvOSTopShelfImageWideLayers: [] 194 | iOSLaunchScreenType: 0 195 | iOSLaunchScreenPortrait: {fileID: 0} 196 | iOSLaunchScreenLandscape: {fileID: 0} 197 | iOSLaunchScreenBackgroundColor: 198 | serializedVersion: 2 199 | rgba: 0 200 | iOSLaunchScreenFillPct: 100 201 | iOSLaunchScreenSize: 100 202 | iOSLaunchScreenCustomXibPath: 203 | iOSLaunchScreeniPadType: 0 204 | iOSLaunchScreeniPadImage: {fileID: 0} 205 | iOSLaunchScreeniPadBackgroundColor: 206 | serializedVersion: 2 207 | rgba: 0 208 | iOSLaunchScreeniPadFillPct: 100 209 | iOSLaunchScreeniPadSize: 100 210 | iOSLaunchScreeniPadCustomXibPath: 211 | iOSDeviceRequirements: [] 212 | iOSURLSchemes: [] 213 | iOSBackgroundModes: 0 214 | iOSMetalForceHardShadows: 0 215 | metalEditorSupport: 1 216 | metalAPIValidation: 1 217 | iOSRenderExtraFrameOnPause: 1 218 | appleDeveloperTeamID: 219 | iOSManualSigningProvisioningProfileID: 220 | tvOSManualSigningProvisioningProfileID: 221 | appleEnableAutomaticSigning: 0 222 | AndroidTargetDevice: 0 223 | AndroidSplashScreenScale: 0 224 | androidSplashScreen: {fileID: 0} 225 | AndroidKeystoreName: 226 | AndroidKeyaliasName: 227 | AndroidTVCompatibility: 1 228 | AndroidIsGame: 1 229 | androidEnableBanner: 1 230 | m_AndroidBanners: 231 | - width: 320 232 | height: 180 233 | banner: {fileID: 0} 234 | androidGamepadSupportLevel: 0 235 | resolutionDialogBanner: {fileID: 0} 236 | m_BuildTargetIcons: 237 | - m_BuildTarget: 238 | m_Icons: 239 | - serializedVersion: 2 240 | m_Icon: {fileID: 0} 241 | m_Width: 128 242 | m_Height: 128 243 | m_BuildTargetBatching: 244 | - m_BuildTarget: Web 245 | m_StaticBatching: 1 246 | m_DynamicBatching: 1 247 | m_BuildTargetGraphicsAPIs: 248 | - m_BuildTarget: WindowsStandaloneSupport 249 | m_APIs: 02000000 250 | m_Automatic: 0 251 | - m_BuildTarget: AndroidPlayer 252 | m_APIs: 08000000 253 | m_Automatic: 0 254 | m_BuildTargetVRSettings: 255 | - m_BuildTarget: Android 256 | m_Enabled: 0 257 | m_Devices: 258 | - Oculus 259 | - m_BuildTarget: Metro 260 | m_Enabled: 0 261 | m_Devices: [] 262 | - m_BuildTarget: N3DS 263 | m_Enabled: 0 264 | m_Devices: [] 265 | - m_BuildTarget: PS3 266 | m_Enabled: 0 267 | m_Devices: [] 268 | - m_BuildTarget: PS4 269 | m_Enabled: 0 270 | m_Devices: 271 | - PlayStationVR 272 | - m_BuildTarget: PSM 273 | m_Enabled: 0 274 | m_Devices: [] 275 | - m_BuildTarget: PSP2 276 | m_Enabled: 0 277 | m_Devices: [] 278 | - m_BuildTarget: SamsungTV 279 | m_Enabled: 0 280 | m_Devices: [] 281 | - m_BuildTarget: Standalone 282 | m_Enabled: 0 283 | m_Devices: 284 | - Oculus 285 | - m_BuildTarget: Tizen 286 | m_Enabled: 0 287 | m_Devices: [] 288 | - m_BuildTarget: WebGL 289 | m_Enabled: 0 290 | m_Devices: [] 291 | - m_BuildTarget: WebPlayer 292 | m_Enabled: 0 293 | m_Devices: [] 294 | - m_BuildTarget: WiiU 295 | m_Enabled: 0 296 | m_Devices: [] 297 | - m_BuildTarget: Xbox360 298 | m_Enabled: 0 299 | m_Devices: [] 300 | - m_BuildTarget: XboxOne 301 | m_Enabled: 0 302 | m_Devices: [] 303 | - m_BuildTarget: iOS 304 | m_Enabled: 0 305 | m_Devices: [] 306 | - m_BuildTarget: tvOS 307 | m_Enabled: 0 308 | m_Devices: [] 309 | openGLRequireES31: 0 310 | openGLRequireES31AEP: 0 311 | webPlayerTemplate: APPLICATION:Black Background 312 | m_TemplateCustomTags: {} 313 | wiiUTitleID: 0005000011000000 314 | wiiUGroupID: 00010000 315 | wiiUCommonSaveSize: 4096 316 | wiiUAccountSaveSize: 2048 317 | wiiUOlvAccessKey: 0 318 | wiiUTinCode: 0 319 | wiiUJoinGameId: 0 320 | wiiUJoinGameModeMask: 0000000000000000 321 | wiiUCommonBossSize: 0 322 | wiiUAccountBossSize: 0 323 | wiiUAddOnUniqueIDs: [] 324 | wiiUMainThreadStackSize: 3072 325 | wiiULoaderThreadStackSize: 1024 326 | wiiUSystemHeapSize: 128 327 | wiiUTVStartupScreen: {fileID: 0} 328 | wiiUGamePadStartupScreen: {fileID: 0} 329 | wiiUDrcBufferDisabled: 0 330 | wiiUProfilerLibPath: 331 | playModeTestRunnerEnabled: 0 332 | actionOnDotNetUnhandledException: 1 333 | enableInternalProfiler: 0 334 | logObjCUncaughtExceptions: 1 335 | enableCrashReportAPI: 0 336 | cameraUsageDescription: 337 | locationUsageDescription: 338 | microphoneUsageDescription: 339 | switchNetLibKey: 340 | switchSocketMemoryPoolSize: 6144 341 | switchSocketAllocatorPoolSize: 128 342 | switchSocketConcurrencyLimit: 14 343 | switchScreenResolutionBehavior: 2 344 | switchUseCPUProfiler: 0 345 | switchApplicationID: 0x01004b9000490000 346 | switchNSODependencies: 347 | switchTitleNames_0: 348 | switchTitleNames_1: 349 | switchTitleNames_2: 350 | switchTitleNames_3: 351 | switchTitleNames_4: 352 | switchTitleNames_5: 353 | switchTitleNames_6: 354 | switchTitleNames_7: 355 | switchTitleNames_8: 356 | switchTitleNames_9: 357 | switchTitleNames_10: 358 | switchTitleNames_11: 359 | switchPublisherNames_0: 360 | switchPublisherNames_1: 361 | switchPublisherNames_2: 362 | switchPublisherNames_3: 363 | switchPublisherNames_4: 364 | switchPublisherNames_5: 365 | switchPublisherNames_6: 366 | switchPublisherNames_7: 367 | switchPublisherNames_8: 368 | switchPublisherNames_9: 369 | switchPublisherNames_10: 370 | switchPublisherNames_11: 371 | switchIcons_0: {fileID: 0} 372 | switchIcons_1: {fileID: 0} 373 | switchIcons_2: {fileID: 0} 374 | switchIcons_3: {fileID: 0} 375 | switchIcons_4: {fileID: 0} 376 | switchIcons_5: {fileID: 0} 377 | switchIcons_6: {fileID: 0} 378 | switchIcons_7: {fileID: 0} 379 | switchIcons_8: {fileID: 0} 380 | switchIcons_9: {fileID: 0} 381 | switchIcons_10: {fileID: 0} 382 | switchIcons_11: {fileID: 0} 383 | switchSmallIcons_0: {fileID: 0} 384 | switchSmallIcons_1: {fileID: 0} 385 | switchSmallIcons_2: {fileID: 0} 386 | switchSmallIcons_3: {fileID: 0} 387 | switchSmallIcons_4: {fileID: 0} 388 | switchSmallIcons_5: {fileID: 0} 389 | switchSmallIcons_6: {fileID: 0} 390 | switchSmallIcons_7: {fileID: 0} 391 | switchSmallIcons_8: {fileID: 0} 392 | switchSmallIcons_9: {fileID: 0} 393 | switchSmallIcons_10: {fileID: 0} 394 | switchSmallIcons_11: {fileID: 0} 395 | switchManualHTML: 396 | switchAccessibleURLs: 397 | switchLegalInformation: 398 | switchMainThreadStackSize: 1048576 399 | switchPresenceGroupId: 0x01004b9000490000 400 | switchLogoHandling: 0 401 | switchReleaseVersion: 0 402 | switchDisplayVersion: 1.0.0 403 | switchStartupUserAccount: 0 404 | switchTouchScreenUsage: 0 405 | switchSupportedLanguagesMask: 0 406 | switchLogoType: 0 407 | switchApplicationErrorCodeCategory: 408 | switchUserAccountSaveDataSize: 0 409 | switchUserAccountSaveDataJournalSize: 0 410 | switchApplicationAttribute: 0 411 | switchCardSpecSize: 4 412 | switchCardSpecClock: 25 413 | switchRatingsMask: 0 414 | switchRatingsInt_0: 0 415 | switchRatingsInt_1: 0 416 | switchRatingsInt_2: 0 417 | switchRatingsInt_3: 0 418 | switchRatingsInt_4: 0 419 | switchRatingsInt_5: 0 420 | switchRatingsInt_6: 0 421 | switchRatingsInt_7: 0 422 | switchRatingsInt_8: 0 423 | switchRatingsInt_9: 0 424 | switchRatingsInt_10: 0 425 | switchRatingsInt_11: 0 426 | switchLocalCommunicationIds_0: 0x01004b9000490000 427 | switchLocalCommunicationIds_1: 428 | switchLocalCommunicationIds_2: 429 | switchLocalCommunicationIds_3: 430 | switchLocalCommunicationIds_4: 431 | switchLocalCommunicationIds_5: 432 | switchLocalCommunicationIds_6: 433 | switchLocalCommunicationIds_7: 434 | switchParentalControl: 0 435 | switchAllowsScreenshot: 1 436 | switchDataLossConfirmation: 0 437 | switchSupportedNpadStyles: 3 438 | switchSocketConfigEnabled: 0 439 | switchTcpInitialSendBufferSize: 32 440 | switchTcpInitialReceiveBufferSize: 64 441 | switchTcpAutoSendBufferSizeMax: 256 442 | switchTcpAutoReceiveBufferSizeMax: 256 443 | switchUdpSendBufferSize: 9 444 | switchUdpReceiveBufferSize: 42 445 | switchSocketBufferEfficiency: 4 446 | ps4NPAgeRating: 12 447 | ps4NPTitleSecret: 448 | ps4NPTrophyPackPath: 449 | ps4ParentalLevel: 1 450 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 451 | ps4Category: 0 452 | ps4MasterVersion: 01.00 453 | ps4AppVersion: 01.00 454 | ps4AppType: 0 455 | ps4ParamSfxPath: 456 | ps4VideoOutPixelFormat: 0 457 | ps4VideoOutInitialWidth: 1920 458 | ps4VideoOutBaseModeInitialWidth: 1920 459 | ps4VideoOutReprojectionRate: 120 460 | ps4PronunciationXMLPath: 461 | ps4PronunciationSIGPath: 462 | ps4BackgroundImagePath: 463 | ps4StartupImagePath: 464 | ps4SaveDataImagePath: 465 | ps4SdkOverride: 466 | ps4BGMPath: 467 | ps4ShareFilePath: 468 | ps4ShareOverlayImagePath: 469 | ps4PrivacyGuardImagePath: 470 | ps4NPtitleDatPath: 471 | ps4RemotePlayKeyAssignment: -1 472 | ps4RemotePlayKeyMappingDir: 473 | ps4PlayTogetherPlayerCount: 0 474 | ps4EnterButtonAssignment: 1 475 | ps4ApplicationParam1: 0 476 | ps4ApplicationParam2: 0 477 | ps4ApplicationParam3: 0 478 | ps4ApplicationParam4: 0 479 | ps4DownloadDataSize: 0 480 | ps4GarlicHeapSize: 2048 481 | ps4ProGarlicHeapSize: 2560 482 | ps4Passcode: eaoEiIgxIX4a2dREbbSqWy6yhKIDCdJO 483 | ps4pnSessions: 1 484 | ps4pnPresence: 1 485 | ps4pnFriends: 1 486 | ps4pnGameCustomData: 1 487 | playerPrefsSupport: 0 488 | restrictedAudioUsageRights: 0 489 | ps4UseResolutionFallback: 0 490 | ps4ReprojectionSupport: 0 491 | ps4UseAudio3dBackend: 0 492 | ps4SocialScreenEnabled: 0 493 | ps4ScriptOptimizationLevel: 3 494 | ps4Audio3dVirtualSpeakerCount: 14 495 | ps4attribCpuUsage: 0 496 | ps4PatchPkgPath: 497 | ps4PatchLatestPkgPath: 498 | ps4PatchChangeinfoPath: 499 | ps4PatchDayOne: 0 500 | ps4attribUserManagement: 0 501 | ps4attribMoveSupport: 0 502 | ps4attrib3DSupport: 0 503 | ps4attribShareSupport: 0 504 | ps4attribExclusiveVR: 0 505 | ps4disableAutoHideSplash: 0 506 | ps4videoRecordingFeaturesUsed: 0 507 | ps4contentSearchFeaturesUsed: 0 508 | ps4attribEyeToEyeDistanceSettingVR: 0 509 | ps4IncludedModules: [] 510 | monoEnv: 511 | psp2Splashimage: {fileID: 0} 512 | psp2NPTrophyPackPath: 513 | psp2NPSupportGBMorGJP: 0 514 | psp2NPAgeRating: 12 515 | psp2NPTitleDatPath: 516 | psp2NPCommsID: 517 | psp2NPCommunicationsID: 518 | psp2NPCommsPassphrase: 519 | psp2NPCommsSig: 520 | psp2ParamSfxPath: 521 | psp2ManualPath: 522 | psp2LiveAreaGatePath: 523 | psp2LiveAreaBackroundPath: 524 | psp2LiveAreaPath: 525 | psp2LiveAreaTrialPath: 526 | psp2PatchChangeInfoPath: 527 | psp2PatchOriginalPackage: 528 | psp2PackagePassword: yapnxrpMCARCr4zdGc81tBDKsMlaZTXC 529 | psp2KeystoneFile: 530 | psp2MemoryExpansionMode: 0 531 | psp2DRMType: 0 532 | psp2StorageType: 0 533 | psp2MediaCapacity: 0 534 | psp2DLCConfigPath: 535 | psp2ThumbnailPath: 536 | psp2BackgroundPath: 537 | psp2SoundPath: 538 | psp2TrophyCommId: 539 | psp2TrophyPackagePath: 540 | psp2PackagedResourcesPath: 541 | psp2SaveDataQuota: 10240 542 | psp2ParentalLevel: 1 543 | psp2ShortTitle: Not Set 544 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 545 | psp2Category: 0 546 | psp2MasterVersion: 01.00 547 | psp2AppVersion: 01.00 548 | psp2TVBootMode: 0 549 | psp2EnterButtonAssignment: 2 550 | psp2TVDisableEmu: 0 551 | psp2AllowTwitterDialog: 1 552 | psp2Upgradable: 0 553 | psp2HealthWarning: 0 554 | psp2UseLibLocation: 0 555 | psp2InfoBarOnStartup: 0 556 | psp2InfoBarColor: 0 557 | psp2ScriptOptimizationLevel: 0 558 | psmSplashimage: {fileID: 0} 559 | splashScreenBackgroundSourceLandscape: {fileID: 0} 560 | splashScreenBackgroundSourcePortrait: {fileID: 0} 561 | spritePackerPolicy: 562 | webGLMemorySize: 256 563 | webGLExceptionSupport: 1 564 | webGLNameFilesAsHashes: 0 565 | webGLDataCaching: 0 566 | webGLDebugSymbols: 0 567 | webGLEmscriptenArgs: 568 | webGLModulesDirectory: 569 | webGLTemplate: APPLICATION:Default 570 | webGLAnalyzeBuildSize: 0 571 | webGLUseEmbeddedResources: 0 572 | webGLUseWasm: 0 573 | webGLCompressionFormat: 1 574 | scriptingDefineSymbols: {} 575 | platformArchitecture: {} 576 | scriptingBackend: 577 | Standalone: 0 578 | incrementalIl2cppBuild: {} 579 | additionalIl2CppArgs: 580 | scriptingRuntimeVersion: 0 581 | apiCompatibilityLevelPerPlatform: {} 582 | m_RenderingPath: 1 583 | m_MobileRenderingPath: 1 584 | metroPackageName: Sample-Assets Project 585 | metroPackageVersion: 586 | metroCertificatePath: 587 | metroCertificatePassword: 588 | metroCertificateSubject: 589 | metroCertificateIssuer: 590 | metroCertificateNotAfter: 0000000000000000 591 | metroApplicationDescription: Sample-Assets Project 592 | wsaImages: {} 593 | metroTileShortName: 594 | metroCommandLineArgsFile: 595 | metroTileShowName: 0 596 | metroMediumTileShowName: 0 597 | metroLargeTileShowName: 0 598 | metroWideTileShowName: 0 599 | metroDefaultTileSize: 1 600 | metroTileForegroundText: 1 601 | metroTileBackgroundColor: {r: 0, g: 0, b: 0, a: 1} 602 | metroSplashScreenBackgroundColor: {r: 0, g: 0, b: 0, a: 1} 603 | metroSplashScreenUseBackgroundColor: 0 604 | platformCapabilities: {} 605 | metroFTAName: 606 | metroFTAFileTypes: [] 607 | metroProtocolName: 608 | metroCompilationOverrides: 1 609 | tizenProductDescription: 610 | tizenProductURL: 611 | tizenSigningProfileName: 612 | tizenGPSPermissions: 0 613 | tizenMicrophonePermissions: 0 614 | tizenDeploymentTarget: 615 | tizenDeploymentTargetType: -1 616 | tizenMinOSVersion: 1 617 | n3dsUseExtSaveData: 0 618 | n3dsCompressStaticMem: 1 619 | n3dsExtSaveDataNumber: 0x12345 620 | n3dsStackSize: 131072 621 | n3dsTargetPlatform: 2 622 | n3dsRegion: 7 623 | n3dsMediaSize: 0 624 | n3dsLogoStyle: 3 625 | n3dsTitle: GameName 626 | n3dsProductCode: 627 | n3dsApplicationId: 0xFF3FF 628 | stvDeviceAddress: 629 | stvProductDescription: 630 | stvProductAuthor: 631 | stvProductAuthorEmail: 632 | stvProductLink: 633 | stvProductCategory: 0 634 | XboxOneProductId: 635 | XboxOneUpdateKey: 636 | XboxOneSandboxId: 637 | XboxOneContentId: 638 | XboxOneTitleId: 639 | XboxOneSCId: 640 | XboxOneGameOsOverridePath: 641 | XboxOnePackagingOverridePath: 642 | XboxOneAppManifestOverridePath: 643 | XboxOnePackageEncryption: 0 644 | XboxOnePackageUpdateGranularity: 2 645 | XboxOneDescription: 646 | XboxOneLanguage: 647 | - enus 648 | XboxOneCapability: [] 649 | XboxOneGameRating: {} 650 | XboxOneIsContentPackage: 0 651 | XboxOneEnableGPUVariability: 0 652 | XboxOneSockets: {} 653 | XboxOneSplashScreen: {fileID: 0} 654 | XboxOneAllowedProductIds: [] 655 | XboxOnePersistentLocalStorageSize: 0 656 | xboxOneScriptCompiler: 0 657 | vrEditorSettings: 658 | daydream: 659 | daydreamIconForeground: {fileID: 0} 660 | daydreamIconBackground: {fileID: 0} 661 | cloudServicesEnabled: 662 | Analytics: 0 663 | Build: 0 664 | Collab: 0 665 | ErrorHub: 0 666 | Game_Performance: 0 667 | Hub: 0 668 | Purchasing: 0 669 | UNet: 0 670 | Unity_Ads: 0 671 | facebookSdkVersion: 7.9.4 672 | apiCompatibilityLevel: 2 673 | cloudProjectId: 674 | projectName: 675 | organizationId: 676 | cloudEnabled: 0 677 | enableNativePlatformBackendsForNewInputSystem: 0 678 | disableOldInputManagerSupport: 0 679 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2017.1.0f3 2 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 3 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Fastest 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 20 17 | blendWeights: 1 18 | textureQuality: 1 19 | anisotropicTextures: 0 20 | antiAliasing: 0 21 | softParticles: 0 22 | softVegetation: 0 23 | vSyncCount: 0 24 | lodBias: .300000012 25 | maximumLODLevel: 0 26 | particleRaycastBudget: 4 27 | excludedTargetPlatforms: [] 28 | - serializedVersion: 2 29 | name: Fast 30 | pixelLightCount: 0 31 | shadows: 0 32 | shadowResolution: 0 33 | shadowProjection: 1 34 | shadowCascades: 1 35 | shadowDistance: 20 36 | blendWeights: 2 37 | textureQuality: 0 38 | anisotropicTextures: 0 39 | antiAliasing: 0 40 | softParticles: 0 41 | softVegetation: 0 42 | vSyncCount: 0 43 | lodBias: .400000006 44 | maximumLODLevel: 0 45 | particleRaycastBudget: 16 46 | excludedTargetPlatforms: [] 47 | - serializedVersion: 2 48 | name: Simple 49 | pixelLightCount: 1 50 | shadows: 0 51 | shadowResolution: 1 52 | shadowProjection: 1 53 | shadowCascades: 1 54 | shadowDistance: 20 55 | blendWeights: 2 56 | textureQuality: 0 57 | anisotropicTextures: 1 58 | antiAliasing: 0 59 | softParticles: 0 60 | softVegetation: 0 61 | vSyncCount: 0 62 | lodBias: .699999988 63 | maximumLODLevel: 0 64 | particleRaycastBudget: 64 65 | excludedTargetPlatforms: [] 66 | - serializedVersion: 2 67 | name: Good 68 | pixelLightCount: 2 69 | shadows: 2 70 | shadowResolution: 2 71 | shadowProjection: 1 72 | shadowCascades: 2 73 | shadowDistance: 25 74 | blendWeights: 2 75 | textureQuality: 0 76 | anisotropicTextures: 1 77 | antiAliasing: 0 78 | softParticles: 0 79 | softVegetation: 1 80 | vSyncCount: 0 81 | lodBias: 1 82 | maximumLODLevel: 0 83 | particleRaycastBudget: 256 84 | excludedTargetPlatforms: [] 85 | - serializedVersion: 2 86 | name: Beautiful 87 | pixelLightCount: 3 88 | shadows: 2 89 | shadowResolution: 3 90 | shadowProjection: 1 91 | shadowCascades: 2 92 | shadowDistance: 25 93 | blendWeights: 4 94 | textureQuality: 0 95 | anisotropicTextures: 2 96 | antiAliasing: 2 97 | softParticles: 0 98 | softVegetation: 1 99 | vSyncCount: 1 100 | lodBias: 1.5 101 | maximumLODLevel: 0 102 | particleRaycastBudget: 1024 103 | excludedTargetPlatforms: [] 104 | - serializedVersion: 2 105 | name: Fantastic 106 | pixelLightCount: 4 107 | shadows: 2 108 | shadowResolution: 3 109 | shadowProjection: 1 110 | shadowCascades: 4 111 | shadowDistance: 25 112 | blendWeights: 4 113 | textureQuality: 0 114 | anisotropicTextures: 2 115 | antiAliasing: 2 116 | softParticles: 0 117 | softVegetation: 1 118 | vSyncCount: 1 119 | lodBias: 2 120 | maximumLODLevel: 0 121 | particleRaycastBudget: 4096 122 | excludedTargetPlatforms: [] 123 | m_PerPlatformDefaultQuality: 124 | Android: 2 125 | BlackBerry: 2 126 | FlashPlayer: 2 127 | Standalone: 4 128 | WP8: 2 129 | Web: 3 130 | Windows Store Apps: 4 131 | iPhone: 2 132 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | tags: 6 | - Item 7 | - Dangerous 8 | - Smelly 9 | - 10 | - Fire 11 | - 12 | Builtin Layer 0: Default 13 | Builtin Layer 1: TransparentFX 14 | Builtin Layer 2: Ignore Raycast 15 | Builtin Layer 3: 16 | Builtin Layer 4: Water 17 | Builtin Layer 5: 18 | Builtin Layer 6: 19 | Builtin Layer 7: 20 | User Layer 8: Vehicles 21 | User Layer 9: Ball 22 | User Layer 10: Characters 23 | User Layer 11: Floor 24 | User Layer 12: 25 | User Layer 13: 26 | User Layer 14: 27 | User Layer 15: 28 | User Layer 16: 29 | User Layer 17: 30 | User Layer 18: 31 | User Layer 19: 32 | User Layer 20: 33 | User Layer 21: 34 | User Layer 22: 35 | User Layer 23: 36 | User Layer 24: 37 | User Layer 25: 38 | User Layer 26: 39 | User Layer 27: 40 | User Layer 28: 41 | User Layer 29: 42 | User Layer 30: 43 | User Layer 31: 44 | m_SortingLayers: 45 | - name: Default 46 | userID: 0 47 | uniqueID: 0 48 | locked: 0 49 | - name: Background 50 | userID: 1 51 | uniqueID: 1093696345 52 | locked: 0 53 | - name: Foreground 54 | userID: 2 55 | uniqueID: 1859086223 56 | locked: 0 57 | - name: Characters 58 | userID: 3 59 | uniqueID: 3940858523 60 | locked: 0 61 | - name: UI 62 | userID: 4 63 | uniqueID: 771169021 64 | locked: 0 65 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: .0199999996 7 | Maximum Allowed Timestep: .333333343 8 | m_TimeScale: 1 9 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | m_Enabled: 0 7 | m_TestMode: 0 8 | m_TestEventUrl: 9 | m_TestConfigUrl: 10 | CrashReportingSettings: 11 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes 12 | m_Enabled: 0 13 | m_CaptureEditorExceptions: 1 14 | UnityPurchasingSettings: 15 | m_Enabled: 0 16 | m_TestMode: 0 17 | UnityAnalyticsSettings: 18 | m_Enabled: 0 19 | m_InitializeOnStartup: 1 20 | m_TestMode: 0 21 | m_TestEventUrl: 22 | m_TestConfigUrl: 23 | UnityAdsSettings: 24 | m_Enabled: 0 25 | m_InitializeOnStartup: 1 26 | m_TestMode: 0 27 | m_EnabledPlatforms: 4294967295 28 | m_IosGameId: 29 | m_AndroidGameId: 30 | -------------------------------------------------------------------------------- /ReadMe.md: -------------------------------------------------------------------------------- 1 | **Inspector++** 2 | 3 | Inspector++ Is a tool to visually create Unity inspectors 4 | 5 | ![Main](https://raw.githubusercontent.com/ArthurBrussee/InspectorPlusPlus/master/MainGithub.PNG) 6 | 7 | **Set-up** 8 | 9 | As soon as you imported this asset you can start creating inspectors! Open the Inspector++ window via the Window->Inspector++ menu. 10 | 11 | **Adding Inspectors** 12 | Select your scripts from your project window. All MonoBehaviours or ScriptableObjects you selected appear in the window. Click create and you’re done! 13 | 14 | **Editing Inspectors** 15 | Inspector++ includes a window to visually edit your inspectors. Open it by clicking ‘edit’ next to the file you want to edit. 16 | 17 | The window displays all variables, with some options. Here are the basic options in order: 18 | 19 | - The first toggle hides or unhides the variable from the inspector. 20 | - The display name of the variable 21 | - A toggle to enable a tooltip 22 | - A field for the tooltip 23 | - Arrow to move the variable up 24 | - Arrow to move the variable down 25 | - The last toggle enables/disables writing to the field (Disable it to make a read-only property) 26 | 27 | From there it depends on the type of variable what kind of controls you see. 28 | 29 | Under the variable there is a smal seperator. You can drag this seperator to put some space between vars. When the box is large enough you will notice some additional controls. From left to right: 30 | 31 | - Toggle to enable or disable a label 32 | - The text of the label. 33 | - Toggle for a Bold label 34 | - Toggle to enable or disable a button 35 | - The text that should appear on the button. 36 | - The function that should be called when the button is pressed 37 | - If you have multiple buttons, you can ‘condense’ them. This means they will stick together and take up less space. 38 | 39 | You can add a maximum of 16 buttons (4 per line) and 4 labels 40 | 41 | Tooltips 42 | You can make tooltips via a toggle and textfield in the editor, but also through scripting, in 2 different ways: 43 | 44 | 1. a summary (C# only) 45 | ```C# 46 | /// 47 | ///this will be my tooltip! 48 | /// 49 | public float tooltip; 50 | ```` 51 | 52 | 2.Attribute: 53 | ```C# 54 | [Tooltip(“This will be my tooltip!”)] 55 | public int myInt; 56 | ``` 57 | 58 | **Save to file** 59 | You can also use 'Save to file'. This features produces a C# file you can share in your projects or use in an asset store project. The .cs file is a optimized version of your custom inspector. Note that when you edit your inspector, this file doesn't get updated. You need to regenerate it after any changes. 60 | --------------------------------------------------------------------------------