├── Resources ├── Icon128.png ├── NewActor.png ├── Preview.png ├── Widget.png ├── Widget2.png ├── BeginPlay.png └── NewActor2.png ├── ViewProjector.uplugin ├── Content ├── WBP_Example.uasset ├── BP_ViewProjector.uasset ├── FProjectionSettings.uasset ├── Materials │ ├── M_Frustum.uasset │ ├── M_ViewFarPlane.uasset │ └── M_ViewProjection.uasset ├── Meshes │ ├── SM_Plane_1x1.uasset │ ├── SM_UVPlane_1x1.uasset │ └── SM_UnitFrustum.uasset └── BP_WidgetViewProjector.uasset ├── README.md ├── LICENSE └── .gitignore /Resources/Icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinwood3d/WidgetProjection/HEAD/Resources/Icon128.png -------------------------------------------------------------------------------- /Resources/NewActor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinwood3d/WidgetProjection/HEAD/Resources/NewActor.png -------------------------------------------------------------------------------- /Resources/Preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinwood3d/WidgetProjection/HEAD/Resources/Preview.png -------------------------------------------------------------------------------- /Resources/Widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinwood3d/WidgetProjection/HEAD/Resources/Widget.png -------------------------------------------------------------------------------- /Resources/Widget2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinwood3d/WidgetProjection/HEAD/Resources/Widget2.png -------------------------------------------------------------------------------- /ViewProjector.uplugin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinwood3d/WidgetProjection/HEAD/ViewProjector.uplugin -------------------------------------------------------------------------------- /Resources/BeginPlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinwood3d/WidgetProjection/HEAD/Resources/BeginPlay.png -------------------------------------------------------------------------------- /Resources/NewActor2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinwood3d/WidgetProjection/HEAD/Resources/NewActor2.png -------------------------------------------------------------------------------- /Content/WBP_Example.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinwood3d/WidgetProjection/HEAD/Content/WBP_Example.uasset -------------------------------------------------------------------------------- /Content/BP_ViewProjector.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinwood3d/WidgetProjection/HEAD/Content/BP_ViewProjector.uasset -------------------------------------------------------------------------------- /Content/FProjectionSettings.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinwood3d/WidgetProjection/HEAD/Content/FProjectionSettings.uasset -------------------------------------------------------------------------------- /Content/Materials/M_Frustum.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinwood3d/WidgetProjection/HEAD/Content/Materials/M_Frustum.uasset -------------------------------------------------------------------------------- /Content/Meshes/SM_Plane_1x1.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinwood3d/WidgetProjection/HEAD/Content/Meshes/SM_Plane_1x1.uasset -------------------------------------------------------------------------------- /Content/BP_WidgetViewProjector.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinwood3d/WidgetProjection/HEAD/Content/BP_WidgetViewProjector.uasset -------------------------------------------------------------------------------- /Content/Meshes/SM_UVPlane_1x1.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinwood3d/WidgetProjection/HEAD/Content/Meshes/SM_UVPlane_1x1.uasset -------------------------------------------------------------------------------- /Content/Meshes/SM_UnitFrustum.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinwood3d/WidgetProjection/HEAD/Content/Meshes/SM_UnitFrustum.uasset -------------------------------------------------------------------------------- /Content/Materials/M_ViewFarPlane.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinwood3d/WidgetProjection/HEAD/Content/Materials/M_ViewFarPlane.uasset -------------------------------------------------------------------------------- /Content/Materials/M_ViewProjection.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robinwood3d/WidgetProjection/HEAD/Content/Materials/M_ViewProjection.uasset -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ViewProjector 2 | 使用贴花向场景中投射平面内容 3 | 4 | [视频地址](https://www.bilibili.com/video/BV1uj411a78F) 5 | 6 | ![](Resources/Preview.png) 7 | 8 | ## 基础用法一 9 | 10 | - 如果想把媒体视频投射到场景中, 则需要新建Actor蓝图,父类选择 BP_ViewProjector 11 | ![](Resources/NewActor.png) 12 | 13 | - 在BeginPlay播放媒体,并调用SetProjectionTexture将媒体纹理投射到场景中 14 | ![](Resources/BeginPlay.png) 15 | 16 | - 点击运行,即可查看效果 17 | 18 | ## 基础用法二 19 | 20 | - 如果想把UMG投射到场景中, 则需要新建Actor蓝图,父类选择 BP_WidgetViewProjector 21 | ![](Resources/NewActor2.png) 22 | 23 | - 在BeginPlay处创建控件并将其传给Widget组件 24 | ![](Resources/Widget.png) 25 | 26 | - 也可以直接选中Widget组件并将控件类传入 27 | ![](Resources/Widget2.png) 28 | 29 | - 运行即可查看投射效果 -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Robin Wood 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 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Visual Studio 2015 user specific files 2 | .vs/ 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | 22 | # Compiled Static libraries 23 | *.lai 24 | *.la 25 | *.a 26 | *.lib 27 | 28 | # Executables 29 | *.exe 30 | *.out 31 | *.app 32 | *.ipa 33 | 34 | # These project files can be generated by the engine 35 | *.xcodeproj 36 | *.xcworkspace 37 | *.sln 38 | *.suo 39 | *.opensdf 40 | *.sdf 41 | *.VC.db 42 | *.VC.opendb 43 | 44 | # Precompiled Assets 45 | SourceArt/**/*.png 46 | SourceArt/**/*.tga 47 | 48 | # Binary Files 49 | Binaries/* 50 | Plugins/*/Binaries/* 51 | 52 | # Builds 53 | Build/* 54 | 55 | # Whitelist PakBlacklist-.txt files 56 | !Build/*/ 57 | Build/*/** 58 | !Build/*/PakBlacklist*.txt 59 | 60 | # Don't ignore icon files in Build 61 | !Build/**/*.ico 62 | 63 | # Built data for maps 64 | *_BuiltData.uasset 65 | 66 | # Configuration files generated by the Editor 67 | Saved/* 68 | 69 | # Compiled source files for the engine to use 70 | Intermediate/* 71 | Plugins/*/Intermediate/* 72 | 73 | # Cache files for the editor to use 74 | DerivedDataCache/* 75 | --------------------------------------------------------------------------------