增加,相机截插件

This commit is contained in:
李浩 2025-02-27 08:55:41 +08:00
parent 451efc6d7b
commit 3ecf5c69e4
19 changed files with 578 additions and 0 deletions

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c7716dfd583f50d4ea11bff1e96c0788
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7b29b87cb248e284b98e0a37c50f3316
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 58d902f62ca11b34a9ec9da3f2db5dec
PluginImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
isPreloaded: 0
platformData:
Any:
enabled: 1
settings: {}
Editor:
enabled: 0
settings:
DefaultValueInitialized: true
WindowsStoreApps:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,5 @@
fileFormatVersion: 2
guid: 4a1a393054e841c4aa2f3e6ac3327849
folderAsset: yes
DefaultImporter:
userData:

View File

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: ae1f43a881c828a42b4ec5b3eb4cd92e
PluginImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
isPreloaded: 0
platformData:
Any:
enabled: 0
settings: {}
Editor:
enabled: 1
settings:
DefaultValueInitialized: true
WindowsStoreApps:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 8f674e79c8c30fc48b5556bc4e99ffea
DefaultImporter:
userData:

View File

@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 3bf5b5280afc28347858e4f50973d599
DefaultImporter:
userData:

View File

@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: e7a4159d73aa0a7428f8cc87cbb98375
DefaultImporter:
userData:

View File

@ -0,0 +1,332 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
SceneSettings:
m_ObjectHideFlags: 0
m_PVSData:
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: .25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 6
m_Fog: 0
m_FogColor: {r: .5, g: .5, b: .5, a: 1}
m_FogMode: 3
m_FogDensity: .00999999978
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: .200000003, g: .200000003, b: .200000003, a: 1}
m_AmbientEquatorColor: {r: .200000003, g: .200000003, b: .200000003, a: 1}
m_AmbientGroundColor: {r: .200000003, g: .200000003, b: .200000003, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: .5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
--- !u!127 &3
LevelGameManager:
m_ObjectHideFlags: 0
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 5
m_GIWorkflowMode: 1
m_LightmapsMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 3
m_Resolution: 1
m_BakeResolution: 50
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AOMaxDistance: 1
m_Padding: 2
m_CompAOExponent: 0
m_LightmapParameters: {fileID: 0}
m_TextureCompression: 0
m_FinalGather: 0
m_FinalGatherRayCount: 1024
m_LightmapSnapshot: {fileID: 0}
m_RuntimeCPUUsage: 25
--- !u!196 &5
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentRadius: .5
agentHeight: 2
agentSlope: 45
agentClimb: .400000006
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
cellSize: .166666657
manualCellSize: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &180192734
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 180192738}
- 33: {fileID: 180192737}
- 136: {fileID: 180192736}
- 23: {fileID: 180192735}
m_Layer: 0
m_Name: Capsule
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!23 &180192735
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 180192734}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_Materials:
- {fileID: 10302, guid: 0000000000000000f000000000000000, type: 0}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_ReflectionProbeUsage: 1
m_ProbeAnchor: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_ImportantGI: 0
m_AutoUVMaxDistance: .5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingOrder: 0
--- !u!136 &180192736
CapsuleCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 180192734}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
m_Radius: .5
m_Height: 2
m_Direction: 1
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &180192737
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 180192734}
m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &180192738
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 180192734}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 38.1898804, y: 16.1173, z: 26.4620476}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!1 &882318059
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 882318064}
- 20: {fileID: 882318063}
- 92: {fileID: 882318062}
- 124: {fileID: 882318061}
- 81: {fileID: 882318060}
- 114: {fileID: 882318067}
- 114: {fileID: 882318066}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &882318060
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 882318059}
m_Enabled: 1
--- !u!124 &882318061
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 882318059}
m_Enabled: 1
--- !u!92 &882318062
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 882318059}
m_Enabled: 1
--- !u!20 &882318063
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 882318059}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: .300000012
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 100
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_HDR: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
--- !u!4 &882318064
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 882318059}
m_LocalRotation: {x: -.0496420972, y: .949292421, z: -.195208788, w: -.24139829}
m_LocalPosition: {x: 39.951416, y: 17.80093, z: 29.6963978}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
--- !u!114 &882318066
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 882318059}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 82603eff962206f4eb834bef25118f1e, type: 3}
m_Name:
m_EditorClassIdentifier:
takeScreenshotKey: 291
--- !u!114 &882318067
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 882318059}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 909834912, guid: 58d902f62ca11b34a9ec9da3f2db5dec, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &2031217733
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 2031217735}
- 108: {fileID: 2031217734}
m_Layer: 0
m_Name: Directional light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &2031217734
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2031217733}
m_Enabled: 1
serializedVersion: 6
m_Type: 1
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:
m_Type: 0
m_Resolution: -1
m_Strength: 1
m_Bias: .0500000007
m_NormalBias: .400000006
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 1
m_BounceIntensity: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
m_AreaSize: {x: 1, y: 1}
--- !u!4 &2031217735
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2031217733}
m_LocalRotation: {x: .408217937, y: -.234569728, z: .109381661, w: .875426114}
m_LocalPosition: {x: 38.1898804, y: 16.1173, z: 26.4620476}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1

