---
title: "Shrimple Pawns - s&box library"
description: "The classic entity pawn system... but in scene!"
canonical: "https://sbox.watch/zh-cn/libraries/fish/sp/"
generated_at: "2026-11-27T12:26:25.884Z"
---

# Shrimple Pawns

The classic entity pawn system... but in scene!

- 类型: 库
- 标识符: fish.sp
- 创作者: Small Fish
- 规范地址: https://sbox.watch/zh-cn/libraries/fish/sp/
- Markdown: https://sbox.watch/zh-cn/libraries/fish/sp/index.md
- sbox.game: https://sbox.game/fish/sp/
- 生成时间: 2026-11-27T12:26:25.884Z

## 统计

- 24小时热度: +0
- Terry 评分: 44%
- 收藏: 3
- 好评: 4
- 差评: 1
- 更新时间: 2025年11月29日
- 创建时间: 2024年11月15日
- 大小: 11.1 KB
- 文件: 8
- 标签: shrimple, pawn, pawns

## 描述

Shrimple Pawns
"no we won't allow pawn games" -garry

s&box library that provides support for the classic entity Pawn system. This is useful in cases where the player can take control of different controllers. For example, an FPS game where you have the regular player state but also a spectating state.

Example
// Inherit the pawn component.
//
// Make sure to provide the PawnAttribute with a path to a prefab
// if you decide to use the template version of AssignPawn.
\[Pawn( "spectate.prefab" )\]
public sealed class SpectatePawn : Pawn
{

}then assign the pawn to the client!
// All of the following code should be called on the host! Since we use \[HostSync\] internally.
//
// Setup and assign the client a connection. Make sure this clientObj is already networked and has a client component attached.
var client = clientObj.Components.Get<Client>();
client.AssignConnection( channel );

// Give the client a pawn via one of the methods below.

// Option \#1
// The pawn component MUST have PawnAttribute.
client.AssignPawn<SpectatePawn>();

// Option \#2
// The pawn component does NOT need PawnAttribute in this case.
client.AssignPawn(SpectatePrefab);

// Option \#3
// The gameobject already exists and you want to assign it
var obj = SceneUtility.GetPrefabScene( SpectatePrefab ).Clone();
client.AssignPawn(obj);
A full example can be viewed here.



## More by Small Fish

| Package | 标识符 | 玩家 | 收藏 | 好评 | 评分 | Markdown |
| --- | --- | --- | --- | --- | --- | --- |
| Shrimple Character Controller | fish.scc | 0 | 24 | 25 | 85% | https://sbox.watch/zh-cn/libraries/fish/scc/index.md |
| Shrimple Ragdolls | fish.shrimple_ragdolls | 0 | 19 | 18 | 87% | https://sbox.watch/zh-cn/libraries/fish/shrimple_ragdolls/index.md |
| Boxfish | fish.boxfish | 0 | 13 | 15 | 76% | https://sbox.watch/zh-cn/libraries/fish/boxfish/index.md |
| Conchplex Particle Emitters | fish.conchplexemitters | 0 | 1 | 2 | 43% | https://sbox.watch/zh-cn/libraries/fish/conchplexemitters/index.md |
| ShrimpleProfiler | fish.shrimpleprofiler | 0 | 1 | 0 | 0% | https://sbox.watch/zh-cn/libraries/fish/shrimpleprofiler/index.md |
| Small Fish Utils | fish.sfu | 0 | 0 | 1 | 12% | https://sbox.watch/zh-cn/libraries/fish/sfu/index.md |