View File

@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: ddbd47c1e338d994ba28a7668898d118
DefaultImporter:
userData:

View File

@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 2b39148f853262b42bf7bf9950bd82b1
DefaultImporter:
userData:

View File

@ -0,0 +1,38 @@
using UnityEngine;
using System.Collections;
namespace DarkArtsStudios.ScreenshotCreator.Examples {
[RequireComponent(typeof(ScreenshotManager))]
public class ScreenshotOnKeyPress : MonoBehaviour {
public KeyCode takeScreenshotKey = KeyCode.F10;
private ScreenshotManager screenshotManager = null;
string newFilename
{
get
{
return string.Format( "Screenshot {0}.png", System.DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss") );
}
}
void Start()
{
screenshotManager = this.gameObject.GetComponent( typeof( ScreenshotManager ) ) as ScreenshotManager;
}
void Update()
{
if ( screenshotManager != null && Input.GetKeyDown( takeScreenshotKey ) )
{
string screenshotPath = screenshotManager.TakeScreenshot( newFilename );
if (screenshotPath != "")
Debug.Log( string.Format( "Saved Screenshot: {0}", screenshotPath ) );
}
}
}
}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 82603eff962206f4eb834bef25118f1e
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

View File

@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 52a01e19fc0bacf4495cbba2147e78b2
DefaultImporter:
userData:

View File

@ -0,0 +1,107 @@
Screenshot Creator Update History
=================================
v1.4.5
------
* Fix issue where using a RenderTexture too large for current hardware caused Screenshot
Creator to lock up Unity rather than failing and logging the error.
v1.4.4
------
* Fix warnings for Unity versions 5.4 and newer.
* Add custom builds for the entire Unity 4 series.
v1.4.3
------
* Update Screenshot Creator infrastructure to build DLLs individually for each Unity version
to make it much more compatible across Unity API changes.
* Update source code for API alterations through each version change up to Unity 5.4.x.
v1.4.2
------
* Patch release for Unity 5.3.0 fixing deprecated Unity API calls
v1.4.1
------
* Fixed error when adding first resolution to resolutions list
* Added display of aspect ratio within resolutions list & preview title bar
Mac on Unity 5 Only
* Fixed a crash on screenshot window opening [upstream ReorderableList update]
v1.4
----
* Automatic Camera detection and setup in addition to Manual Camera arrangement
* Individual screenshot resolutions can be activated/deactivated
* [BUG] Camera selection no longer alters actual camera active/inactive state within a scene
* Screenshot Manager (Runtime Class) allows for scale setting and uses new automatic camera detection
v1.3
----
* Basic runtime screenshot manager (to be extended)
* Simple example scene using screenshot manager and keypress screenshots
* [BUG] Applied same fix for anti-aliasing for all screenshot types
* Added a bool to ScreenshotUtility indicating if screenshot is in progress
* Added optional GameObject container to Editor for objects only to be displayed in screenshots (eg text)
v1.2.3
------
* Added support for anti-aliasing as set within Quality Settings
* Added the ability to load PlayerPrefs screen resolutions into resolutions list
* Added icon to Screenshot Creator window.
v1.2.2
------
* Fix a (possible) memory leak during preview rendering
* Preview area is now drag-resizable
v1.2.1
------
* Fixed camera sound issue when target build environment did not support Ogg Vorbis
* Correct size of overlay images in preview window to correctly represent final screenshot
* Fix an issue with Screenshot Creator window flickering in the linear colourspace
v1.2
----
* Multi-Camera support. This is experimental.
- Please if you find any issues email me and screenshot-creator@darkarts.co.za
* The beginnings of the scriptable API (documentation to follow)
* Fixed a bug where screenshots didn't save when odd characters (eg semi-colon)
existed in Game, Scene or Camera names
* Lighting mode toggleable now within preview window and screenshots. This behaves
in the same manner as the scene view's lighting toggle.
Unity Pro Only
* Realtime (in-game) Screenshots, with API to go with it
- In the next release a Screenshot Management component/gameobject will join to
help manage this.
v1.1
----
* User Interface Improvements (mostly cleaned up wasted space)
* Snapshot sound when taking a screenshot
* Multiple simultaneous screenshots at different resolutions
* Fixed several bugs and optimized performance
- Part of this change means realtime preview is limited to 10 FPS
* Fixed a crash where it attempted to index selected camera when
no camera was selected
v1.0
----
* Initial Release

View File

@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: bf4be1c28117e3e44bc79eb91de01a36
TextScriptImporter:
userData: